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
Sets the name using the raw bytes and the string created from it by guessing or using the configured encoding.
protected void setName(final String name, final byte[] rawName) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "e9c9991c-deb4-4a9e-9541-fb55f1b77235"); setName(name); writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "edb6edae-5e7e-4c40-80af-001747a0cacb"); this.rawName = rawName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "private void setNewNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n newName_ = value.toStringUtf8();\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n name_ = value;\n \n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n name_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) { throw new NullPointerException(); }\n checkByteStringIsUtf8(value);\n name_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n name_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n name_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "public Builder setNameBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n name_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "public Builder setNameBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n name_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "public Builder setCurrentNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n currentName_ = value;\n onChanged();\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNameBytes(value);\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNameBytes(value);\n return this;\n }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNameBytes(value);\n return this;\n }", "public void setName(String name)\n/* */ {\n/* 84 */ this._name = name;\n/* */ }", "public Builder setNameBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNameBytes(value);\n return this;\n }", "public final void setName(String name) {_name = name;}", "@Model @Raw\r\n\tprivate void setName(String name) {\r\n\t\tif (isValidName(name)) {\r\n\t\t\tthis.name = name;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.name = getDefaultName();\r\n\t\t}\r\n\t}", "public void setName(java.lang.CharSequence value) {\n this.name = value;\n }", "public Builder setGameNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n gameName_ = value;\n onChanged();\n return this;\n }", "public Builder setGameNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n gameName_ = value;\n onChanged();\n return this;\n }", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void setNameString(String s) {\n nameString = s;\r\n }", "public Builder setBankNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n bankName_ = value;\n onChanged();\n return this;\n }", "private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }", "public void setName(String name)\r\n/* */ {\r\n/* 137 */ this.name = name;\r\n/* */ }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public Builder setDatabaseNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public Builder setDatabaseNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public Builder setDatabaseNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public Builder setDatabaseNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "public void setCustomName(String name) {\n/* 832 */ if (name != null && name.length() > 256) {\n/* 833 */ name = name.substring(0, 256);\n/* */ }\n/* */ \n/* 836 */ getHandle().setCustomName(CraftChatMessage.fromStringOrNull(name));\n/* */ }", "public void setName(String name) {\n characterName = name;\n }", "public Builder setNewNameBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setNewNameBytes(value);\n return this;\n }", "protected void setName(String name) {\n this._name = name;\n }", "public Builder setProviderNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n providerName_ = value;\n onChanged();\n return this;\n }", "public Builder setPlayerNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n playerName_ = value;\n onChanged();\n return this;\n }", "public void setName(String s) {\n this.name = s;\n }", "public static void nameToBytes(byte[] buf , String name) {\n int i;\n byte[] stringBuffer = name.getBytes(Charset.forName(\"UTF-8\"));\n for (i = 0; i < stringBuffer.length && i < name.length(); ++i) {\n buf[i] = stringBuffer[i];\n }\n\n }", "public Builder setGraphNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n graphName_ = value;\n onChanged();\n return this;\n }", "public void setName(java.lang.String value) {\n this.name = value;\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public void setName(String n){ name=n; }", "protected void setName(String name) {\r\n this.name = name;\r\n }", "public abstract String getRawName();", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n name_ = value;\n \n return this;\n }", "public Builder setDeriverNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n AbstractMessageLite.checkByteStringIsUtf8(value);\n \n deriverName_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setName(String name) throws RemoteException {\n\t\tthis.name = name;\n\t}", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }" ]
[ "0.737327", "0.73562026", "0.73562026", "0.73562026", "0.72121686", "0.6918884", "0.6918884", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.69106555", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6905521", "0.6758428", "0.67240274", "0.67240274", "0.67232245", "0.67232245", "0.67053163", "0.6693961", "0.6663941", "0.66638994", "0.66638994", "0.66638994", "0.66638994", "0.66638994", "0.6661192", "0.66608864", "0.66608864", "0.66608864", "0.66608864", "0.6611254", "0.65257496", "0.652066", "0.651008", "0.651008", "0.65003556", "0.65003556", "0.6293446", "0.6272575", "0.6272575", "0.6272575", "0.62290937", "0.6215943", "0.61502427", "0.6123751", "0.60987276", "0.6074289", "0.6074289", "0.6062062", "0.6062062", "0.6062062", "0.6058666", "0.6031763", "0.60191995", "0.60143805", "0.6009679", "0.60032535", "0.60032535", "0.60032535", "0.60032535", "0.59982383", "0.59982383", "0.59982383", "0.5995555", "0.5992769", "0.5976147", "0.59552145", "0.5953235", "0.59531134", "0.5943654", "0.5941859", "0.59377533", "0.59305906", "0.591947", "0.5917589", "0.5913688", "0.59111226", "0.5899404", "0.58951235", "0.5882782", "0.58717686", "0.58646053", "0.58646053", "0.58646053" ]
0.6781818
28
Returns the raw bytes that made up the name before it has been converted using the configured or guessed encoding. This method will return null if this instance has not been read from an archive.
public byte[] getRawName() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "80c1d0d6-ecf6-46ce-8974-d51c0eec65f5"); if (rawName != null) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "1419ab4b-022a-4d7f-bb47-0e698baa585d"); final byte[] b = new byte[rawName.length]; writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "081dbe56-1e24-4924-a9ff-87041e808c2e"); System.arraycopy(rawName, 0, b, 0, rawName.length); writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "06a15faf-53f9-4981-9869-338771474e21"); return b; } writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "6b8d5462-042b-4f13-9788-9947eca21cba"); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] getEncoded() \n {\n try\n {\n return super.getEncoded();\n }\n catch (IOException e)\n {\n return null;\n }\n }", "public byte[] getName();", "public String getDeclaredEncoding();", "public String getEncoding() {\n return null;\n }", "public String getNomeArquivoAuxiliar() throws ACBrException {\n ByteBuffer lNomeArquivoAuxiliar = ByteBuffer.allocate(STR_BUFFER_LEN);\n int ret = ACBrAACInterop.INSTANCE.AAC_GetNomeArquivoAux(getHandle(), lNomeArquivoAuxiliar, STR_BUFFER_LEN);\n checkResult(ret); \n return fromUTF8(lNomeArquivoAuxiliar, ret);\n }", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "com.google.protobuf.ByteString\n getFileNameBytes();", "String getEncoding();", "public String getEncoding() {\n \t return null;\n \t }", "public String getEncoding() {\n \t return null;\n \t }", "com.google.protobuf.ByteString\n getAboutRawBytes();", "private String parseName(byte[] buffer, final int offset, final int length, final ArchiveEntryEncoding encoding) throws IOException {\n int len = length;\n for (; len > 0; len--) {\n if (buffer[offset + len - 1] != 0) {\n break;\n }\n }\n if (len > 0) {\n byte[] b = new byte[len];\n System.arraycopy(buffer, offset, b, 0, len);\n return encoding.decode(b);\n }\n return \"\";\n }", "java.lang.String getEncoded();", "com.google.protobuf.ByteString\n getFileNameBytes();", "public byte[] getResource(String name) {\r\n /*\r\n * if (classNameReplacementChar == '\\u0000') { // '/' is used to map the\r\n * package to the path name= name.replace('.', '/') ; } else {\r\n * Replace '.' with custom char, such as '_' name= name.replace('.',\r\n * classNameReplacementChar) ; }\r\n */\r\n if (htJarContents.get(name) == null) {\r\n return null;\r\n }\r\n System.out.println(\">> Cached jar resource name \" + name + \" size is \"\r\n + ((byte[]) htJarContents.get(name)).length + \" bytes\");\r\n\r\n return (byte[]) htJarContents.get(name);\r\n }", "com.google.protobuf.ByteString\n getFilenameBytes();", "com.google.protobuf.ByteString\n getFilenameBytes();", "public String getEncoding() {\n\t\treturn (encoding != null && !encoding.isEmpty()) ? encoding : System.getProperty(\"file.encoding\"); //NOI18N\n\t}", "java.lang.String getAboutRaw();", "@Override\n\tpublic String readBlob() throws PersistBlobException {\n\t\tlog.debug(\"readString: \");\n\t\ttry {\n\t\t\tString contents = FileUtils.readFileToString(new File(full_file_name), \"UTF-8\");\n\t\t\tlog.debug(\"returned string: \"+contents);\n\t\t\treturn contents;\n\t\t} catch (IOException e) {\n\t\t\tthrow new PersistBlobException(\"can not read string\",e);\n\t\t}\n\n\t}", "protected String getEncodedFileContent() throws IOException\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n Path path = Paths.get(fullAttachmentFilename);\n byte[] byteArray = Files.readAllBytes(path);\n Base64 x = new Base64();\n String encodedFileContent = x.encodeAsString(byteArray);\n return encodedFileContent;\n }", "String getRaw();", "public String getFileEncoding() {\n return fileEncoding;\n }", "public String getFileEncoding() {\n return fileEncoding;\n }", "public abstract String getRawName();", "com.google.protobuf.ByteString\n getBankNameBytes();", "String getContentEncoding();", "private byte[] getFileNameBytes(File photo) {\r\n return photo.getName().getBytes();\r\n }", "private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String guessAppropriateEncoding(CharSequence contents) {\n for (int i = 0; i < contents.length(); i++) {\n if (contents.charAt(i) > 0xFF) {\n return \"UTF-8\";\n }\n }\n return null;\n }", "public org.apache.xmlbeans.XmlAnySimpleType getInputEncoding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_attribute_user(INPUTENCODING$16);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_default_attribute_value(INPUTENCODING$16);\n }\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public com.google.protobuf.ByteString\n getArchBytes() {\n Object ref = arch_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n arch_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public byte[] getClassBytes(String name) {\n return null;\n }", "@Override\r\n\t@JsonIgnore\r\n\tpublic byte[] asBytes() {\n\t\treturn null;\r\n\t}", "public String getArch() {\n Object ref = arch_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n arch_ = s;\n }\n return s;\n }\n }", "public String getArch() {\n Object ref = arch_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n arch_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "public String getEncoding() {\n\t\treturn this.encoding;\n\t}", "public String read_from_disc(ChunkName name) throws IOException {\n\tString path = this.path_name(name);\n\tbyte[] encoded = Files.readAllBytes(Paths.get(path));\n\treturn this.encoding.decode(ByteBuffer.wrap(encoded)).toString();\n }", "protected String getCharValue(String name) throws UnsupportedEncodingException {\r\n\r\n APICharFieldDescription field = getCharFieldDescription(name);\r\n return getCharConverter().byteArrayToString(bytes, getAbsoluteFieldOffset(field), field.getLength());\r\n }", "private static byte[] createNameBA() {\n\t\t//Creating byte[]\n\t\tbyte[] data = new byte[SIZE_PACKET];\n\t\tByteBuffer b = ByteBuffer.wrap(data);\n\t\tb.clear();\n\n\t\t//Adding of file name bytes to the byte[]\n\t\tbyte[] nameBytes = outputFileName.getBytes();\n\t\tfor(int i = 0; i < nameBytes.length; i++) {\n\t\t\tdata[i + INDEX_CONTENT] = nameBytes[i];\t\n\t\t}\n\n\t\t//Adding headers to the byte[]\n\t\tb.rewind();\n\t\tb.putLong(0); //Save 8 bytes for checksum\n\t\tb.putInt(seqNumber); //should be 0\n\t\tb.putInt(PACKET_NAME); //should be 1 since packet type is name\n\t\tb.putInt(nameBytes.length); //number of bytes that name takes\n\n\t\t//Calculating checksum and adding to byte[]\n\t\tchecksum = new CRC32();\n\t\tchecksum.reset();\n\t\tchecksum.update(data, INDEX_SEQ, data.length - INDEX_SEQ);\n\t\tlong chksum = checksum.getValue();\n\t\tb.rewind(); //move pointer back to 0\n\t\tb.putLong(chksum); //contains checksum of INDEX_SEQ to end of packet\n\n\t\t//Return byte[]\n\t\treturn data;\n\t}", "public com.google.protobuf.ByteString\n getArchBytes() {\n Object ref = arch_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n arch_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Byte getByte(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).byteValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null && string.length() > 0) {\n return Byte.parseByte(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }", "private String parseName(byte[] buffer, final int offset, final int length) {\n try {\n return parseName(buffer, offset, length, ArchiveUtils.DEFAULT_ENCODING);\n } catch (IOException ex) {\n try {\n return parseName(buffer, offset, length, ArchiveUtils.FALLBACK_ENCODING);\n } catch (IOException ex2) {\n // impossible\n throw new RuntimeException(ex2);\n }\n }\n }", "public byte[] getByteArray(String name) {\n Enumeration enumer = BYTES.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectByteArrayItem item = (SimpleMessageObjectByteArrayItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n byte[] noSuchArray = new byte[1];\n noSuchArray[0] = (byte)-1;\n return noSuchArray;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFilenameBytes() {\n java.lang.Object ref = filename_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n filename_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFilenameBytes() {\n java.lang.Object ref = filename_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n filename_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public byte[] getRawContent() {\n try {\n if (this.messageContent == null &&\n this.messageContentBytes == null &&\n this.messageContentObject == null) {\n return null;\n } else if (this.messageContentObject != null ) {\n String messageContent = this.messageContentObject.toString();\n byte[] messageContentBytes;\n ContentType contentTypeHeader =\n (ContentType)this.nameTable.get\n (ContentTypeHeader.NAME.toLowerCase());\n if (contentTypeHeader != null) {\n String charset = contentTypeHeader.getCharset();\n if (charset != null) {\n messageContentBytes = messageContent.getBytes(charset);\n } else {\n messageContentBytes =\n messageContent.getBytes(DEFAULT_ENCODING);\n }\n } else messageContentBytes =\n messageContent.getBytes(DEFAULT_ENCODING);\n return messageContentBytes;\n } else if ( this.messageContent != null ) {\n byte[] messageContentBytes;\n ContentType contentTypeHeader =\n (ContentType)this.nameTable.get\n (ContentTypeHeader.NAME.toLowerCase());\n if (contentTypeHeader != null) {\n String charset = contentTypeHeader.getCharset();\n if (charset != null) {\n messageContentBytes =\n this.messageContent.getBytes(charset);\n } else {\n messageContentBytes =\n this.messageContent.getBytes(DEFAULT_ENCODING);\n }\n } else messageContentBytes =\n this.messageContent.getBytes(DEFAULT_ENCODING);\n return messageContentBytes;\n } else {\n return messageContentBytes;\n }\n } catch (UnsupportedEncodingException ex) {\n InternalErrorHandler.handleException(ex);\n return null;\n }\n }", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "com.google.protobuf.ByteString\n getNameBytes();", "public String getEncoding()\n\t\t{\n\t\t\treturn m_encoding;\n\t\t}", "com.google.protobuf.ByteString\n getArchBytes();", "public String getEncoding() {\n return encoding;\n }", "public String getEncoding() {\n return encoding;\n }" ]
[ "0.62277454", "0.57598037", "0.5650444", "0.5630191", "0.55849653", "0.5582844", "0.5582844", "0.5582844", "0.5582844", "0.5582844", "0.5582844", "0.5582844", "0.5582844", "0.55765873", "0.555839", "0.555839", "0.5524359", "0.5476135", "0.54708356", "0.5469997", "0.5463447", "0.54117316", "0.54117316", "0.5364067", "0.5310063", "0.52954054", "0.5280552", "0.5276504", "0.5269186", "0.52677083", "0.52535254", "0.52467287", "0.5233143", "0.52275157", "0.5226859", "0.5226859", "0.52257496", "0.5188028", "0.5162854", "0.51615274", "0.5158081", "0.5157596", "0.51574886", "0.5136113", "0.5136113", "0.5136113", "0.5136113", "0.5136113", "0.5133422", "0.5129319", "0.5128408", "0.5127663", "0.51215434", "0.50894743", "0.50874823", "0.50858045", "0.5083004", "0.5083004", "0.50813395", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50813144", "0.50721663", "0.5063994", "0.5061216", "0.5059924" ]
0.69107294
0
Sets the data offset.
protected void setDataOffset(long dataOffset) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "88c62ab3-98d7-46cb-8121-80be7def254d"); this.dataOffset = dataOffset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setOffset(double offset);", "public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}", "@Override\r\n public void setOffset(long offset) {\n }", "public void setOffset(int offset) {\r\n this.offset = offset;\r\n }", "public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setByte(int offset, byte data)\n {\n writeMode(offset + 0xA0000, data);\n }", "public void setOffset(int offset) {\n this.offset = offset;\n }", "public void setOffset(double offset) {\n this.offset = offset;\n }", "void setRawOffset(int rawOffset);", "public void setOffset(long offset) {\n cSetOffset(this.cObject, offset);\n }", "public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }", "void setOffset(com.walgreens.rxit.ch.cda.IVLPPDPQ offset);", "public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }", "public void setOffset(Integer offset) {\n this.offset = offset;\n }", "public void setOffset(Integer offset) {\n this.offset = offset;\n }", "public void setOffset(Integer offset) {\n this.offset = offset;\n }", "public void setOffset(final double offset) {\r\n\t\tthis.offset = offset;\r\n\t}", "public void setData(int data) {\n\t\tthis.data = data;\n\t}", "public void setData(int data) {\n this.data = data;\n }", "public void setData(int data) {\n this.data = data;\n }", "public void setData(int data)\n\t {\n\t this.data = data;\n\t }", "void setOffsetPosition(double x, double y, double z);", "@Override\r\n\tpublic void setOffset(IOffset offset) {\n\t\t\r\n\t}", "public void setOffset(int startOffset, int endOffset);", "public void setOffset(ParseTree node, int offset) {\n\t\tthis.offsets.put(node, offset);\n\t}", "public com.twc.bigdata.views.avro.viewing_info.Builder setOffset(java.lang.Long value) {\n validate(fields()[2], value);\n this.offset = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public abstract void setRawOffset(int offsetMillis);", "void setExactOffset(int offset)\n {\n m_source_.setIndex(offset);\n updateInternalState();\n }", "public void setOffset(Long Offset) {\n this.Offset = Offset;\n }", "public void setOffset(Long Offset) {\n this.Offset = Offset;\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setOffset(int value) {\n validate(fields()[6], value);\n this.offset = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public void setOffset(Point2D offset) {\n Point2D oldOffset = this.offset;\n this.offset = offset;\n propertyChangeSupport.firePropertyChange(\"offset\", oldOffset, offset);\n }", "public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }", "public void setOffset(Location value) {\n\t\tthis.pos = value;\n\t}", "public void setOffset(float x, float y, float z)\n\t{\n\t\tx_offset=x;\n\t\ty_offset=y;\n\t\tz_offset=z;\n\t}", "@Override\n public void setData(byte[] data) {\n\tsuper.setData(data);\n\tsetLC(data.length);\n }", "public void setOffset(java.lang.Long value) {\n this.offset = value;\n }", "public static void setCaretPos(DataObject dataObject, int offset) {\n if (dataObject == null) {\n return;\n }\n\n OpenCookie openCookie = dataObject.getCookie(OpenCookie.class);\n openCookie.open();\n if (offset != -1) {\n EditorCookie ec = dataObject.getCookie(EditorCookie.class);\n JEditorPane[] panes = ec.getOpenedPanes();\n if (panes.length > 0) {\n JEditorPane pane = panes[0];\n pane.setCaretPosition(offset);\n return;\n }\n }\n }", "public void setData(byte data) {\n this.data = data;\n }", "public void setData(long value) {\n this.data = value;\n }", "public void setData(Data data) {\n this.data = data;\n }", "public void setInitalOffset(double offset){\n \tmodule.forEach(m -> m.setInitialOffset(offset));\n }", "public void setData(int[] data) {\n this.data = data;\n }", "public Builder setOffset(int value) {\n \n offset_ = value;\n onChanged();\n return this;\n }", "public void setOffset(Point2D offset) {\n\t\tthis.offset.setLocation(offset);\n\t}", "void xsetRawOffset(org.apache.xmlbeans.XmlInt rawOffset);", "public void setOffset(Location value) {\n\t\tgfPos = value;\n\t}", "public void setEndOffset(int offset) {\n this.endOffset = offset;\n }", "public void setData(D data) {\n this.data = data;\n }", "public void setStartOffset(String offset) {\n\t\ttry {\n\t\t\tstartOffset = Integer.parseInt(offset);\n\t\t} catch (Exception e) {\n\t\t\tstartOffset = 0;\n\t\t}\n\t}", "public void setBeginOffset(Integer beginOffset) {\n this.beginOffset = beginOffset;\n }", "public void setOffset(int xOffset, int yOffset) {\n\t\tthis.xOffset = xOffset;\n\t\tthis.yOffset = yOffset;\n\t}", "void setData(byte[] data) {\n this.data = data;\n }", "public void setData(V data){\n\t\tthis.data = data;\n\t}", "public void setData(byte[] data) {\n this.data = data;\n }", "public void setData( E data ) {\n\t\tthis.data = data;\n\t}", "public void setData(Object data) {\n\t\tthis.data = data;\n\t}", "@ZenCodeType.Method\n default void setAt(String name, @ZenCodeType.Nullable IData data) {\n \n put(name, data);\n }", "public void setData(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public void setStartOffset(int offset) {\n this.startOffset = offset;\n }", "public ExtractedSummarySentence setOffset(int offset) {\n this.offset = offset;\n return this;\n }", "public void setData(Object data) {\r\n this.data = data;\r\n }", "public void setData(byte[] data) {\r\n this.bytes = data;\r\n }", "public void setData(E data){\n\t\t\tthis.data = data;\n\t\t}", "public void setData(Object data) {\n this.data = data;\n }", "public final void set(byte[] buff, int offset, int length) {\r\n if (offset < 0) {\r\n throw new IndexOutOfBoundsException(\"ByteSequence index out of range: \" + offset);\r\n }\r\n if (length < 0) {\r\n throw new IndexOutOfBoundsException(\"ByteSequence index out of range: \" + length);\r\n }\r\n if (offset > buff.length - length) {\r\n throw new StringIndexOutOfBoundsException(\"ByteSequence index out of range: \"\r\n + (offset + length));\r\n }\r\n this.buff = Arrays.copyOf(buff, buff.length);\r\n this.offset = offset;\r\n this.length = length;\r\n }", "public abstract void offset(DataType x, DataType y, DataType z);", "public void updatePositioningData(PositioningData data);", "public void setBrukerOffset(int off) {\n mBrukerOffset = off;\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "void setData(byte[] data);", "public void setTypeOffset(short offset) {\n\t\tthis.offset = offset;\n\t}", "public void setData(byte[] d) {\n _data = d;\n }", "@Generated\n @Selector(\"setContentOffset:\")\n void setContentOffset(@ByValue CGPoint value);", "public void write(byte[] data, long offset);", "public void setData(E data)\n {\n this.data = data;\n }", "void setData(T data) {\n\t\tthis.data = data;\n\t}", "public void setData(LinkedHashMap<Integer, Data> data){\r\n\t\tthis.data = data;\r\n\t}", "public void setTransomOffset(IfcLengthMeasure TransomOffset)\n\t{\n\t\tthis.TransomOffset = TransomOffset;\n\t\tfireChangeEvent();\n\t}", "public void set(int addr, byte b) {\n data[addr - start] = b;\n }", "public void setData(IData data) {\n this.data = data;\n }", "private void setOffset(int offsetX, int offsetY) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n }", "void update(byte[] data, int offset, int length);", "public GetACDHistoryRequest setOffset(long d) {\n this.offset = Long.valueOf(d);\n return this;\n }", "public void setData(CellRecord[] data) {\r\n setAttribute(\"data\", data, true);\r\n }", "public int getOffset() {\n\t\treturn OFFSET_MASK & dataOffset;\n\t}", "void xsetAnchorOffset(org.apache.xmlbeans.XmlInt anchorOffset);", "@Override\r\n\tpublic void setData(E data) {\n\t\tthis.data=data;\r\n\t}", "public void setData(int i, int value) {\n data[i] = value;\n }", "void setOffsetWorldPosition(double x, double y, double z);", "public void SetCommentOffset(int comment_offset) {\n comment_offset_ = comment_offset;\n }", "public void setLong(int offset, long value) {\n for (int i = 0; i < 8; ++i) {\n setByte(offset+i, value >>> (8-i-1 << 3));\n }\n }", "@Generated\n @Selector(\"setFetchOffset:\")\n public native void setFetchOffset(@NUInt long value);", "public void setData(Object oData) { m_oData = oData; }", "public void setActualBytePointer(int pos) {\n actualByte = pos;\n }", "void setAnchorOffset(int anchorOffset);", "private void setInt(byte [] buffer, int offset, int value) {\r\n\t\tbuffer[offset++] = (byte)((value & 0xFF000000) >>> 24);\r\n\t\tbuffer[offset++] = (byte)((value & 0x00FF0000) >>> 16);\r\n\t\tbuffer[offset++] = (byte)((value & 0x0000FF00) >>> 8);\r\n\t\tbuffer[offset] = (byte)((value & 0x000000FF));\r\n\t}", "public void setData(String data) {\n _data = data;\n }", "public void moveToId(int offset) {\n\t\tcp.moveToId(offset);\n\t}", "public void set_frag_offset(long frag_offset) {\r\n\t\tfrag_offset_ = frag_offset;\r\n\t}" ]
[ "0.72985846", "0.7284867", "0.7206812", "0.7139489", "0.7138409", "0.7072884", "0.7044474", "0.6966728", "0.69492066", "0.6899694", "0.68915427", "0.6869801", "0.68133", "0.68111414", "0.68111414", "0.68111414", "0.67524815", "0.67123073", "0.6685997", "0.6685997", "0.6679501", "0.6470844", "0.64538723", "0.6446425", "0.63929605", "0.6358049", "0.6338334", "0.63297695", "0.63147616", "0.63147616", "0.6307188", "0.6231446", "0.6208329", "0.61937743", "0.6146986", "0.6128647", "0.6119282", "0.61173004", "0.6079938", "0.6070802", "0.60700506", "0.6061386", "0.604088", "0.60346395", "0.5956016", "0.5947295", "0.5919685", "0.5915269", "0.59043336", "0.5891609", "0.58835506", "0.58651465", "0.5857533", "0.584726", "0.58433586", "0.5830032", "0.5810667", "0.5800605", "0.5783121", "0.5770379", "0.5756504", "0.5755963", "0.5749154", "0.5741592", "0.57406926", "0.5728837", "0.57268167", "0.569415", "0.5692654", "0.5689239", "0.56755567", "0.5663254", "0.5661876", "0.5657735", "0.56300855", "0.5627904", "0.560812", "0.5598446", "0.5598366", "0.55749726", "0.5572799", "0.55413014", "0.55372757", "0.55334246", "0.5533241", "0.55328834", "0.552776", "0.5524659", "0.55173147", "0.55060893", "0.5500317", "0.54953355", "0.5492444", "0.54881793", "0.5485257", "0.5483426", "0.5462114", "0.54581326", "0.54560435", "0.5452931" ]
0.7129988
5
Get the hashCode of the entry. This uses the name as the hashcode.
@Override public int hashCode() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "6ebbad60-c086-483f-99f5-ae1b69cbca99"); return getName().hashCode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int hashCode() {\n return name.hashCode();\n }", "public int hashCode() {\n return name.hashCode();\n }", "public int hashCode(){\n return name.hashCode();\n }", "public int hashCode() {\n int result = 6;\n result = 31 * result * name.hashCode();\n return result;\n }", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }", "@Override\n public int hashCode() {\n return Objects.hash(name);\n }", "public int hashCode()\n {\n return getName().hashCode();\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hashCode(this.name);\n\t}", "public int hashCode()\n {\n return this.getName().hashCode();\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn this.name.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn this.name.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((name == null) ? 0 : name.hashCode());\n\t\treturn result;\n\t}", "@Override\n public int hashCode()\n {\n return new HashCodeBuilder(17, 31).\n append(_name).\n toHashCode();\n }", "@Override\r\n public int hashCode() {\r\n int hash = Objects.hashCode(name);\r\n return hash;\r\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn name.hashCode();\n\t}", "@Override\n public int hashCode() {\n\n final int prime = 31;\n int result = 1;\n result = prime * result + name.hashCode();\n return result;\n }", "public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }", "public int hashCode(){\n int hashcode = name == null ? 0 : name.hashCode() / 2;\n return hashcode += ( value == null ? 0 : value.hashCode()/2 );\n }", "@Override\r\n public int hashCode() {\r\n return this.name.hashCode();\r\n }", "@Override\n public int hashCode() {\n return name.hashCode();\n }", "@Override\r\n public int hashCode() {\n return this.name.hashCode();\r\n }", "@Override\n public final int hashCode() {\n return name != null ? name.hashCode() : 0;\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }", "@Override\n public int hashCode() {\n\treturn getName().hashCode();\n }", "@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}", "@Override\n public int hashCode() {\n return getName().hashCode();\n }", "@Override\n public int hashCode() {\n return Objects.hash(name, type, id);\n }", "public int hashcode(){\r\n\t\t\r\n\t\treturn last_Name.hashcode();\r\n\t}", "public static int getHash(long entry) {\n return (int) (entry >>> 32);\n }", "@Override\n public int hashCode() {\n int result = 31 * this.name.hashCode();\n result += 31 * this.getLocation().getLatitude();\n result += 31 * this.getLocation().getLongitude();\n return result;\n }", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }", "int hashCode();", "int hashCode();", "@Override\n public int getHash(String name) {\n int x = 0;\n int sum = 0;\n while (x < name.length()) {\n sum += name.charAt(x);\n x++;\n }\n int result = sum % size;\n return result;\n }", "public String getHashCode();", "public int hashcode();", "public int hashCode()\r\n {\r\n int hash = super.hashCode();\r\n hash ^= hashValue( m_name );\r\n hash ^= hashValue( m_classname );\r\n if( m_implicit )\r\n {\r\n hash ^= 35;\r\n }\r\n hash ^= hashValue( m_production );\r\n hash ^= hashArray( m_dependencies );\r\n hash ^= hashArray( m_inputs );\r\n hash ^= hashArray( m_validators );\r\n hash ^= hashValue( m_data );\r\n return hash;\r\n }", "@Override\r\n\t public int hashCode()\r\n\t {\n\t final int PRIME = 31;\r\n\t int result = 1;\r\n\t result = (int) (PRIME * result + (getId()==null?\r\n\t \t\tgetName().hashCode()\r\n\t \t\t:getName().hashCode()+getId()));\r\n\t return result;\r\n\t }", "public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }", "@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}", "@Override\n public int hashCode() {\n return new HashCodeBuilder(17, 37)\n .append(getName())\n .append(getType())\n .toHashCode();\n }", "public int hashCode() {\n\treturn name.hashCode() ^ style ^ size;\n }", "@Override public int hashCode() {\r\n int result = 17;\r\n result = 31 * result + fID;\r\n result = 31 * result + fName.hashCode();\r\n return result;\r\n }", "@Override\n public int hashCode() {\n // Declare hash and assign value\n int hash = 7;\n // Generate hash integer\n hash = 31 * hash + (int) this.getCrossingTime();\n hash = 31 * hash + (this.getName() == null ? 0 : this.getName().hashCode());\n return hash;\n }", "@Override\n public int hashCode() {\n return Objects.hash(name, x, y, w, h, r, g, b);\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 71 * hash + this.id;\n hash = 71 * hash + Objects.hashCode(this.name);\n hash = 71 * hash + Objects.hashCode(this.cash);\n hash = 71 * hash + Objects.hashCode(this.skills);\n hash = 71 * hash + Objects.hashCode(this.potions);\n return hash;\n }", "@Override\n public int hashCode() {\n\n return Objects.hash(name, surname);\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((name == null) ? 0 : name.hashCode());\n result = prime * result + ((identifierPrefix == null) ? 0 : identifierPrefix.hashCode());\n return result;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}", "public int hashCode() {\n if (hash == -1) {\n hash = 0;\n byte b[] = packet.getData();\n int len = b.length;\n for (int ix = 0; ix < len; ix++) {\n\thash = 31 * hash + b[ix];\n }\n hash ^= (packet.getAddress().hashCode() ^\n\t (packet.getPort() << 15) ^\n\t (packet.getLength() << 3) ^\n\t (packet.getOffset() << 8));\n }\n return hash;\n }", "public int hashCode() {\n int result = 17;\n result = 37 * result + column;\n result = 37 * result + sortOrder.hashCode();\n return result;\n }", "public int hashCode() {\n\t\treturn hashString.hashCode();\n\t}", "@Override\r\n\tpublic int hashCode() {\r\n\t\treturn Objects.hash(name,surname);\r\n\t}", "public static long hashName(String name) {\n\t\t\tlong res = 123;\n\t\t\tfor (int i = 0; i < name.length(); ++i) {\n\t\t\t\tres = (res << 8) | (res >>> 56);\n\t\t\t\tres += name.charAt(i);\n\t\t\t\tif ((res & 1) == 0) {\n\t\t\t\t\tres ^= 0x00000000feabfeabL; // Some kind of feedback\n\t\t\t\t}\n\t\t\t}\n\t\t\tres |= 0x8000000000000000L; // Make sure the hash is negative (to distinguish it from database id's)\n\t\t\treturn res;\n\t\t}", "int\thashCode();", "public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }", "public int hashCode() {\n return hash.hashCode();\n }", "public int hashCode() {\n int hash = 0;\n hash = width;\n hash <<= 8;\n hash ^= height;\n hash <<= 8;\n hash ^= numBands;\n hash <<= 8;\n hash ^= dataType;\n hash <<= 8;\n for (int i = 0; i < bandOffsets.length; i++) {\n hash ^= bandOffsets[i];\n hash <<= 8;\n }\n for (int i = 0; i < bankIndices.length; i++) {\n hash ^= bankIndices[i];\n hash <<= 8;\n }\n hash ^= numBands;\n hash <<= 8;\n hash ^= numBanks;\n hash <<= 8;\n hash ^= scanlineStride;\n hash <<= 8;\n hash ^= pixelStride;\n return hash;\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tint hash = 1;\r\n hash = hash * 17 + (name == null ? 0 : name.hashCode());\r\n hash = hash * 13 + (duration);\r\n return hash;\r\n\t}", "public int getHashCode(int key){\n return key;\n }", "public int hashCode() {\n return Objects.hashCode(this);\n }", "public int hashCode() {\n\t\treturn toString().hashCode();\n\t}", "private int getHash() {\n return (name + FluentIterable.from(getDimensions()).transform(new Function<CloudConfigurationDimension, String>() {\n @Override\n public String apply(CloudConfigurationDimension dimension) {\n return getStringRepresentation(dimension);\n }\n }).toString()).hashCode();\n }", "public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getProjectName());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getDataProvider());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getPrimaryInvestigator());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getCreatedBy());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getCreatedTime());\n return (int)(hash % Integer.MAX_VALUE);\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((domain == null) ? 0 : domain.hashCode());\n\t\tresult = prime * result + ((name == null) ? 0 : name.hashCode());\n\t\tresult = prime * result + ((path == null) ? 0 : path.hashCode());\n\t\treturn result;\n\t}", "public int hashCode() {\n try {\n int res = 0;\n byte[] array = getEncoded();\n for (int i=0; i<array.length; i++) {\n res += array[i] & 0xFF;\n }\n return res;\n } catch (CRLException e) {\n return 0;\n }\n }", "@Override\n public int hashCode() {\n int result;\n long temp;\n result = type.hashCode();\n result = 31 * result + (name != null ? name.hashCode() : 0);\n result = 31 * result + (mainColor != null ? mainColor.hashCode() : 0);\n result = 31 * result + (material != null ? material.hashCode() : 0);\n result = 31 * result + (origin != null ? origin.hashCode() : 0);\n temp = Double.doubleToLongBits(price);\n result = 31 * result + (int) (temp ^ (temp >>> 32));\n result = 31 * result + Arrays.hashCode(ageDelta);\n return result;\n }", "int computeHashCode(byte val);", "@Override\r\n public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + ((name == null) ? 0 : name.hashCode());\r\n result = prime * result + ((phoneNo == null) ? 0 : phoneNo.hashCode());\r\n return result;\r\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 89 * hash + Objects.hashCode(this.recipentQualifiedName);\n return hash;\n }", "@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }", "public int hashCode() {\n int n = 0;\n int n2 = this.userName != null ? this.userName.hashCode() : 0;\n int n3 = this.date != null ? this.date.hashCode() : 0;\n int n4 = this.sys != null ? this.sys.hashCode() : 0;\n int n5 = this.dia != null ? this.dia.hashCode() : 0;\n if (this.pulse != null) {\n n = this.pulse.hashCode();\n }\n return (((n2 * 31 + n3) * 31 + n4) * 31 + n5) * 31 + n;\n }", "public synchronized int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n public int hashCode() {\n return Objects.hash(name, tags);\n }", "public int hashCode() {\n\t\treturn BeanTools.createHashcode(id, consultContent, consultTime);\r\n\t}", "public int hashCode()\n {\n return hash;\n }", "@Override\r\n public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + ((getShareholderid() == null) ? 0 : getShareholderid().hashCode());\r\n result = prime * result + ((getName() == null) ? 0 : getName().hashCode());\r\n result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());\r\n result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());\r\n result = prime * result + ((getHoldscale() == null) ? 0 : getHoldscale().hashCode());\r\n result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());\r\n result = prime * result + ((getIdimgZ() == null) ? 0 : getIdimgZ().hashCode());\r\n result = prime * result + ((getIdimgF() == null) ? 0 : getIdimgF().hashCode());\r\n result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());\r\n return result;\r\n }", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }", "@Override\n public int hashCode() {\n return Objects.hash(this.name, this.collectionOfCurrentListings, this.commissionRate, this.totalEarnings);\n }", "public int hashCode() {\r\n\t\treturn this.value().hashCode();\r\n\t}", "public int hashCode() {\n int result = 1;\n Object $pageSize = this.getPageSize();\n result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());\n Object $pageNo = this.getPageNo();\n result = result * 59 + ($pageNo == null ? 43 : $pageNo.hashCode());\n Object $sort = this.getSort();\n result = result * 59 + ($sort == null ? 43 : $sort.hashCode());\n Object $orderByField = this.getOrderByField();\n result = result * 59 + ($orderByField == null ? 43 : $orderByField.hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n\n if (this.hashCode == null) {\n int hashCode = this.symbol.hashCode();\n\n if (this.isLookahead) {\n hashCode *= 109;\n }\n\n this.hashCode = hashCode;\n }\n\n return this.hashCode;\n }", "public int hashCode() {\n if (getInternalValue() == null) {\n return -3;\n }\n else {\n return super.hashCode();\n }\n }", "public int hashCode() {\n int result = 17;\n\n if (_address != null) {\n result = 37 * result + _address.hashCode();\n }\n\n return result;\n }", "public int hashCode() {\n\t\treturn this.eid + 25;\n\t}", "public int getHashCode(){\n return hashCode();\n }", "public int hashCode()\r\n/* 124: */ {\r\n/* 125:126 */ return this.id;\r\n/* 126: */ }", "@Override\n public int hashCode() {\n int hash = 0;\n hash += (this.units != null ? this.units.hashCode() : 0);\n hash += (this.name != null ? this.name.hashCode() : 0);\n hash += (this.datasetId != null ? this.datasetId.hashCode() : 0);\n return hash;\n }", "public int hashCode(){\n\t\treturn toString().hashCode();\n\t}", "public int hashCode() {\n/* 254 */ if (this.hashCode == 0) {\n/* 255 */ int i = 17;\n/* 256 */ i = 37 * i + this.methodName.hashCode();\n/* 257 */ if (this.argClasses != null) {\n/* 258 */ for (byte b = 0; b < this.argClasses.length; b++)\n/* */ {\n/* 260 */ i = 37 * i + ((this.argClasses[b] == null) ? 0 : this.argClasses[b].hashCode());\n/* */ }\n/* */ }\n/* 263 */ this.hashCode = i;\n/* */ } \n/* 265 */ return this.hashCode;\n/* */ }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());\n result = prime * result + ((getName() == null) ? 0 : getName().hashCode());\n result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());\n result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());\n result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());\n return result;\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((getId() == null) ? 0 : getId().hashCode());\n result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());\n result = prime * result + ((getSysId() == null) ? 0 : getSysId().hashCode());\n result = prime * result + ((getMenuName() == null) ? 0 : getMenuName().hashCode());\n result = prime * result + ((getPageUrl() == null) ? 0 : getPageUrl().hashCode());\n result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());\n result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());\n result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());\n return result;\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tfinal int prime = 31;\r\n\t\tint result = 1;\r\n\t\tresult = prime * result + chunkNumber;\r\n\t\tresult = prime * result + ((fileID == null) ? 0 : fileID.hashCode());\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic int hashCode()\n\t{\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((cars == null) ? 0 : cars.hashCode());\n\t\tresult = prime * result + ((location == null) ? 0 : location.hashCode());\n\t\tresult = prime * result + ((name == null) ? 0 : name.hashCode());\n\t\tresult = prime * result + ((userId == null) ? 0 : userId.hashCode());\n\t\treturn result;\n\t}", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (projectId != null ? projectId.hashCode() : 0);\n return hash;\n }" ]
[ "0.75660825", "0.74645215", "0.74086535", "0.73670536", "0.7336104", "0.7185847", "0.7172561", "0.71545327", "0.7128322", "0.7122505", "0.71062714", "0.71062714", "0.7082472", "0.70677656", "0.7059514", "0.7052404", "0.702192", "0.7010996", "0.6992051", "0.6978449", "0.69234425", "0.69115645", "0.6867092", "0.6821613", "0.67125756", "0.6707285", "0.6679874", "0.6679761", "0.6638667", "0.66342604", "0.6592141", "0.657077", "0.657077", "0.657077", "0.657077", "0.6537897", "0.65345126", "0.65345126", "0.6521292", "0.6507507", "0.6482384", "0.64545757", "0.6451656", "0.6437578", "0.64321715", "0.6432159", "0.64316833", "0.6427889", "0.6361773", "0.63508993", "0.63452536", "0.6326745", "0.63167447", "0.6309093", "0.6294118", "0.6293891", "0.6290911", "0.6290107", "0.62737435", "0.62570065", "0.6204788", "0.620263", "0.6202173", "0.6200758", "0.6200098", "0.6191897", "0.61903507", "0.6179103", "0.61704", "0.61693716", "0.61619675", "0.6160562", "0.61398965", "0.61344475", "0.61329824", "0.61320454", "0.6130077", "0.61289585", "0.6121511", "0.61212516", "0.6108349", "0.61055744", "0.6100849", "0.60996664", "0.6090966", "0.6073908", "0.6067863", "0.60590184", "0.6056917", "0.60520136", "0.6050245", "0.6042591", "0.6039158", "0.6031788", "0.60151505", "0.6013124", "0.6005563", "0.6004308", "0.6003701", "0.59965086" ]
0.6787289
24
The "general purpose bit" field.
public GeneralPurposeBit getGeneralPurposeBit() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "892f16be-9f3a-431a-a6d9-28dcc530435b"); return gpb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BitField getBitField(){\n \treturn bitField;\n }", "public int getBit() {\r\n return _bit;\r\n }", "public interface BitField {\n\n /**\n * @return the size of the field\n */\n int size();\n\n /**\n * set all values of the BitField with the rightmost value being index 0 (LSB).\n * example set(0,0,0,1) would set bit0 == 1 and bit3 == 0\n *\n * @param values the values to set the BitField (only 0 and 1 are accepted)\n * @return the BitField\n */\n void setBits(int... values);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value true == 1, false == 0\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, boolean value);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value (only 0 and 1 are accepted)\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, int value);\n\n /**\n * replace all values of the bitfield with this integer value\n *\n * @param val\n * @return\n */\n void setToValue(int val);\n\n /**\n * invert all the bits\n */\n void invertAllBits();\n\n /**\n * get a given bit as a boolean\n *\n * @param index\n * @return a boolean for the bit (true == 1, false == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n boolean getBit(int index);\n\n /**\n * get a given bit as a 0 or 1\n *\n * @param index\n * @return a value for the bit (1 == 1, 0 == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n int getBitAsInt(int index);\n\n /**\n * get the field as an integer\n *\n * @return the int value of the bitfield\n */\n int intValue();\n\n /**\n * return a nice string representation of the field\n *\n * @return\n */\n String asString();\n\n /**\n * get the LSBs of the BitField (if possible)\n *\n * @param digits the number of LSBs to return\n * @return a new BitField of the LSBs\n */\n BitField getLSBs(int digits);\n\n /**\n * get the MSBs of the BitField (if possible)\n *\n * @param digits the number of MSBs to return\n * @return a new BitField of the MSBs\n */\n BitField getMSBs(int digits);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (max is the size-1 of the field)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubField(int from, int to);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (if > size then we pad with 0's)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubFieldWithPadding(int from, int to);\n\n /**\n * a convenience method to add to the LS Bits of the BitField.\n * this will resize the BitField, shift everything to the left and insert\n * the new BitField\n *\n * @param fieldToAddToTheRight\n */\n void shiftAndAddToRight(BitField fieldToAddToTheRight);\n\n /**\n * shift to the left and pad the new LSBs with 0's\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftLeft(int numberToShift);\n\n /**\n * shift to the right and have the LSBs dissapear\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftRight(int numberToShift);\n\n /**\n * resize, but trimming/adding to the MSB side\n * <p>\n * if newSize > currentSize, we pad with 0's on the MSBs\n * if newSize < currentSize, we simply drop the bits on the left\n *\n * @param newSize the new size of the BitField\n */\n void resize(int newSize);\n\n /**\n * copy the BitField\n *\n * @return a copy of the bitField\n */\n BitField copy();\n\n /**\n * convert the bit field and return as a collection of bytes made up from the BitField from the LSB to the MSB. Padding in the MSB if needed\n * (byte == 8 bits).\n * <p>\n * For example:\n * 00001000 would return a list with a single byte value of 8\n * 1000001000 would return a list with the first value being a byte with a value of 8, then one with a value of 2\n *\n * @return a collection with the LSB in position 0 and the MSB as the last value\n */\n List<Byte> getAsBytes();\n\n}", "boolean getBit(int index);", "public void setBitField(BitField bitField){\n \tthis.bitField=bitField;\n }", "@Override public byte isBitShape(Type t) { throw AA.unimpl(); }", "@Test\n public void testDiagnosisCodeBitFlags() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setBitFlags,\n RdaFissDiagnosisCode::getBitFlags,\n RdaFissDiagnosisCode.Fields.bitFlags,\n 4);\n }", "int getBitAsInt(int index);", "public boolean \ngetFlag( int pFlagNumber ) {\n return ( (fFlagBox & (1 << pFlagNumber)) != 0 );\n}", "public int bitAt(int i) {\n // PUT YOUR CODE HERE\n }", "protected boolean getBit(long word, long position) {\n\t\treturn (word & (1L << position)) != 0;\n\t}", "BitSet valueLeafFlags();", "BitSet valueLeafFlags();", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:53.096 -0500\", hash_original_method = \"AD601F3532730C1588B10C0B2F4700C0\", hash_generated_method = \"7CF3579665197E3D9616E88D35150E2D\")\n \npublic ASN1BitString() {\n super(TAG_BITSTRING);\n }", "int getOneof1110();", "private Bits32() {\r\n }", "public abstract int getBitSize();", "abstract boolean testBit(int index);", "public Value restrictToStrBoolNum() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.object_labels = r.getters = r.setters = null;\n r.flags &= STR | BOOL | NUM;\n return canonicalize(r);\n }", "public FormatableBitSet(int numBits)\n \t{\n \t\tinitializeBits(numBits);\n \t}", "void writeBit(int bit) throws IOException;", "private static int mask(int bit) {\n return MSB >>> bit;\n }", "public Unsigned128BitType()\n\t{\n\t\tthis( 0, 0 );\n\t}", "public void visit(BitField bf);", "public static byte getMybit(byte val, int pos){\n return (byte) ((val >> pos) & 1);\n }", "public int getBit(int pos) {\r\n\t\treturn flagBits[pos];\r\n\t\t\r\n\t}", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "default BitStream bitStream() {\n return bitStream(0);\n }", "int getBitPosition() {\r\n\t\treturn bitPosition;\r\n\t}", "protected boolean getBit(long bitIndex) {\r\n\t long intIndex = (bitIndex >>> ADDRESS_BITS_PER_UNIT);\r\n\t return ((bits[(int)(intIndex / ONE_MB_INTS)][(int)(intIndex % ONE_MB_INTS)] \r\n\t & (1 << (bitIndex & BIT_INDEX_MASK))) != 0);\r\n\t }", "void setBit(int index, int value);", "public abstract int flags();", "boolean getBit(int bitIndex) {\r\n return bits.get(bitIndex);\r\n }", "public int getFlags();", "public int getFlags();", "public static int getBit(boolean value) {\n return value ? Constants.BIT_TRUE : Constants.BIT_FALSE;\n }", "@Override\r\n\tpublic InfoBit[] getAdditionalInfoBit() {\n\t\treturn null;\r\n\t}", "protected long setBit(long word, boolean flag, long position) {\n\t\tif (!flag) {\n\t\t\treturn word & (~(1L << position));\n\t\t}\n\t\treturn word | (1L << position);\n\t}", "public Bit_Interface(String stage)\n {\n super(stage);\n }", "protected final void operationBIT(final int data) {\r\n this.signFlag = data >= 0x80;\r\n this.overflowFlag = (data & 0x40) > 0;\r\n this.zeroFlag = (this.ac & data) == 0;\r\n }", "long getFlags();", "boolean m19264c() {\n return (getState() & 12) != 0;\n }", "void setBit(int index, boolean value);", "public BitSet getBGenotype() {\n return this.m_Genotype;\n }", "public long getFlags() {\n }", "int getOneof1101();", "public static String getBits(short f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n short mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "public void setGeneralPurposeBit(final GeneralPurposeBit b) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"ba5ac644-8158-4d0a-afb5-466e2a767476\");\n gpb = b;\n }", "public String toString()\n\t{\n\t\tString binary = \"\"; //string to store the binary number\n\t\t\n\t\t//loops through each of the bit positions\n\t\tfor (int i=binaryCode.length-1; i>=0; i--)\n\t\t{\n\t\t\t\n\t\t\t//checks the value of the bit\n\t\t\tif (binaryCode[i]==false)\n\t\t\t{\n\t\t\t\t//if the boolean is false, then the bit is a 0\n\t\t\t\tbinary+=\"0\";\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//since there are only two states, if it is not 0, then it is 1\n\t\t\t\tbinary+=\"1\";\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t//returns the binary number as a string\n\t\treturn binary;\n\t}", "public Code()\n\t{\n\t\tbits = new ArrayList<Boolean>();\n\t}", "public static int offsetBits_dataType() {\n return 0;\n }", "public String toString()\n\t{\n\t\treturn Integer.toString(bitHolder.getValue());\n\t}", "public static String getBits(byte f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n byte mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "protected String getBitLength()\n {\n return bitLength;\n }", "public int bits() {\n return mat.getType().getBits();\n }", "int getOneof1011();", "java.lang.String getField1101();", "public static String getBits(long f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n long mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "public void setBitField(byte[] byteField){\n \tbitField.setBitField(byteField);;\n }", "public Unsigned128BitType( final LongAccess access )\n\t{\n\t\tthis( ( NativeImg< ?, ? extends LongAccess > ) null );\n\t\tdataAccess = access;\n\t}", "public boolean isValid(){\n\t\treturn validBit;\n\t}", "public ArrayList<Boolean> getCode()\n\t{\n\t\treturn bits;\n\t}", "public Unsigned128BitType( final NativeImg< ?, ? extends LongAccess > bitStorage )\n\t{\n\t\ti = new Index();\n\t\timg = bitStorage;\n\t}", "public abstract boolean getFilled();", "String byteOrBooleanWrite();", "public static int getBit(byte input,int position){\n return (input >> position) & 1;\n }", "int getOneof1128();", "public abstract boolean testRightmostBit();", "public boolean hasDefaultLong1() {\n return fieldSetFlags()[0];\n }", "public UnmodifiableBitSet setBit(int i){\n\t\tUnmodifiableBitSet nbs = (UnmodifiableBitSet)this.clone();\n\t\tnbs.setBitInn(i);\n\t\treturn nbs;\n\t}", "@Test\n public void shouldParseBIT() {\n printTest(\"shouldParseBIT()\");\n String typeString = getDataTypeString(DataTypes.DTYPE_BIT);\n String content = typeString;\n\n DdlTokenStream tokens = getTokens(content);\n\n DataType dType = parser.parse(tokens);\n\n Assert.assertNotNull(\"DataType was NOT found for Type = \" + typeString, dType);\n Assert.assertEquals(\"Wrong DataType found\", typeString, dType.getName());\n }", "int getOneof1111();", "static boolean getBit(int num, int pos) {\n\t\t\treturn ((num & (1<<pos)) != 0) ;\n\t\t}", "int getOneof1072();", "public abstract boolean mo66253b();", "Integer getBitRate() {\n return bitRate;\n }", "@Test\n public void encodeAsBitSet()\n {\n int value = 6;\n final BinaryEncoder encoder = new BinaryEncoder(16);\n\n BitSet result = encoder.encodeAsBitSet(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n assertFalse(result.get(0));\n assertTrue(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsBitSet(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n // 0100 Best fit into 4 digits; ignores higher bits.\n assertFalse(result.get(0));\n assertFalse(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n }", "protected boolean bitAt(final int bitIndex) {\n return _getBit(_bitMap,\n \t\t\t (Numbers.INTEGER_WIDTH*8-1)-bitIndex-1);\n }", "java.lang.String getField1011();", "public int getBitOffset() {\r\n\t\treturn bitOffset;\r\n\t}", "public interface BitOutput {\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a 1-bit boolean value. This method writes {@code 0b1} for {@code true}\n\t * and {@code 0b0} for {@code false}.\n\t *\n\t * @param value the value to write.\n\t * @throws IOException if an I/O error occurs\n\t */\n\tvoid writeBoolean( boolean value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a {@code byte} value.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 7 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeByte( boolean unsigned, int size, byte value ) throws IOException;\n\n\t/**\n\t * Writes a {@code short} value.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 15 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeShort( boolean unsigned, int size, short value ) throws IOException;\n\n\t/**\n\t * Writes an {@code int} value. Only the lower specified number of bits are\n\t * written.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 31 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeInt( boolean unsigned, int size, int value ) throws IOException;\n\n\t/**\n\t * Writes a {@code long} value. Only the lower specified number of bits are\n\t * written.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of valid bits for value; between {@code 1} and\n\t * {@code 63 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeLong( boolean unsigned, int size, long value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a {@code char} value.\n\t *\n\t * @param size the number of bits for value; between {@code 1} and {@code 16},\n\t * both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeChar( int size, char value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Aligns to specified number of bytes by padding zero bits.\n\t *\n\t * @param bytes the number of bytes to align; must be positive.\n\t * @return the number of zero bits padded while aligning.\n\t * @throws IllegalArgumentException if {@code bytes} is less than or equals to\n\t * {@code 0}.\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tlong align( int bytes ) throws IOException;\n}", "private void setIsBinary(boolean value) {\r\n\t \t_isBinary = value;\r\n\t }", "int getHighBitLength();", "int getOneof1010();", "public static byte set(byte value, int bit){\n return (byte)(value|(1<<bit));\n }", "private int signBit() {\n return signum < 0 ? 1 : 0;\n }", "int getOneof1281();", "int getFlag();", "int getOneof2128();", "static int setBit(int n, int pos){\n return n | (1<<pos);\n }", "BoolConstant createBoolConstant();", "int getOneof1663();", "public int getBitStrength()\n {\n return keyStrength;\n }", "private static int getBit(int pack, int pos) {\n\t\treturn (pack & (1 << pos)) != 0 ? 1 : 0;\n\t}", "boolean getField0();", "int getOneof1658();", "public static String getBits(int f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n int mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "int getLowBitLength();", "@Override\n public BinaryType andBool(BoolType BoolType) {\n return TypeFactory.getBinaryType(BoolType.getValue() ? this.getValue() : \"0000000000000000\");\n }", "public static int getBitMask(int x) {\n return (0x01 << x);\n }" ]
[ "0.7216197", "0.70997024", "0.67219", "0.63659066", "0.62399864", "0.62192094", "0.61413777", "0.61381483", "0.6121582", "0.6054189", "0.60430276", "0.6013286", "0.6013286", "0.5965796", "0.59391516", "0.5930953", "0.5920417", "0.58738166", "0.58682734", "0.5859299", "0.5857649", "0.5839379", "0.58349836", "0.5819375", "0.58101434", "0.57865655", "0.5769255", "0.5761522", "0.57152194", "0.5715175", "0.5707324", "0.57012886", "0.5695606", "0.5688143", "0.5688143", "0.5684138", "0.5675269", "0.56577015", "0.5646777", "0.5620678", "0.5605006", "0.56049275", "0.5601986", "0.5597724", "0.5593171", "0.55907005", "0.55862623", "0.5584588", "0.55841947", "0.55689865", "0.5563172", "0.55623513", "0.5555686", "0.5550849", "0.5544507", "0.55239373", "0.55230635", "0.5522279", "0.5518455", "0.55082315", "0.54963243", "0.54859996", "0.5473478", "0.5469522", "0.5448319", "0.544698", "0.5446088", "0.5444105", "0.54429376", "0.5442669", "0.5437073", "0.5432902", "0.5432559", "0.54266405", "0.5419739", "0.5415169", "0.5411373", "0.5404706", "0.5404444", "0.539697", "0.53953373", "0.53918624", "0.5390063", "0.53880954", "0.5386346", "0.5383497", "0.5380476", "0.5378886", "0.5377571", "0.53721917", "0.5371814", "0.53644717", "0.5363511", "0.53593194", "0.535391", "0.53538233", "0.53504777", "0.5349791", "0.5347381", "0.5346713" ]
0.6528714
3
The "general purpose bit" field.
public void setGeneralPurposeBit(final GeneralPurposeBit b) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "ba5ac644-8158-4d0a-afb5-466e2a767476"); gpb = b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BitField getBitField(){\n \treturn bitField;\n }", "public int getBit() {\r\n return _bit;\r\n }", "public interface BitField {\n\n /**\n * @return the size of the field\n */\n int size();\n\n /**\n * set all values of the BitField with the rightmost value being index 0 (LSB).\n * example set(0,0,0,1) would set bit0 == 1 and bit3 == 0\n *\n * @param values the values to set the BitField (only 0 and 1 are accepted)\n * @return the BitField\n */\n void setBits(int... values);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value true == 1, false == 0\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, boolean value);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value (only 0 and 1 are accepted)\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, int value);\n\n /**\n * replace all values of the bitfield with this integer value\n *\n * @param val\n * @return\n */\n void setToValue(int val);\n\n /**\n * invert all the bits\n */\n void invertAllBits();\n\n /**\n * get a given bit as a boolean\n *\n * @param index\n * @return a boolean for the bit (true == 1, false == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n boolean getBit(int index);\n\n /**\n * get a given bit as a 0 or 1\n *\n * @param index\n * @return a value for the bit (1 == 1, 0 == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n int getBitAsInt(int index);\n\n /**\n * get the field as an integer\n *\n * @return the int value of the bitfield\n */\n int intValue();\n\n /**\n * return a nice string representation of the field\n *\n * @return\n */\n String asString();\n\n /**\n * get the LSBs of the BitField (if possible)\n *\n * @param digits the number of LSBs to return\n * @return a new BitField of the LSBs\n */\n BitField getLSBs(int digits);\n\n /**\n * get the MSBs of the BitField (if possible)\n *\n * @param digits the number of MSBs to return\n * @return a new BitField of the MSBs\n */\n BitField getMSBs(int digits);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (max is the size-1 of the field)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubField(int from, int to);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (if > size then we pad with 0's)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubFieldWithPadding(int from, int to);\n\n /**\n * a convenience method to add to the LS Bits of the BitField.\n * this will resize the BitField, shift everything to the left and insert\n * the new BitField\n *\n * @param fieldToAddToTheRight\n */\n void shiftAndAddToRight(BitField fieldToAddToTheRight);\n\n /**\n * shift to the left and pad the new LSBs with 0's\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftLeft(int numberToShift);\n\n /**\n * shift to the right and have the LSBs dissapear\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftRight(int numberToShift);\n\n /**\n * resize, but trimming/adding to the MSB side\n * <p>\n * if newSize > currentSize, we pad with 0's on the MSBs\n * if newSize < currentSize, we simply drop the bits on the left\n *\n * @param newSize the new size of the BitField\n */\n void resize(int newSize);\n\n /**\n * copy the BitField\n *\n * @return a copy of the bitField\n */\n BitField copy();\n\n /**\n * convert the bit field and return as a collection of bytes made up from the BitField from the LSB to the MSB. Padding in the MSB if needed\n * (byte == 8 bits).\n * <p>\n * For example:\n * 00001000 would return a list with a single byte value of 8\n * 1000001000 would return a list with the first value being a byte with a value of 8, then one with a value of 2\n *\n * @return a collection with the LSB in position 0 and the MSB as the last value\n */\n List<Byte> getAsBytes();\n\n}", "public GeneralPurposeBit getGeneralPurposeBit() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"892f16be-9f3a-431a-a6d9-28dcc530435b\");\n return gpb;\n }", "boolean getBit(int index);", "public void setBitField(BitField bitField){\n \tthis.bitField=bitField;\n }", "@Override public byte isBitShape(Type t) { throw AA.unimpl(); }", "@Test\n public void testDiagnosisCodeBitFlags() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setBitFlags,\n RdaFissDiagnosisCode::getBitFlags,\n RdaFissDiagnosisCode.Fields.bitFlags,\n 4);\n }", "int getBitAsInt(int index);", "public boolean \ngetFlag( int pFlagNumber ) {\n return ( (fFlagBox & (1 << pFlagNumber)) != 0 );\n}", "public int bitAt(int i) {\n // PUT YOUR CODE HERE\n }", "protected boolean getBit(long word, long position) {\n\t\treturn (word & (1L << position)) != 0;\n\t}", "BitSet valueLeafFlags();", "BitSet valueLeafFlags();", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:53.096 -0500\", hash_original_method = \"AD601F3532730C1588B10C0B2F4700C0\", hash_generated_method = \"7CF3579665197E3D9616E88D35150E2D\")\n \npublic ASN1BitString() {\n super(TAG_BITSTRING);\n }", "int getOneof1110();", "private Bits32() {\r\n }", "public abstract int getBitSize();", "abstract boolean testBit(int index);", "public Value restrictToStrBoolNum() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.object_labels = r.getters = r.setters = null;\n r.flags &= STR | BOOL | NUM;\n return canonicalize(r);\n }", "public FormatableBitSet(int numBits)\n \t{\n \t\tinitializeBits(numBits);\n \t}", "void writeBit(int bit) throws IOException;", "private static int mask(int bit) {\n return MSB >>> bit;\n }", "public Unsigned128BitType()\n\t{\n\t\tthis( 0, 0 );\n\t}", "public void visit(BitField bf);", "public static byte getMybit(byte val, int pos){\n return (byte) ((val >> pos) & 1);\n }", "public int getBit(int pos) {\r\n\t\treturn flagBits[pos];\r\n\t\t\r\n\t}", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "default BitStream bitStream() {\n return bitStream(0);\n }", "int getBitPosition() {\r\n\t\treturn bitPosition;\r\n\t}", "protected boolean getBit(long bitIndex) {\r\n\t long intIndex = (bitIndex >>> ADDRESS_BITS_PER_UNIT);\r\n\t return ((bits[(int)(intIndex / ONE_MB_INTS)][(int)(intIndex % ONE_MB_INTS)] \r\n\t & (1 << (bitIndex & BIT_INDEX_MASK))) != 0);\r\n\t }", "void setBit(int index, int value);", "public abstract int flags();", "boolean getBit(int bitIndex) {\r\n return bits.get(bitIndex);\r\n }", "public int getFlags();", "public int getFlags();", "public static int getBit(boolean value) {\n return value ? Constants.BIT_TRUE : Constants.BIT_FALSE;\n }", "@Override\r\n\tpublic InfoBit[] getAdditionalInfoBit() {\n\t\treturn null;\r\n\t}", "protected long setBit(long word, boolean flag, long position) {\n\t\tif (!flag) {\n\t\t\treturn word & (~(1L << position));\n\t\t}\n\t\treturn word | (1L << position);\n\t}", "public Bit_Interface(String stage)\n {\n super(stage);\n }", "protected final void operationBIT(final int data) {\r\n this.signFlag = data >= 0x80;\r\n this.overflowFlag = (data & 0x40) > 0;\r\n this.zeroFlag = (this.ac & data) == 0;\r\n }", "long getFlags();", "boolean m19264c() {\n return (getState() & 12) != 0;\n }", "void setBit(int index, boolean value);", "public BitSet getBGenotype() {\n return this.m_Genotype;\n }", "public long getFlags() {\n }", "int getOneof1101();", "public static String getBits(short f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n short mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "public String toString()\n\t{\n\t\tString binary = \"\"; //string to store the binary number\n\t\t\n\t\t//loops through each of the bit positions\n\t\tfor (int i=binaryCode.length-1; i>=0; i--)\n\t\t{\n\t\t\t\n\t\t\t//checks the value of the bit\n\t\t\tif (binaryCode[i]==false)\n\t\t\t{\n\t\t\t\t//if the boolean is false, then the bit is a 0\n\t\t\t\tbinary+=\"0\";\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//since there are only two states, if it is not 0, then it is 1\n\t\t\t\tbinary+=\"1\";\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t//returns the binary number as a string\n\t\treturn binary;\n\t}", "public Code()\n\t{\n\t\tbits = new ArrayList<Boolean>();\n\t}", "public static int offsetBits_dataType() {\n return 0;\n }", "public String toString()\n\t{\n\t\treturn Integer.toString(bitHolder.getValue());\n\t}", "public static String getBits(byte f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n byte mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "protected String getBitLength()\n {\n return bitLength;\n }", "public int bits() {\n return mat.getType().getBits();\n }", "java.lang.String getField1101();", "int getOneof1011();", "public static String getBits(long f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n long mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "public void setBitField(byte[] byteField){\n \tbitField.setBitField(byteField);;\n }", "public Unsigned128BitType( final LongAccess access )\n\t{\n\t\tthis( ( NativeImg< ?, ? extends LongAccess > ) null );\n\t\tdataAccess = access;\n\t}", "public boolean isValid(){\n\t\treturn validBit;\n\t}", "public ArrayList<Boolean> getCode()\n\t{\n\t\treturn bits;\n\t}", "public Unsigned128BitType( final NativeImg< ?, ? extends LongAccess > bitStorage )\n\t{\n\t\ti = new Index();\n\t\timg = bitStorage;\n\t}", "public abstract boolean getFilled();", "String byteOrBooleanWrite();", "int getOneof1128();", "public static int getBit(byte input,int position){\n return (input >> position) & 1;\n }", "public boolean hasDefaultLong1() {\n return fieldSetFlags()[0];\n }", "public abstract boolean testRightmostBit();", "public UnmodifiableBitSet setBit(int i){\n\t\tUnmodifiableBitSet nbs = (UnmodifiableBitSet)this.clone();\n\t\tnbs.setBitInn(i);\n\t\treturn nbs;\n\t}", "@Test\n public void shouldParseBIT() {\n printTest(\"shouldParseBIT()\");\n String typeString = getDataTypeString(DataTypes.DTYPE_BIT);\n String content = typeString;\n\n DdlTokenStream tokens = getTokens(content);\n\n DataType dType = parser.parse(tokens);\n\n Assert.assertNotNull(\"DataType was NOT found for Type = \" + typeString, dType);\n Assert.assertEquals(\"Wrong DataType found\", typeString, dType.getName());\n }", "int getOneof1111();", "static boolean getBit(int num, int pos) {\n\t\t\treturn ((num & (1<<pos)) != 0) ;\n\t\t}", "int getOneof1072();", "public abstract boolean mo66253b();", "Integer getBitRate() {\n return bitRate;\n }", "@Test\n public void encodeAsBitSet()\n {\n int value = 6;\n final BinaryEncoder encoder = new BinaryEncoder(16);\n\n BitSet result = encoder.encodeAsBitSet(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n assertFalse(result.get(0));\n assertTrue(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsBitSet(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n // 0100 Best fit into 4 digits; ignores higher bits.\n assertFalse(result.get(0));\n assertFalse(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n }", "java.lang.String getField1011();", "protected boolean bitAt(final int bitIndex) {\n return _getBit(_bitMap,\n \t\t\t (Numbers.INTEGER_WIDTH*8-1)-bitIndex-1);\n }", "public int getBitOffset() {\r\n\t\treturn bitOffset;\r\n\t}", "public interface BitOutput {\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a 1-bit boolean value. This method writes {@code 0b1} for {@code true}\n\t * and {@code 0b0} for {@code false}.\n\t *\n\t * @param value the value to write.\n\t * @throws IOException if an I/O error occurs\n\t */\n\tvoid writeBoolean( boolean value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a {@code byte} value.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 7 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeByte( boolean unsigned, int size, byte value ) throws IOException;\n\n\t/**\n\t * Writes a {@code short} value.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 15 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeShort( boolean unsigned, int size, short value ) throws IOException;\n\n\t/**\n\t * Writes an {@code int} value. Only the lower specified number of bits are\n\t * written.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of bits for value; between {@code 1} and\n\t * {@code 31 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeInt( boolean unsigned, int size, int value ) throws IOException;\n\n\t/**\n\t * Writes a {@code long} value. Only the lower specified number of bits are\n\t * written.\n\t *\n\t * @param unsigned a flag for indicating unsigned value; {@code true} for\n\t * unsigned, {@code false} for signed.\n\t * @param size the number of valid bits for value; between {@code 1} and\n\t * {@code 63 + (unsigned ? 0 : 1)}, both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeLong( boolean unsigned, int size, long value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Writes a {@code char} value.\n\t *\n\t * @param size the number of bits for value; between {@code 1} and {@code 16},\n\t * both inclusive.\n\t * @param value the value to write\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tvoid writeChar( int size, char value ) throws IOException;\n\n\t// -----------------------------------------------------------------------------------------------------------------\n\n\t/**\n\t * Aligns to specified number of bytes by padding zero bits.\n\t *\n\t * @param bytes the number of bytes to align; must be positive.\n\t * @return the number of zero bits padded while aligning.\n\t * @throws IllegalArgumentException if {@code bytes} is less than or equals to\n\t * {@code 0}.\n\t * @throws IOException if an I/O error occurs.\n\t */\n\tlong align( int bytes ) throws IOException;\n}", "int getHighBitLength();", "private void setIsBinary(boolean value) {\r\n\t \t_isBinary = value;\r\n\t }", "int getOneof1010();", "public static byte set(byte value, int bit){\n return (byte)(value|(1<<bit));\n }", "private int signBit() {\n return signum < 0 ? 1 : 0;\n }", "int getOneof1281();", "int getFlag();", "int getOneof2128();", "static int setBit(int n, int pos){\n return n | (1<<pos);\n }", "BoolConstant createBoolConstant();", "int getOneof1663();", "public int getBitStrength()\n {\n return keyStrength;\n }", "private static int getBit(int pack, int pos) {\n\t\treturn (pack & (1 << pos)) != 0 ? 1 : 0;\n\t}", "boolean getField0();", "int getOneof1658();", "int getLowBitLength();", "public static String getBits(int f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n int mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }", "@Override\n public BinaryType andBool(BoolType BoolType) {\n return TypeFactory.getBinaryType(BoolType.getValue() ? this.getValue() : \"0000000000000000\");\n }", "public static int getBitMask(int x) {\n return (0x01 << x);\n }" ]
[ "0.72171426", "0.70990705", "0.6722347", "0.6529051", "0.63639706", "0.624059", "0.6218506", "0.6140495", "0.61377066", "0.61209494", "0.605322", "0.60422117", "0.6011867", "0.6011867", "0.59655964", "0.59398305", "0.59304315", "0.59207433", "0.5871952", "0.5869064", "0.5858346", "0.5856663", "0.58383095", "0.5834846", "0.58186257", "0.58092743", "0.57854074", "0.576918", "0.5760731", "0.57152736", "0.5713825", "0.57056725", "0.570034", "0.5694307", "0.5687376", "0.5687376", "0.5683269", "0.567522", "0.56569964", "0.5645623", "0.56193465", "0.5604637", "0.5604624", "0.5600179", "0.559713", "0.55930907", "0.55904007", "0.55860317", "0.55832934", "0.5567682", "0.5563914", "0.5563049", "0.5555368", "0.55519176", "0.55438215", "0.5524473", "0.55239636", "0.5521984", "0.55182904", "0.55081975", "0.5495809", "0.54844934", "0.54727894", "0.5470039", "0.5448155", "0.54470116", "0.5446387", "0.5443979", "0.5443625", "0.5441333", "0.54359293", "0.5433226", "0.54310817", "0.54275125", "0.5419318", "0.54152197", "0.54099077", "0.54060096", "0.5403609", "0.53972656", "0.5394385", "0.5390936", "0.53906316", "0.53881425", "0.53853", "0.5382784", "0.5381427", "0.5378513", "0.5378473", "0.5371166", "0.5370118", "0.53656", "0.5363902", "0.53579074", "0.53551686", "0.535479", "0.5350863", "0.5350131", "0.53470516", "0.5345852" ]
0.5584067
48
If there are no extra fields, use the given fields as new extra data otherwise merge the fields assuming the existing fields and the new fields stem from different locations inside the archive.
private void mergeExtraFields(final ZipExtraField[] f, final boolean local) throws ZipException { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "4660ef72-97af-4c77-a8c0-451c0176ea1f"); if (extraFields == null) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "fc349413-df04-4074-b3da-fdacb54199ad"); setExtraFields(f); } else { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "4b996740-6cfc-4dbf-b3af-764a31cbfe77"); for (final ZipExtraField element : f) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "bacdc8b5-2a38-484f-aa61-b042212a08c4"); ZipExtraField existing; writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "d08c42a0-26d8-46ea-bb0e-aa534ce634f2"); if (element instanceof UnparseableExtraFieldData) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "e96717ff-128b-4b11-aa83-243e5cdd44ba"); existing = unparseableExtra; } else { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "611a8005-5c56-445f-b013-ae0feef0b77f"); existing = getExtraField(element.getHeaderId()); } writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "cc9ae2dd-d591-403f-bfc0-3565f7413957"); if (existing == null) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "b3059034-a6ec-4f5c-92ab-02329c1e2936"); addExtraField(element); } else { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "9cf4a3a6-31a3-468f-b1d1-797ef9894394"); if (local) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "32f3d1f3-8ae4-4c18-8839-1c1fb6a4aaa5"); final byte[] b = element.getLocalFileDataData(); writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "532ad3fc-c060-4f5d-9f0e-6b3aca602760"); existing.parseFromLocalFileData(b, 0, b.length); } else { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "31ca8fd7-a4ff-49df-88a1-30617762fb79"); final byte[] b = element.getCentralDirectoryData(); writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "f2794a07-51ae-4509-8ae5-c37f1cff97cd"); existing.parseFromCentralDirectoryData(b, 0, b.length); } } } writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "0f523d07-2102-4c81-b83c-cf863a880764"); setExtra(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExtraFields(final ZipExtraField[] fields) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e57536ae-1bcc-4181-a421-ac13bbd5a9a0\");\n final List<ZipExtraField> newFields = new ArrayList<ZipExtraField>();\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"b6219fa6-a243-4666-ac05-1dfe5f55e146\");\n for (final ZipExtraField field : fields) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"ff160a4e-3868-4d55-ae65-f3ec497e79e8\");\n if (field instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"5ad9dbad-a4cf-4a98-bf17-e11f9d54bd2b\");\n unparseableExtra = (UnparseableExtraFieldData) field;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"78045b40-4eb7-43f0-b243-cee81dfeef37\");\n newFields.add(field);\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"519ff1f6-cf34-43b1-81ca-518811f79459\");\n extraFields = newFields.toArray(new ZipExtraField[newFields.size()]);\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"fae5b51d-497d-46f3-b460-cece6c3bfcd3\");\n setExtra();\n }", "public void addExtraField(final ZipExtraField ze) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"04a0a86a-8034-4044-aeed-cebe7016e2d1\");\n if (ze instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6b9a9172-8ea2-4aed-8433-17b19d1a9891\");\n unparseableExtra = (UnparseableExtraFieldData) ze;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c4c62a77-912a-4047-b4bc-d8a05e95bc86\");\n if (extraFields == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"450fc98b-d668-4300-b141-2c5907baab75\");\n extraFields = new ZipExtraField[] { ze };\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"5d8f1c11-1f27-4f98-923b-c42685d35e95\");\n if (getExtraField(ze.getHeaderId()) != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"7cc8a651-6175-4ec7-ab56-688a497910a8\");\n removeExtraField(ze.getHeaderId());\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"aa062502-071a-4ff6-8692-1c1202b14fec\");\n final ZipExtraField[] zipExtraFields = copyOf(extraFields, extraFields.length + 1);\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e30c5825-289a-4c05-a5ec-8c2d6bec09e8\");\n zipExtraFields[zipExtraFields.length - 1] = ze;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3f326300-d61d-4afa-ae59-fe45855b45a6\");\n extraFields = zipExtraFields;\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"944dff45-ab9b-4e44-b913-045a4e38da7a\");\n setExtra();\n }", "public void addAsFirstExtraField(final ZipExtraField ze) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4c28d4a6-8986-40c6-b210-d044aab8251a\");\n if (ze instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3d9f9c08-e83a-436a-a8e6-86f86bd970af\");\n unparseableExtra = (UnparseableExtraFieldData) ze;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c35acbb6-3608-4438-9a3b-2e13d04a75a3\");\n if (getExtraField(ze.getHeaderId()) != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"11874c15-028a-440f-8a51-54f6de7d8834\");\n removeExtraField(ze.getHeaderId());\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1eda37ab-9698-47a7-98da-b090770a9fd5\");\n final ZipExtraField[] copy = extraFields;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"52861454-df58-45a4-a4ea-fadccf33506e\");\n final int newLen = extraFields != null ? extraFields.length + 1 : 1;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"bd7052b3-7eb3-4bec-8203-290549716189\");\n extraFields = new ZipExtraField[newLen];\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"f4f61f84-b9ec-4ec0-b697-37d032a7a8fb\");\n extraFields[0] = ze;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"86004d7e-add5-4495-b688-e71892b6f3ee\");\n if (copy != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4e30f42c-8c61-4810-b892-2d8b24ce71f8\");\n System.arraycopy(copy, 0, extraFields, 1, extraFields.length - 1);\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"74b18f9f-5af2-497f-a1b9-1aaa00af7a4f\");\n setExtra();\n }", "public void removeExtraField(final ZipShort type) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"70852260-a6a7-4a20-80e7-2845726cb793\");\n if (extraFields == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1cdd41c5-cc00-4c20-a3c8-6a48c9b2e38f\");\n throw new java.util.NoSuchElementException();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"2fbc1b80-8711-4927-9154-0594662dc65e\");\n final List<ZipExtraField> newResult = new ArrayList<ZipExtraField>();\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"8b80c44d-009c-4470-aff3-4763097b9f9a\");\n for (final ZipExtraField extraField : extraFields) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6be62b96-f85a-4404-b95f-7cac16120acf\");\n if (!type.equals(extraField.getHeaderId())) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6215ed97-256f-4341-8f39-b74bd2fe2749\");\n newResult.add(extraField);\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"189c7f29-fa24-4106-be1a-8b02c592ebaa\");\n if (extraFields.length == newResult.size()) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c986e14c-19c0-4d38-9f2d-d08e6c1c6f1b\");\n throw new java.util.NoSuchElementException();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"f10934cb-d037-4768-bb8a-7ad1da158142\");\n extraFields = newResult.toArray(new ZipExtraField[newResult.size()]);\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"7235b8ea-0326-4ddb-afac-2da6c4483bd7\");\n setExtra();\n }", "private ZipExtraField[] getAllExtraFieldsNoCopy() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3fa9af0d-52ec-4dfb-8f8f-664dab78c7a2\");\n if (extraFields == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e10aa90d-39cc-4c84-8523-509199acd725\");\n return getUnparseableOnly();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6f46f8f8-2f8d-4363-895b-687a45be39ed\");\n return unparseableExtra != null ? getMergedFields() : extraFields;\n }", "private void copyFields(NetcdfRecordInfo src, Set<String> excludedFields) {\n Iterator<String> keyIter = src.beanMap.keyIterator();\n Object val;\n while (keyIter.hasNext()) {\n String key = keyIter.next();\n if (this.beanMap.getWriteMethod(key) != null\n && !excludedFields.contains(key)) {\n val = src.beanMap.get(key);\n if (val != null) {\n this.beanMap.put(key, val);\n }\n }\n }\n }", "private void setNewFields(String[] fields) {\n for (String fieldName : fields) {\n setNewField(fieldName);\n }\n }", "public void removeUnparseableExtraFieldData() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c3763808-2050-4e13-a0c1-1c775bd5e0ee\");\n if (unparseableExtra == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4003f30c-e5f3-4c15-b6da-adb3b7a4a1a1\");\n throw new java.util.NoSuchElementException();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c7621793-4ba2-47c3-8bce-7c8b5c05ed8e\");\n unparseableExtra = null;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"daca2b5a-ddf7-4a9f-b64f-153927dc0b18\");\n setExtra();\n }", "public void appendFields(List<Field> fields) {\n // zzzz! zzzz!\n }", "@Override\r\n\tpublic void update( UserFields oldFields, UserFields newFields ) {\n\t\t\r\n\t}", "private JSONObject addMetadataField(String field, String value, JSONObject metadataFields) throws JSONException{\n\t\tif (value != null && value != \"\"){\n\t\t\tmetadataFields.put(field, value);\n\t\t} return metadataFields;\n\t}", "public void updateNonDynamicFields() {\n\n\t}", "protected void augmentToStringFields(final Map<String, Object> augmentedToStringFields) {}", "public void setExtraFieldsId( Integer extraFieldsId ) {\n this.extraFieldsId = extraFieldsId;\n }", "public void copyTagFields(Tag tag, AbstractTag abstractTag, Track track)\r\n \t\tthrows KeyNotFoundException, FieldDataInvalidException {\r\n \tTagField field;\r\n \tString value;\r\n \tboolean firstValue;\r\n \r\n \tIterator<Entry<TagFieldKey, Set<String>>> entries = track.getTrackData().getAllTagFieldValuesIterator();\r\n \t\twhile (entries.hasNext()) {\r\n \t\t\tEntry<TagFieldKey, Set<String>> entry = entries.next();\r\n \t\t\tIterator<String> values = entry.getValue().iterator();\r\n \t\t\tfirstValue = true;\r\n \t\t\twhile (values.hasNext()) {\r\n \t\t\t\tvalue = values.next();\r\n \t\t\t\tif (Util.isEmpty(value)) {\r\n \t\t\t\t\ttag.deleteTagField(entry.getKey());\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tfield = abstractTag.createTagField(entry.getKey(), value);\r\n \t\t\t\t\tif (firstValue) {\r\n \t\t\t\t\t\ttag.set(field);\r\n \t\t\t\t\t\tfirstValue = false;\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse {\r\n \t\t\t\t\t\ttag.add(field);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n }", "private void addDescriptorFields (XmlDescriptor new_desc, Vector fields) {\n\t\tfor (int i = 0; i < fields.size(); i++) {\n\t\t\tJField jf = (JField)fields.elementAt(i);\n\t\t\tif (!jf._noMarshal) {\t\t\t\t\n\t\t\t\tif (jf.isXmlAttribute())\n\t\t\t\t\tnew_desc.addAttribute (jf);\n\t\t\t\telse\n\t\t\t\t\tnew_desc.addElement (jf);\n\t\t\t} else {\n\t\t\t\t//System.out.println (\"not adding unmarshal field..\" + jf.getJavaName ());\n\t\t\t}\n\t\t}\n\t}", "public void addExtraInfo(final ArrayList<PersonInfo> extra) {\n info.addAll(extra);\n hasExtra = true;\n }", "@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }", "@Override\n\tpublic void update(finalDataBean t, String[] fields) throws Exception {\n\t\t\n\t}", "private void addFields(StringBuilder xml) {\n\t\tfor(FieldRequest field : fields) {\n\t\t\tstartElementWithAttributes(xml, \"Delta\");\n\t\t\taddStringAttribute(xml, \"id\", field.getId());\n\t\t\taddBooleanAttribute(xml, \"masked\", field.getMasked());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t}", "public static DataExportTaskField[] addDataExportTaskFieldIfAbsent(DataExportTaskField[] fields, DataExportTaskField field) {\n if (fields == null) {\n return null;\n }\n if (field == null) {\n return fields;\n }\n\n for (DataExportTaskField mf : fields) {\n if (mf == field) {\n // Already contained\n return fields;\n }\n }\n\n DataExportTaskField[] newFields = new DataExportTaskField[fields.length + 1];\n System.arraycopy(fields, 0, newFields, 0, fields.length);\n newFields[fields.length] = field;\n return newFields;\n }", "static void mergeDictionaries(Dictionary target, Dictionary extra) {\n for (Enumeration e = extra.keys();\n e.hasMoreElements(); ) {\n Object key = e.nextElement();\n if (target.get(key) == null) {\n target.put(key, extra.get(key));\n }\n }\n }", "AlgOptTable extend( List<AlgDataTypeField> extendedFields );", "public ZipExtraField getExtraField(final ZipShort type) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c35bc23b-cd1d-468b-b68e-692eafa99687\");\n if (extraFields != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1b755abf-52e3-4078-bdc6-5e4f6d2c1b92\");\n for (final ZipExtraField extraField : extraFields) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"a06856ff-f7ac-4fa2-a2ea-3a766b8fd17b\");\n if (type.equals(extraField.getHeaderId())) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"cf217f83-0921-4e72-8141-ee4971b0fc6f\");\n return extraField;\n }\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"b03a283c-6bc4-4892-b1c9-06986a4697b2\");\n return null;\n }", "@Override\r\n\tpublic XContentBuilder addMeta(XContentBuilder xcb, T river) throws IOException {\r\n\t\t// We add specific metadata here\r\n\t\txcb = addFSMeta(xcb, river);\r\n\t\t\r\n\t\txcb\t\r\n\t\t\t.field(\"url\", river.getUrl())\r\n\t\t\t.field(\"update_rate\", river.getUpdateRate() * 1000)\r\n\t\t\t.field(\"includes\", river.getIncludes())\r\n\t\t\t.field(\"excludes\", river.getExcludes())\r\n\t\t\t.field(\"analyzer\", river.getAnalyzer());\r\n\r\n\t\treturn xcb;\r\n\t}", "protected abstract boolean saveFields(Map changedFields_p) throws Exception;", "private List<SuperSetterBasedBuilderField> deduplicateByName(List<SuperSetterBasedBuilderField> fields) {\n List<SuperSetterBasedBuilderField> result = new ArrayList<>();\n for (SuperSetterBasedBuilderField field : fields) {\n if (!alreadyContainsField(result, field)) {\n result.add(field);\n }\n }\n return result;\n }", "protected void addMetadataFieldsFromParameters() {\n for (Map.Entry<String, String> e: parameters.entrySet()) {\n if (e.getKey().startsWith(\"meta-\")) {\n String fieldName = e.getKey().substring(5);\n String fieldValue = e.getValue();\n currentDoc.addTextualMetadataField(fieldName, fieldValue, getDocWriter().metadataFieldType(false));\n }\n }\n }", "private static FieldInfos filterFields(FieldInfos fieldInfos) {\n List<FieldInfo> fieldInfoCopy = new ArrayList<>(fieldInfos.size());\n for (FieldInfo fieldInfo : fieldInfos) {\n fieldInfoCopy.add(\n new FieldInfo(\n fieldInfo.name,\n fieldInfo.number,\n false,\n false,\n false,\n IndexOptions.NONE,\n DocValuesType.NONE,\n -1,\n fieldInfo.attributes(),\n 0,\n 0,\n 0,\n 0,\n fieldInfo.getVectorSimilarityFunction(),\n fieldInfo.isSoftDeletesField()\n )\n );\n }\n FieldInfos newFieldInfos = new FieldInfos(fieldInfoCopy.toArray(new FieldInfo[0]));\n return newFieldInfos;\n }", "@Override\n\tpublic String update(Set<String> filterField) {\n\t\treturn null;\n\t}", "public void setCentralDirectoryExtra(final byte[] b) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"89a3a99b-365b-4317-bfee-582aaa630e25\");\n try {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"85be46de-f133-46e2-97fa-c2bb581c965f\");\n final ZipExtraField[] central = ExtraFieldUtils.parse(b, false, ExtraFieldUtils.UnparseableExtraField.READ);\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"72731a66-fafa-4ef7-8d6c-3232a244d4bc\");\n mergeExtraFields(central, false);\n } catch (final ZipException e) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"cba51103-9583-4f7a-9f89-5ab18d4dd046\");\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public void formatFields() {\r\n\t}", "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 UnparseableExtraFieldData getUnparseableExtraFieldData() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"a945f49c-9e0e-4d61-96d9-614c3b2abe51\");\n return unparseableExtra;\n }", "public void setFields(final List<Field> fields) {\n this.fields.addAll(fields);\n }", "@Override\n protected void addFields(PdfFile source, Document doc) throws IOException {\n doc.add(createField(SOURCE, downloadService + source.getId()));\n\n String extractedText = extractText(source);\n doc.add(createField(CONTENT, extractedText));\n }", "protected void fillAdditionalFields(U user, Map<String, Object> map) {\n\t}", "void mergeFileProperties() {\n JMeterProperty fileName = getProperty(FILE_NAME);\n JMeterProperty paramName = getProperty(FILE_FIELD);\n JMeterProperty mimeType = getProperty(MIMETYPE);\n HTTPFileArg oldStyleFile = new HTTPFileArg(fileName, paramName, mimeType);\n \n HTTPFileArgs fileArgs = getHTTPFileArgs();\n \n HTTPFileArgs allFileArgs = new HTTPFileArgs();\n if (oldStyleFile.isNotEmpty()) { // OK, we have an old-style file definition\n allFileArgs.addHTTPFileArg(oldStyleFile); // save it\n // Now deal with any additional file arguments\n if (fileArgs != null) {\n HTTPFileArg[] infiles = fileArgs.asArray();\n for (HTTPFileArg infile : infiles) {\n allFileArgs.addHTTPFileArg(infile);\n }\n }\n } else {\n if (fileArgs != null) { // for new test plans that don't have FILE/PARAM/MIME properties\n allFileArgs = fileArgs;\n }\n }\n // Updated the property lists\n setHTTPFileArgs(allFileArgs);\n removeProperty(FILE_FIELD);\n removeProperty(FILE_NAME);\n removeProperty(MIMETYPE);\n }", "private static void fixDexElementsForProtectedApp(Application application, Object[] newDexElements) throws Exception {\n Field zipField = null;\n Field dexFileField = null;\n final Field mFileNameField = ShareReflectUtil.findField(DexFile.class, \"mFileName\");\n final Field mCookieField = ShareReflectUtil.findField(DexFile.class, \"mCookie\");\n final Field mInternalCookieField = ShareReflectUtil.findField(DexFile.class, \"mInternalCookie\");\n\n // Always ignore the last element since it should always be the base.apk.\n for (int i = 0; i < newDexElements.length - 1; ++i) {\n final Object newElement = newDexElements[i];\n\n if (zipField == null && dexFileField == null) {\n zipField = ShareReflectUtil.findField(newElement, \"zip\");\n dexFileField = ShareReflectUtil.findField(newElement, \"dexFile\");\n }\n\n final DexFile origDexFile = oldDexFiles.get(i);\n final String origFileName = (String) mFileNameField.get(origDexFile);\n final Object origCookie = mCookieField.get(origDexFile);\n final Object origInternalCookie = mInternalCookieField.get(origDexFile);\n\n final DexFile dupOrigDexFile = DexFile.loadDex(application.getApplicationInfo().sourceDir, null, 0);\n mFileNameField.set(dupOrigDexFile, origFileName);\n mCookieField.set(dupOrigDexFile, origCookie);\n mInternalCookieField.set(dupOrigDexFile, origInternalCookie);\n\n dexFileField.set(newElement, dupOrigDexFile);\n\n // Just for better looking when dump new classloader.\n // Avoid such output like this: DexPathList{zip file: /xx/yy/zz/uu.odex}\n final File newZip = (File) zipField.get(newElement);\n final String newZipPath = (newZip != null ? newZip.getAbsolutePath() : null);\n if (newZipPath != null && !newZipPath.endsWith(\".zip\") && !newZipPath.endsWith(\".jar\") && !newZipPath.endsWith(\".apk\")) {\n zipField.set(newElement, null);\n }\n }\n }", "@Override\n public ArrayList<HashMap> extractFields(List<Field> fields) {\n FieldExtractor extractor\n = new FieldExtractor((Element) fetcher.getHTMLDocument(), source);\n return extractor.run(fields);\n }", "public void testTwoFields() throws Exception {\n String key1 = 1 + randomAlphaOfLength(3);\n String key2 = 2 + randomAlphaOfLength(3);\n String key3 = 3 + randomAlphaOfLength(3);\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(2, 3, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(4, 5, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(7, 8, fields(key1, null, key2, null, key3, null));\n\n assertEquals(5, totalNoopUpdates());\n }", "private void populateEmptyFields(DublinCoreMetadataCollection dublinCoreMetadata, Set<String> emptyFields) {\n for (String field : emptyFields) {\n try {\n dublinCoreMetadata.addField(dublinCoreProperties.get(field), \"\", getListProvidersService());\n } catch (Exception e) {\n logger.error(\"Skipping metadata field '{}' because of error: {}\", field, ExceptionUtils.getStackTrace(e));\n }\n }\n }", "protected Map createCloneFromFields(Map fields_p) throws Exception\r\n {\r\n Map result = new HashMap();\r\n Set keys = fields_p.keySet();\r\n for (Iterator iterator = keys.iterator(); iterator.hasNext();)\r\n {\r\n String name = (String) iterator.next();\r\n OwEditField value = (OwEditField) fields_p.get(name);\r\n OwEditField clonedValue = new OwEditField(value.getFieldDefinition(), value.getValue());\r\n result.put(name, clonedValue);\r\n }\r\n return result;\r\n }", "public static void fillFieldsFromExistingMessage(Message outgoingMessage,\r\n Message existingMessage,\r\n DataDictionary dict,\r\n boolean onlyCopyRequiredFields,\r\n Set<Integer> inclusionSet)\r\n {\r\n String msgType=null;\r\n try {\r\n msgType=outgoingMessage.getHeader().getString(MsgType.FIELD);\r\n } catch (FieldNotFound ex) {\r\n Messages.FIX_OUTGOING_NO_MSGTYPE.error(LOGGER_NAME, ex);\r\n return;\r\n }\r\n\r\n Iterator<Field<?>> fieldItr=existingMessage.iterator();\r\n while (fieldItr.hasNext()) {\r\n Field<?> field = fieldItr.next();\r\n int fieldInt=field.getTag();\r\n if(inclusionSet != null && !(inclusionSet.contains(fieldInt))) {\r\n continue;\r\n }\r\n if ((!onlyCopyRequiredFields || dict.isRequiredField(msgType,\r\n fieldInt))\r\n && !outgoingMessage.isSetField(fieldInt)\r\n && dict.isMsgField(msgType, fieldInt)) {\r\n try {\r\n outgoingMessage.setField(existingMessage\r\n .getField(new StringField(fieldInt)));\r\n } catch (FieldNotFound e) {\r\n // do nothing and ignore\r\n }\r\n }\r\n }\r\n }", "@Override\n public StructFields duplicate() {\n final StructFields newStruct = new StructFields();\n newStruct.fields.putAll(fields.entrySet().stream()\n .map(ent -> new Tuple<>(ent.getKey(), ent.getValue().duplicate()))\n .collect(Collectors.toMap(Tuple::getA, Tuple::getB)));\n return newStruct;\n }", "private void addField(JField jfield) {\n\n // Check for storage ID conflict; note we can get this legitimately when a field is declared only\n // in supertypes, where two of the supertypes are mutually unassignable from each other. In that\n // case, verify that the generated field is the same.\n JField other = this.jfields.get(jfield.storageId);\n if (other != null) {\n\n // If the descriptions differ, no need to give any more details\n if (!other.toString().equals(jfield.toString())) {\n throw new IllegalArgumentException(\"illegal duplicate use of storage ID \"\n + jfield.storageId + \" for both \" + other + \" and \" + jfield);\n }\n\n // Check whether the fields are exactly the same; if not, there is a conflict\n if (!other.isSameAs(jfield)) {\n throw new IllegalArgumentException(\"two or more methods defining \" + jfield + \" conflict: \"\n + other.getter + \" and \" + jfield.getter);\n }\n\n // OK - they are the same thing\n return;\n }\n this.jfields.put(jfield.storageId, jfield);\n\n // Check for name conflict\n if ((other = this.jfieldsByName.get(jfield.name)) != null)\n throw new IllegalArgumentException(\"illegal duplicate use of field name `\" + jfield.name + \"' in \" + this);\n this.jfieldsByName.put(jfield.name, jfield);\n jfield.parent = this;\n\n // Logging\n if (this.log.isTraceEnabled())\n this.log.trace(\"added {} to object type `{}'\", jfield, this.name);\n }", "public AbstractMT append(final Field ... fields) {\n\t\tValidate.notNull(fields);\n\t\tif (fields.length>0) {\n\t\t\tfor (final Field t : fields) {\n\t\t\t\tb4().add(t);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "private void parseField(String line){\n List<Integer> commaPos = ParserUtils.getCommaPos(line);\n int size = commaPos.size();\n // parse field\n String zip = line.substring(commaPos.get(size-ZIP_CODE_POS-1)+1, commaPos.get(size-ZIP_CODE_POS));\n // if zip is not valid return\n zip = zip.trim();\n if(zip==null || zip.length()<5){\n return;\n }\n // only keep the first 5 digits\n zip = zip.substring(0,5);\n String marketVal = line.substring(commaPos.get(MARKET_VALUE_POS-1)+1, commaPos.get(MARKET_VALUE_POS));\n String liveableArea = line.substring(commaPos.get(size-TOTAL_LIVEABLE_AREA_POS-1)+1, commaPos.get(size-TOTAL_LIVEABLE_AREA_POS));\n // cast those value to Long Double\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n Double DMarketVal = ParserUtils.tryCastStrToDouble(marketVal);\n Double DLiveableArea = ParserUtils.tryCastStrToDouble(liveableArea);\n // update those field into the map\n updatePropertyInfo(lZip,DMarketVal, DLiveableArea);\n }", "public void setExtraInfo(String[] extraInfo) {\n this.extraInfo = extraInfo;\n this.bextraInfo = true;\n }", "private void prepareFields(Entity entity, boolean usePrimaryKey) \r\n\t\t\tthrows IllegalArgumentException, IllegalAccessException, InvocationTargetException{\r\n\t\tprimaryKeyTos = new ArrayList<FieldTO>();\r\n\t\tfieldTos = new ArrayList<FieldTO>();\r\n\t\tField[] fields = entity.getClass().getDeclaredFields();\t\r\n\t\t\r\n\t\t//trunk entity to persistence\r\n\t\tfor(int i=0; i<fields.length; i++){\r\n\t\t\tField reflectionField = fields[i];\r\n\t\t\tif(reflectionField!=null){\r\n\t\t\t\treflectionField.setAccessible(true);\r\n\t\t\t\tAnnotation annoField = reflectionField.getAnnotation(GPAField.class);\r\n\t\t\t\tAnnotation annoFieldPK = reflectionField.getAnnotation(GPAPrimaryKey.class);\r\n\t\t\t\tAnnotation annoFieldBean = reflectionField.getAnnotation(GPAFieldBean.class);\r\n\t\t\t\t/* \r\n\t\t\t\t ainda falta validar a chave primária do objeto\r\n\t\t\t\t por enquanto so esta prevendo pk usando sequence no banco\r\n\t\t\t\t objeto id sempre é gerado no banco por uma sequence\r\n\t\t\t\t*/\r\n\t\t\t\tif(annoFieldPK!=null && annoFieldPK instanceof GPAPrimaryKey){\r\n\t\t\t\t\tGPAPrimaryKey pk = (GPAPrimaryKey)annoFieldPK;\r\n\t\t\t\t\t//if(pk.ignore() == true){\r\n\t\t\t\t\t//\tcontinue;\r\n\t\t\t\t\t//}else{\r\n\t\t\t\t\tString name = pk.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t//}\r\n\t\t\t\t}\r\n\t\t\t\tif(annoField!=null && annoField instanceof GPAField){\r\n\t\t\t\t\tGPAField field = (GPAField)annoField;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(annoFieldBean!=null && annoFieldBean instanceof GPAFieldBean){\r\n\t\t\t\t\tGPAFieldBean field = (GPAFieldBean)annoFieldBean;\r\n\t\t\t\t\tString name = field.name();\r\n\t\t\t\t\tObject value = reflectionField.get(entity);\r\n\t\t\t\t\tfieldTos.add(new FieldTO(name, value));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public BuildParams addSubfields(List<RecordField> subfields) {\n this.subfields.addAll(subfields);\n // Return this for method chaining\n return this;\n }", "public static void setFields(DBFField[] fields) throws UnsupportedEncodingException {\r\n int i = 0;\r\n\r\n fields[i] = new DBFField();\r\n fields[i].setName(\"TIPREG\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(1);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DOCFEC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DOCSER\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DOCNUM\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(6);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODTIP\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODMOD\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODTER\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(5);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CTACON\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(12);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"BASEBAS\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n// fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPTBAS\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n// fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORNOR\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(6);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"RECBAS\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORREC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(6);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORTES\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"PORFIN\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(6);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"RFDPP\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DESHOR\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DESKM\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(11);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"TOTFAC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(14);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO1\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO1\");\r\n //fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n // Es numerico pero para insertar valor \"XXX,YY\" \r\n //hay que meterlo como string y despues cambiarlo en dbfmanager -> Structura\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO2\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO2\");\r\n // Misma razon que IMPVTO1\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO3\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO3\");\r\n // Misma razon que IMPVTO1\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO4\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO4\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO5\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO5\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"FECVTO6\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_D);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"IMPVTO6\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"DIETENT\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n fields[i].setDecimalCount(2);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CODFORPAG\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(3);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"TIPFORPAG\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(1);\r\n //logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n \r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"BASEIMPCC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_C);\r\n fields[i].setFieldLength(10);\r\n// logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n fields[++i] = new DBFField();\r\n fields[i].setName(\"CC\");\r\n fields[i].setDataType(DBFField.FIELD_TYPE_N);\r\n fields[i].setFieldLength(10);\r\n fields[i].setDecimalCount(0);\r\n// logger.log(Level.INFO, \"Campo {0}-{1} - DataType : {2}\", new Object[]{i, fields[i].getName(), getFieldDataType(fields[i].getDataType())});\r\n\r\n //logger.log(Level.INFO, \"Total columnas en fichero .dbf = {0}\", i);\r\n }", "@Override\n public void readFields(DataInput in) throws IOException {\n super.readFields(in);\n\n byte flags = in.readByte();\n hasFooter = (FOOTER_FLAG & flags) != 0;\n isOriginal = (ORIGINAL_FLAG & flags) != 0;\n hasBase = (BASE_FLAG & flags) != 0;\n boolean hasLongFileId = (HAS_LONG_FILEID_FLAG & flags) != 0,\n hasWritableFileId = (HAS_SYNTHETIC_FILEID_FLAG & flags) != 0,\n hasSyntheticProps = (HAS_SYNTHETIC_ACID_PROPS_FLAG & flags) != 0;\n if (hasLongFileId && hasWritableFileId) {\n throw new IOException(\"Invalid split - both file ID types present\");\n }\n\n deltas.clear();\n int numDeltas = in.readInt();\n for(int i=0; i < numDeltas; i++) {\n AcidInputFormat.DeltaMetaData dmd = new AcidInputFormat.DeltaMetaData();\n dmd.readFields(in);\n deltas.add(dmd);\n }\n if (hasFooter) {\n int tailLen = WritableUtils.readVInt(in);\n byte[] tailBuffer = new byte[tailLen];\n in.readFully(tailBuffer);\n OrcProto.FileTail fileTail = OrcProto.FileTail.parseFrom(tailBuffer);\n orcTail = new OrcTail(fileTail, null);\n }\n if (hasLongFileId) {\n fileKey = in.readLong();\n } else if (hasWritableFileId) {\n SyntheticFileId fileId = new SyntheticFileId();\n fileId.readFields(in);\n this.fileKey = fileId;\n }\n fileLen = in.readLong();\n rootDir = new Path(in.readUTF());\n\n if (hasSyntheticProps) {\n long rowId = in.readLong();\n int bucket = in.readInt();\n long writeId = in.readLong();\n\n syntheticAcidProps = new OffsetAndBucketProperty(rowId, bucket, writeId);\n }\n }", "public void setFields(Map<String, String> fields) {\n this.fields = fields;\n }", "public void setFields(Map<String,String> fields)\n\t{\n\t\tList<Field> localFields = new ArrayList<Field>();\n\t\tIterator<Map.Entry<String,String>> it = fields.entrySet().iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry<String,String> pairs = it.next();\n\t\t\tlocalFields.add(new Field(pairs.getKey(), pairs.getValue()));\n\t\t}\n\n\t\tsetFields(localFields);\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 }", "void setFields(Set<F> fields);", "public void setFieldsByName(String[] fields)\n\t{\n\t\tList<String> localFields = Arrays.asList(fields);\n\t\tsetFieldsByName(localFields);\n\t}", "public org.apache.xmlbeans.XmlString addNewMappingFields()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MAPPINGFIELDS$28);\n return target;\n }\n }", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "private void updateMergedEntry() {\n // Check if the type has changed\n if (!identicalTypes && !typeRadioButtons.isEmpty() && typeRadioButtons.get(0).isSelected()) {\n mergedEntry.setType(leftEntry.getType());\n } else {\n mergedEntry.setType(rightEntry.getType());\n }\n\n // Check the potentially different fields\n for (Field field : differentFields) {\n if (!radioButtons.containsKey(field)) {\n // May happen during initialization -> just ignore\n continue;\n }\n if (radioButtons.get(field).get(LEFT_RADIOBUTTON_INDEX).isSelected()) {\n mergedEntry.setField(field, leftEntry.getField(field).get()); // Will only happen if field exists\n } else if (radioButtons.get(field).get(RIGHT_RADIOBUTTON_INDEX).isSelected()) {\n mergedEntry.setField(field, rightEntry.getField(field).get()); // Will only happen if field exists\n } else {\n mergedEntry.clearField(field);\n }\n }\n }", "public IndexInfo(IndexInfo other, MetaRelationship field) {\n\t\tString prefix = field.getName();\n\t\tthis.indexName = prefix + \".\" + other.indexName;\n\t\tthis.options = new HashSet<IndexOptionEnum>(other.options);\n\t\t// since the embed field might not have field, it must be spare for\n\t\t// unique index\n\t\tif (this.options.contains(IndexOptionEnum.unique)) {\n\t\t\tthis.options.add(IndexOptionEnum.sparse);\n\t\t}\n\t\tthis.keyList = new LinkedList<String>();\n\t\tfor (String key : other.keyList) {\n\t\t\tkeyList.add(prefix + \".\" + key);\n\t\t}\n\t\tthis.internal = true;\n\t}", "void populateGeneralData(ArtifactoryRestRequest artifactoryRestRequest, AuthorizationService authService);", "static List<Expression> addOrReplaceColumns(\n List<String> inputFields, List<Expression> newExpressions) {\n LinkedHashMap<String, Expression> finalFields = new LinkedHashMap<>();\n\n inputFields.forEach(field -> finalFields.put(field, unresolvedRef(field)));\n newExpressions.forEach(\n expr -> {\n String name = extractName(expr).orElse(expr.toString());\n finalFields.put(name, expr);\n });\n\n return new ArrayList<>(finalFields.values());\n }", "InstrumentedType withAuxiliaryField(FieldDescription.Token token, Object value);", "private List<String> rmDupInfo(List<String> fields) {\n Set<String> seen = new HashSet<>();\n List<String> uniqueNonEmptyFields = new ArrayList<>();\n for (String i : fields) {\n if (i.isEmpty() || i.equals(\".\")) {\n continue;\n } else {\n String fieldName = i.split(\"=\")[0];\n if (!seen.contains(fieldName)) {\n uniqueNonEmptyFields.add(i);\n seen.add(fieldName);\n }\n }\n }\n return uniqueNonEmptyFields;\n }", "public static void fillFieldsFromExistingMessage(Message outgoingMessage,\r\n Message existingMessage,\r\n boolean onlyCopyRequiredFields,\r\n Set<Integer> inclusionSet)\r\n {\r\n fillFieldsFromExistingMessage\r\n (outgoingMessage,\r\n existingMessage,\r\n CurrentFIXDataDictionary.getCurrentFIXDataDictionary().\r\n getDictionary(),\r\n onlyCopyRequiredFields,\r\n inclusionSet);\r\n }", "public void assemble(Fields fields) {\n fields.millis = a;\n fields.seconds = b;\n fields.minutes = c;\n fields.hours = d;\n fields.halfdays = e;\n fields.days = f;\n fields.weeks = g;\n fields.millisOfSecond = h;\n fields.millisOfDay = i;\n fields.secondOfMinute = j;\n fields.secondOfDay = k;\n fields.minuteOfHour = l;\n fields.minuteOfDay = m;\n fields.hourOfDay = n;\n fields.hourOfHalfday = o;\n fields.clockhourOfDay = p;\n fields.clockhourOfHalfday = q;\n fields.halfdayOfDay = r;\n fields.year = new BasicYearDateTimeField(this);\n fields.yearOfEra = new GJYearOfEraDateTimeField(fields.year, this);\n fields.centuryOfEra = new DividedDateTimeField((DateTimeField) new OffsetDateTimeField(fields.yearOfEra, 99), DateTimeFieldType.centuryOfEra(), 100);\n fields.centuries = fields.centuryOfEra.getDurationField();\n fields.yearOfCentury = new OffsetDateTimeField(new RemainderDateTimeField((DividedDateTimeField) fields.centuryOfEra), DateTimeFieldType.yearOfCentury(), 1);\n fields.era = new GJEraDateTimeField(this);\n fields.dayOfWeek = new GJDayOfWeekDateTimeField(this, fields.days);\n fields.dayOfMonth = new BasicDayOfMonthDateTimeField(this, fields.days);\n fields.dayOfYear = new BasicDayOfYearDateTimeField(this, fields.days);\n fields.monthOfYear = new GJMonthOfYearDateTimeField(this);\n fields.weekyear = new BasicWeekyearDateTimeField(this);\n fields.weekOfWeekyear = new BasicWeekOfWeekyearDateTimeField(this, fields.weeks);\n fields.weekyearOfCentury = new OffsetDateTimeField(new RemainderDateTimeField(fields.weekyear, fields.centuries, DateTimeFieldType.weekyearOfCentury(), 100), DateTimeFieldType.weekyearOfCentury(), 1);\n fields.years = fields.year.getDurationField();\n fields.months = fields.monthOfYear.getDurationField();\n fields.weekyears = fields.weekyear.getDurationField();\n }", "public static void setPartDataFromField(PartData data, String value, EntryFieldLabel field) {\n switch (field) {\n case PI:\n data.setPrincipalInvestigator(value);\n break;\n\n case PI_EMAIL: {\n data.setPrincipalInvestigatorEmail(value);\n break;\n }\n\n case FUNDING_SOURCE: {\n data.setFundingSource(value);\n break;\n }\n\n case IP:\n data.setIntellectualProperty(value);\n break;\n\n case BIO_SAFETY_LEVEL:\n Integer level = BioSafetyOption.intValue(value);\n if (level == null) {\n if (value.contains(\"1\"))\n level = 1;\n else if (value.contains(\"2\"))\n level = 2;\n else if (\"restricted\".equalsIgnoreCase(value))\n level = -1;\n else\n break;\n }\n data.setBioSafetyLevel(level);\n break;\n\n case NAME:\n data.setName(value);\n break;\n\n case ALIAS:\n data.setAlias(value);\n break;\n\n case KEYWORDS:\n data.setKeywords(value);\n break;\n\n case SUMMARY:\n data.setShortDescription(value);\n break;\n\n case NOTES:\n data.setLongDescription(value);\n break;\n\n case REFERENCES:\n data.setReferences(value);\n break;\n\n case LINKS:\n ArrayList<String> links = new ArrayList<>();\n links.add(value);\n data.setLinks(links);\n break;\n\n case STATUS:\n data.setStatus(value);\n break;\n\n case SELECTION_MARKERS:\n ArrayList<String> selectionMarkers = new ArrayList<>();\n selectionMarkers.add(value);\n data.setSelectionMarkers(selectionMarkers);\n break;\n\n case HOST:\n case GENOTYPE_OR_PHENOTYPE:\n data.setStrainData(setStrainDataFromField(data.getStrainData(), value, field));\n break;\n\n case BACKBONE:\n case ORIGIN_OF_REPLICATION:\n case CIRCULAR:\n case PROMOTERS:\n case REPLICATES_IN:\n data.setPlasmidData(setPlasmidDataFromField(data.getPlasmidData(), value, field));\n break;\n\n case HOMOZYGOSITY:\n case ECOTYPE:\n case HARVEST_DATE:\n case GENERATION:\n case SENT_TO_ABRC:\n case PLANT_TYPE:\n case PARENTS:\n data.setSeedData(setSeedDataFromField(data.getSeedData(), value, field));\n break;\n\n case ORGANISM:\n case FULL_NAME:\n case GENE_NAME:\n case UPLOADED_FROM:\n data.setProteinData(setProteinDataFromField(data.getProteinData(), value, field));\n break;\n\n case CREATOR:\n data.setCreator(value);\n break;\n\n case CREATOR_EMAIL:\n data.setCreatorEmail(value);\n break;\n\n default:\n break;\n }\n }", "public JsonNode jsonMerge(JsonNode mainNode, JsonNode updateNode) {\n\n\t\tif (isNull(mainNode) || mainNode.isNull())\n\t\t\treturn updateNode;\n\t\tif (isNull(updateNode) || updateNode.isNull())\n\t\t\treturn mainNode;\n\n\t\tIterator<String> fieldNames = updateNode.fieldNames();\n\t\twhile (fieldNames.hasNext()) {\n\n\t\t\tString fieldName = fieldNames.next();\n\t\t\tJsonNode jsonNode = mainNode.get(fieldName);\n\t\t\t// if field exists and is an embedded object\n\t\t\tif (jsonNode != null && jsonNode.isObject()) {\n\t\t\t\tjsonMerge(jsonNode, updateNode.get(fieldName));\n\t\t\t} else {\n\t\t\t\tif (mainNode instanceof ObjectNode) {\n\t\t\t\t\t// Overwrite field\n\t\t\t\t\tJsonNode value = updateNode.get(fieldName);\n\t\t\t\t\t((ObjectNode) mainNode).set(fieldName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn mainNode;\n\t}", "private void cloneFields(Project originalProj, Project cloneProj) {\n\tSet<FieldAssignment> origianlFAssignments = originalProj.getAssignedFields();\n\tif (origianlFAssignments != null) {\n\t for (FieldAssignment originalAssign : origianlFAssignments) {\n\t\tFieldAssignment cloneField = originalAssign.clone();\n\t\tcloneField.setProject(cloneProj);\n\t\tthis.fieldDAO.assignFieldToProject(cloneField);\n\t }\n\t}\n }", "@Test\n public void setExtraSavesExtra()\n {\n //arrange\n String expectedExtra = \"some user agent extra\";\n ProductInfo actual = new ProductInfo();\n\n //act\n actual.setExtra(expectedExtra);\n\n //assert\n assertEquals(expectedExtra, Deencapsulation.getField(actual, \"extra\"));\n }", "private void addFieldToBook(String config_id, GOlrField field) {\n if (!unique_fields.containsKey(field.id)) {\n unique_fields.put(field.id, field);\n } else {\n // check if defined fields are equivalent\n if (!unique_fields.get(field.id).equals(field)) {\n throw new IllegalStateException(field.id + \" is defined twice with different properties.\\n\"\n + unique_fields.get(field.id) + \"\\n\" + field);\n }\n }\n // Ensure presence of comments (description) list.\n if (!collected_comments.containsKey(field.id)) {\n collected_comments.put(field.id, new ArrayList<String>());\n }\n // And add to it if there is an available description.\n if (field.description != null) {\n ArrayList<String> comments = collected_comments.get(field.id);\n comments.add(\" \" + config_id + \": \" + field.description + \" \");\n collected_comments.put(field.id, comments);\n }\n }", "public void addToFields(entity.APDExposureField element);", "public static void updateField() {\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\tfor (int j = 0; j < COLUMNS; j++) {\r\n\t\t\t\tfield[i][j] = EMPTY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < food.size(); i++) {\r\n\t\t\tfield[food.get(i)[1]][food.get(i)[2]] = food.get(i)[0];\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < snake.size(); i++) {\r\n\t\t\tfield[snake.get(i)[0]][snake.get(i)[1]] = SNAKE;\r\n\t\t}\r\n\t}", "private void populateFieldArray() \r\n\t{\r\n\t\tInteger fieldId;\r\n\t\t/** get input column names which is populated based on the input file\r\n\t\t * format specified in the command file */\r\n\t\tString [] inputColNames = getInputColNames();\r\n\t\tint arrLength; /** Number of columns in the input file*/\r\n\t\tif (null == inputColNames)\r\n\t\t{\r\n\t\t\t/** set array length 2 for two default columns (probeset and chip description)*/\r\n\t\t\tarrLength = 2; \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/** Basic Probeset ID and description fields are present for all files \r\n\t\t\t * but the other supplementary information like accession number, unigene and\r\n\t\t\t * entrezgene ids may be present one or many based on the file format */\r\n\t\t\tarrLength = 2 + inputColNames.length; /** add other columns*/\r\n\t\t}\r\n\t\t/** Field array base elements are Probeset and Chip_Desc plus any of acc_no, ugid, & locusid/organism */\r\n\t\tfieldIndexArray = new int [arrLength];\r\n\t\t\r\n\t\t/** Now 0th field in input file is probeset*/\r\n\t\tfieldIndexArray[0] = ((Integer) fieldIdTable.get(\"CIN_PROBESET\")).intValue();\r\n\t\t\r\n\t\tif (inputColNames != null) \r\n\t\t{\r\n\t\t\t/** get the field ids for all column names*/\r\n\t\t\tfor (int i=0; i< inputColNames.length; i++)\r\n\t\t\t{\r\n\t\t\t\t/** Pick up the column from the list of inout columns as obtained based on\r\n\t\t\t\t * the input file format. Then fetch its ID from the FieldIdTable */\r\n\t\t\t\tfieldId = (Integer) fieldIdTable.get(inputColNames[i].toUpperCase());\r\n\t\t\t\tif (null == fieldId)\r\n\t\t\t\t{\r\n\t\t\t\t\t/** no such column name allowed*/\r\n\t\t\t\t\tLogger.log(\"Column name \" + inputColNames[i] + \" is not a valid name\",Logger.WARNING);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/** add the field id to the index array. Thus fieldIndexArray will have all the \r\n\t\t\t\t\t * column names depending on the file format*/\r\n\t\t\t\t\tfieldIndexArray[1+i] = fieldId.intValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t/** ChipDesc field is the last column in the input file. First we have added the default first field\r\n\t\t * as probeset id , then all the middle fields based on the file format and now the last default\r\n\t\t * field which is chipdescription */\r\n\t\tfieldIndexArray[fieldIndexArray.length-1] = ((Integer) fieldIdTable.get(\"CIN_CHIP_DESCRIPTION\")).intValue();\r\n\t\tLogger.log(\"populateFieldArray complete \",Logger.DEBUG);\r\n\t}", "public void setFields(Map fields_p) throws Exception\r\n {\r\n m_fields = fields_p;\r\n\r\n m_clonedfields = createCloneFromFields(fields_p);\r\n }", "public void saveExtraData() {}", "public abstract XContentBuilder addFSMeta(XContentBuilder xcb, T river) throws IOException;", "public VersionedMap getExtra ()\n {\n return extra;\n }", "@RegionEffects(\"writes publicField; reads defaultField\")\n private void someButNotAll() {\n publicField = privateField;\n protectedField = defaultField;\n }", "public void addMappingFields(java.lang.String mappingFields)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MAPPINGFIELDS$28);\n target.setStringValue(mappingFields);\n }\n }", "public static void registerFields(Multimap<String,NormalizedContentInterface> f) {\n fields = f;\n }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "protected abstract LibraryItem getItemFromFields();", "private void getMarkerFields() {\n\r\n\t\tString strMarkerType = _strMarkerType.replace(\" \", \"\");\r\n\t\t\r\n\t\tFieldProperties[] listOfSourceFieldProperties = null;\r\n\t\tFieldProperties[] listOfDataFieldProperties = null;\r\n\t\tFieldProperties[] listOfGIDsFieldPropertiesForDArT = null;\r\n\t\t\r\n\t\tlistOfSourceColumnFields = new ArrayList<FieldProperties>();\r\n\t\tlistOfDataColumnFields = new ArrayList<FieldProperties>();\r\n\t\tlistOfAdditionalGIDsColumnFieldsForDArT = new ArrayList<FieldProperties>();\r\n\t\t\r\n\t\tif (strMarkerType.equals(\"SSRMarker\")){\r\n\t\t\t//strSourceFileName = \"SSRMarker\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.SSRMarker;\r\n\t\t\tstrSourceSheetTitle = \"SSRMarkers\";\r\n\t\t} else if (strMarkerType.equals(\"SNPMarker\")){\r\n\t\t\t//strSourceFileName = \"SNPMarker\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.SNPMarker;\r\n\t\t\tstrSourceSheetTitle = \"SNPMarkers\";\r\n\t\t} else if (strMarkerType.equals(\"CISRMarker\")){\r\n\t\t\t//strSourceFileName = \"CISRMarker\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.CISRMarker;\r\n\t\t\tstrSourceSheetTitle = \"CISRMarkers\";\r\n\t\t} else if (strMarkerType.equals(\"CAPMarker\")){\r\n\t\t\t//strSourceFileName = \"CAPMarker\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.CAPMarker;\r\n\t\t\tstrSourceSheetTitle = \"CAPMarkers\";\r\n\t\t} else if (strMarkerType.equals(\"SSRGenotype\")){\r\n\t\t\t//strSourceFileName = \"SSRGenotype_Source\";\r\n\t\t\t//strDataFileName = \"SSRGenotype_Data\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.SSRGenotype_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.SSRGenotype_Data;\r\n\t\t\tstrSourceSheetTitle = \"SSR_Source\";\r\n\t\t\tstrDataSheetTitle = \"SSR_Data List\";\r\n\t\t} /*else if (strMarkerType.equals(\"SNPGenotype\")){\r\n\t\t\t//strSourceFileName = \"SNPGenotype_Source\";\r\n\t\t\t//strDataFileName = \"SNPGenotype_Data\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.SNPGenotype_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.SNPGenotype_Data;\r\n\t\t\tstrSourceSheetTitle = \"SNPGenotype_Source\";\r\n\t\t\tstrDataSheetTitle = \"SNPGenotype_Data\";\r\n\t\t} */\r\n\t\telse if (strMarkerType.equals(\"GenericSNP\")){\r\n\t\t\t//\"Generic SNP\"\r\n\t\t\t//TODO: 20131206: Tulasi --- Implementation pending - to display the data from the template in the table \r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.SNPGenotype_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.SNPGenotype_Data;\r\n\t\t\tstrSourceSheetTitle = \"SNPGenotype_Source\";\r\n\t\t\tstrDataSheetTitle = \"SNPGenotype_Data\";\r\n\t\t} else if (strMarkerType.equals(\"LGCGenomicsSNP\")){\r\n\t\t\t//\"LGC Genomics SNP\"\r\n\t\t\t//TODO: 20131206: Tulasi --- Implementation pending - to display the data from the template in the table \r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.LGCGenomicsSNPGenotype_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.LGCGenomicsSNPGenotype_Data;\r\n\t\t\tstrSourceSheetTitle = \"LGCGenomicsSNPGenotype_Source\";\r\n\t\t\tstrDataSheetTitle = \"LGCGenomicsSNPGenotype_Data\";\r\n\t\t} else if (strMarkerType.equals(\"DArtGenotype\")){\r\n\t\t\t//strSourceFileName = \"DArtGenotype_Source\";\r\n\t\t\t//strDataFileName = \"DArtGenotype_Data\";\r\n\t\t\t//strAdditonalGIDsFileNameForDArt = \"DArtGenotype_GID\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.DArtGenotype_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.DArtGenotype_Data;\r\n\t\t\tlistOfGIDsFieldPropertiesForDArT = UploadTableFields.DArtGenotype_GID;\r\n\t\t\tstrSourceSheetTitle = \"DArT_Source\";\r\n\t\t\tstrDataSheetTitle = \"DArT_Data\";\r\n\t\t\tstrGIDsSheetTitleForDArT = \"DArT_GIDs\";\r\n\t\t} else if (strMarkerType.equals(\"AllelicData\") || strMarkerType.equals(\"ABHData\") ){\r\n\t\t\t//strSourceFileName = \"MappingGenotype_Source\";\r\n\t\t\t//strDataFileName = \"MappingGenotype_Data\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.MappingGenotype_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.MappingGenotype_Data;\r\n\t\t\tstrSourceSheetTitle = \"Mapping_Source\";\r\n\t\t\tstrDataSheetTitle = \"Mapping_DataList\";\r\n\t\t} else if (strMarkerType.equals(\"QTL\")){\r\n\t\t\t//strSourceFileName = \"QTL_Source\";\r\n\t\t\t//strDataFileName = \"QTL_Data\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.QTL_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.QTL_Data;\r\n\t\t\tstrSourceSheetTitle = \"QTL_Source\";\r\n\t\t\tstrDataSheetTitle = \"QTL_Data\";\r\n\t\t} else if (strMarkerType.equals(\"Map\")){\r\n\t\t\t//strSourceFileName = \"Map_Source\";\r\n\t\t\t//strDataFileName = \"Map_Data\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.Map_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.Map_Data;\r\n\t\t\tstrSourceSheetTitle = \"Map_Source\";\r\n\t\t\tstrDataSheetTitle = \"Map_Data\";\r\n\t\t} else if (strMarkerType.equals(\"MTA\")){\r\n\t\t\t//strSourceFileName = \"Map_Source\";\r\n\t\t\t//strDataFileName = \"Map_Data\";\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.MTA_Source;\r\n\t\t\tlistOfDataFieldProperties = UploadTableFields.MTA_Data;\r\n\t\t\tstrSourceSheetTitle = \"Map_Source\";\r\n\t\t\tstrDataSheetTitle = \"Map_Data\";\r\n\t\t}else {\r\n\t\t\tlistOfSourceFieldProperties = UploadTableFields.SSRMarker;\r\n\t\t}\r\n\t\t\r\n\t\tif (null != listOfSourceFieldProperties){\r\n\t\t\tfor (FieldProperties fieldProperties : listOfSourceFieldProperties) {\r\n\t\t\t\tlistOfSourceColumnFields.add(fieldProperties);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (null != listOfDataFieldProperties){\r\n\t\t\tfor (FieldProperties fieldProperties : listOfDataFieldProperties) {\r\n\t\t\t\tlistOfDataColumnFields.add(fieldProperties);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (null != listOfVariableDataColumns){\r\n\t\t\t\tfor (String columnTitle : listOfVariableDataColumns){\r\n\t\t\t\t\tFieldProperties fieldProperties = new FieldProperties(columnTitle, UploadField.REQUIRED.toString(), \"\", \"\");\r\n\t\t\t\t\tlistOfDataColumnFields.add(fieldProperties);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (null != listOfGIDsFieldPropertiesForDArT){\r\n\t\t\tfor (FieldProperties fieldProperties : listOfGIDsFieldPropertiesForDArT) {\r\n\t\t\t\tlistOfAdditionalGIDsColumnFieldsForDArT.add(fieldProperties);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected String[] ignoreFields() {\n\t\treturn null;\n\t}", "public void setFields(String fields) {\n this.fields = fields == null ? null : fields.trim();\n }", "public void addOtherInfo(Map<String, Object> otherInfo) {\n this.otherInfo.putAll(otherInfo);\n }", "private void prepareUserFieldMapping(JsonObject jsonObj) throws AutomicException {\n Set<Entry<String, JsonElement>> entrySet = jsonObj.entrySet();\n if (userInputFields == null) {\n resultFields = new ArrayList<String>(entrySet.size());\n List<String> excludeHeaders = getExcludedFields();\n for (Map.Entry<String, JsonElement> entry : entrySet) {\n String key = entry.getKey();\n JsonElement value = jsonObj.get(key);\n if (!excludeHeaders.contains(key)) {\n if (value.isJsonPrimitive()) {\n resultFields.add(key);\n } else if (value.isJsonObject()) {\n JsonObject jObj = (JsonObject) value;\n if (jObj.has(\"_refObjectName\")) {\n resultFields.add(key);\n }\n }\n }\n }\n userInputFields = resultFields;\n } else {\n resultFields = new ArrayList<String>();\n Map<String, String> tempMap = new HashMap<String, String>(entrySet.size());\n for (Map.Entry<String, JsonElement> entry : entrySet) {\n String key = entry.getKey();\n tempMap.put(key.toLowerCase(), key);\n }\n StringBuilder invalidFields = new StringBuilder();\n for (String userInput : userInputFields) {\n String resultKey = tempMap.get(userInput.toLowerCase());\n if (resultKey != null) {\n resultFields.add(resultKey);\n } else {\n invalidFields.append(userInput).append(\" \");\n }\n }\n if (invalidFields.length() != 0) {\n throw new AutomicException(\"Invalid export fields have been specified \" + invalidFields.toString());\n }\n }\n }", "private void updateFields(){\n\n updateTotalPay();\n updateTotalTip();\n updateTotalPayPerPerson();\n }", "private void appendExtraAttributes( final Attributes attributes )\n {\n final Iterator iterator = m_extraAttributes.iterator();\n while( iterator.hasNext() )\n {\n final ExtraAttribute attribute =\n (ExtraAttribute)iterator.next();\n attributes.putValue( attribute.getName(),\n attribute.getValue() );\n }\n }", "public void addField(BaseField newf)\n\t{\n\t\tif(m_baseList == null)\n\t\t\tm_baseList = new ArrayList<BaseField>();\n\t\tm_baseList.add(newf);\n\t}", "public void setFieldsByName(List<String> fields)\n\t{\n\t\tList<Field> localFields = new ArrayList<Field>();\n\t\tIterator<String> it = fields.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tField field = new Field((String) it.next(), null);\n\t\t\tlocalFields.add(field);\n\t\t}\n\n\t\tsetFields(localFields);\n\t}", "public void parsingAdditionalData() {\n\t\tString AdditionalData = billPayBean.getAdditionalData();\n\t\tswitch (Integer.parseInt(billPayBean.getBillerId())) {\n\t\tcase 91901:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(95,120));\n\t\t\tbillPayBean.setMeterNumber(AdditionalData.substring(7,18));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(18,30));\n\t\t\tbreak;\n\t\tcase 91951:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(47,72));\n\t\t\tbillPayBean.setBillNumber(AdditionalData.substring(0,12));\n\t\t\tbreak;\n\t\tcase 91999:\n\t\t\tbillPayBean.setCustomerName(AdditionalData.substring(66,91));\n\t\t\tbillPayBean.setRegNumber(AdditionalData.substring(0,13));\n\t\t\tbreak;\n\t\tdefault:\n\t\t}\n\t\treturn ;\n\t}", "public void moveEntry (String oldPath, String newPath) throws IOException\n\t{\n\t\tString alt = prepareLocation (oldPath);\n\t\tString neu = prepareLocation (newPath);\n\t\t\n\t\tArchiveEntry entry = getEntryByLocation (alt);\n\t\tif (entry == null)\n\t\t\tthrow new IOException (\"no such entry in archive\");\n\t\t\n\t\tboolean wasMain = mainEntries.contains (entry);\n\t\tentries.remove (alt);\n\t\t\n\t\tPath neuPath = zipfs.getPath (neu).normalize ();\n\t\tFiles.createDirectories (neuPath.getParent ());\n\t\tFiles.move (zipfs.getPath (alt).normalize (), neuPath,\n\t\t\tStandardCopyOption.ATOMIC_MOVE);\n\t\tArchiveEntry newEntry = new ArchiveEntry (this, neuPath,\n\t\t\tentry.getFormat ());\n\t\t\n\t\tentries.put (neu, newEntry);\n\t\tif (wasMain)\n\t\t{\n\t\t\taddMainEntry (newEntry);\n\t\t}\n\t\t\n\t\t// move meta data\n\t\tList<MetaDataObject> meta = entry.getDescriptions ();\n\t\tfor (MetaDataObject m : meta)\n\t\t{\n\t\t\tnewEntry.addDescription (m);\n\t\t}\n\t\t\n\t}", "public void updateRelationData(Map<String, Object> oldDynamicData, Map<String, Object> newDynamicData,\n List<CustomFieldsInfoOutDTO> fields, Long recordId) {\n if (oldDynamicData == null) {\n oldDynamicData = new HashMap<>();\n }\n if (newDynamicData == null) {\n newDynamicData = new HashMap<>();\n }\n ObjectMapper mapper = new ObjectMapper();\n Map<Integer, UpdateRelationDataRequest> requestsMap = new HashMap<>();\n List<String> processedField = new ArrayList<>();\n Map<String, CustomFieldsInfoOutDTO> fieldsmap = fields.stream()\n .collect(Collectors.toMap(CustomFieldsInfoOutDTO::getFieldName, f -> f));\n TypeReference<ArrayList<Long>> listTypeReference = new TypeReference<ArrayList<Long>>() {\n };\n for (Map.Entry<String, Object> newData : newDynamicData.entrySet()) {\n CustomFieldsInfoOutDTO fieldInfo = fieldsmap.get(newData.getKey());\n if (fieldInfo == null || !fieldInfo.getFieldName().startsWith(FieldTypeEnum.RELATION.getName())\n || (fieldInfo.getRelationData().getAsSelf() != null\n && fieldInfo.getRelationData().getAsSelf() == 1)) {\n continue;\n }\n processedField.add(fieldInfo.getFieldName());\n List<Long> newIdsList = new ArrayList<>();\n List<Long> oldIdsList = new ArrayList<>();\n List<Long> newRecordIds = new ArrayList<>();\n List<Long> oldRecordIds = new ArrayList<>();\n String newValStr = StringUtil.safeCastToString(newData.getValue());\n if (StringUtils.isNotBlank(newValStr)) {\n try {\n newIdsList = mapper.readValue(newValStr, listTypeReference);\n } catch (IOException e) {\n throw new CustomException(e.getLocalizedMessage());\n }\n }\n String oldValStr = StringUtil.safeCastToString(oldDynamicData.get(newData.getKey()));\n if (StringUtils.isNotBlank(oldValStr)) {\n try {\n oldIdsList = mapper.readValue(oldValStr, listTypeReference);\n } catch (IOException e) {\n throw new CustomException(e.getLocalizedMessage());\n }\n }\n for (int i = 0; i < newIdsList.size(); i++) {\n if (!oldIdsList.contains(newIdsList.get(i))) {\n newRecordIds.add(newIdsList.get(i));\n }\n }\n for (int i = 0; i < oldIdsList.size(); i++) {\n if (!newIdsList.contains(oldIdsList.get(i))) {\n oldRecordIds.add(oldIdsList.get(i));\n }\n }\n if (!newRecordIds.isEmpty() || !oldRecordIds.isEmpty()) {\n RelationDataInfosInDTO relationDataInfos = new RelationDataInfosInDTO();\n relationDataInfos.setFieldId(fieldInfo.getRelationData().getFieldId());\n relationDataInfos.setNewRecordIds(newRecordIds);\n relationDataInfos.setOldRecordIds(oldRecordIds);\n UpdateRelationDataRequest requestBuilder = requestsMap\n .get(fieldInfo.getRelationData().getFieldBelong());\n if (requestBuilder == null) {\n requestBuilder = new UpdateRelationDataRequest();\n requestBuilder.setRecordId(recordId);\n requestsMap.put(fieldInfo.getRelationData().getFieldBelong(), requestBuilder);\n }\n requestBuilder.getRelationDataInfos().add(relationDataInfos);\n }\n }\n\n for (Map.Entry<String, Object> oldData : oldDynamicData.entrySet()) {\n CustomFieldsInfoOutDTO fieldInfo = fieldsmap.get(oldData.getKey());\n if (fieldInfo == null || processedField.contains(oldData.getKey())\n || !fieldInfo.getFieldName().startsWith(FieldTypeEnum.RELATION.getName())\n || (fieldInfo.getRelationData().getAsSelf() != null\n && fieldInfo.getRelationData().getAsSelf() == 1)) {\n continue;\n }\n List<Long> oldRecordIds = new ArrayList<>();\n String oldValStr = StringUtil.safeCastToString(oldData.getValue());\n if (StringUtils.isNotBlank(oldValStr)) {\n try {\n oldRecordIds = mapper.readValue(oldValStr, listTypeReference);\n } catch (IOException e) {\n throw new CustomException(e.getLocalizedMessage());\n }\n }\n if (oldRecordIds != null && !oldRecordIds.isEmpty()) {\n RelationDataInfosInDTO relationDataInfos = new RelationDataInfosInDTO();\n relationDataInfos.setFieldId(fieldInfo.getRelationData().getFieldId());\n relationDataInfos.setOldRecordIds(oldRecordIds);\n UpdateRelationDataRequest requestBuilder = requestsMap\n .get(fieldInfo.getRelationData().getFieldBelong());\n if (requestBuilder == null) {\n requestBuilder = new UpdateRelationDataRequest();\n requestBuilder.setRecordId(recordId);\n requestsMap.put(fieldInfo.getRelationData().getFieldBelong(), requestBuilder);\n }\n requestBuilder.getRelationDataInfos().add(relationDataInfos);\n }\n }\n\n for (Map.Entry<Integer, UpdateRelationDataRequest> request : requestsMap.entrySet()) {\n if (FieldBelongEnum.CUSTOMER.getCode().equals(request.getKey())) {\n this.updateRelationData(request.getValue().getRecordId(), request.getValue().getRelationDataInfos());\n } else {\n UpdateRelationDataResponse relationRes = RelationUtil.callUpdateRelationData(restOperationUtils,\n request.getValue(), request.getKey(), SecurityUtils.getTokenValue().orElse(null),\n jwtTokenUtil.getTenantIdFromToken());\n if (relationRes != null && relationRes.getErrorAttributes() != null\n && !relationRes.getErrorAttributes().isEmpty()) {\n CustomRestException ex = new CustomRestException();\n ex.setExtensions(relationRes.getErrorAttributes());\n throw ex;\n }\n }\n }\n }", "protected void setProjectFields(final ArrayList<Field> fields) {\n\t\tthis._projectFields = fields;\n\t\t\n\t\t\n\t\t// Assign all special fields to their corresponding variables\n\t\tfor (Field field : fields) {\n\t\t\tif (field.getName().equals(\"Function Requirements\")) {\n\t\t\t\t_functionReq = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"Data Requirements\")) {\n\t\t\t\t_dataReq = field;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"Performance Requirements\")) {\n\t\t\t\t_performanceReq = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"Glossary\")) {\n\t\t\t\t_glossary = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"FP Parameters\")) {\n\t\t\t\t_fpParameters = field;\n\t\t\t}\n\t\t\telse if (field.getName().equals(\"FP Influences\")){\n\t\t\t\t_fpInfluences = field;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// Calculation\n\t\t_calcMethodEnum = CalculationEnum.notSet;\n\t\t_calcMethodInstance = null;\n\t\t\n\t}", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "public IConfigAdditionalData provideFormattedAdditionalData(WorldInfo worldInfo);" ]
[ "0.7183989", "0.6729701", "0.665069", "0.5982724", "0.5828805", "0.56023747", "0.55277115", "0.5468438", "0.5457142", "0.53890485", "0.5367304", "0.536162", "0.53112155", "0.5241302", "0.51736367", "0.5161125", "0.5120797", "0.5091235", "0.5084397", "0.5034744", "0.50292325", "0.5010005", "0.50072426", "0.5005328", "0.49855167", "0.49529243", "0.49475282", "0.4931434", "0.49299544", "0.4920858", "0.48876795", "0.48736364", "0.48548865", "0.48477596", "0.48395124", "0.4789119", "0.47770867", "0.47596568", "0.4755638", "0.47518343", "0.4746615", "0.47224617", "0.4683593", "0.46727368", "0.46570474", "0.4647233", "0.46168664", "0.46138832", "0.4588724", "0.458783", "0.45832622", "0.4578161", "0.45688906", "0.45666748", "0.45651263", "0.4560796", "0.45558715", "0.45528924", "0.45413378", "0.45370784", "0.45296407", "0.45193967", "0.45114657", "0.44823185", "0.44460917", "0.44203386", "0.44202662", "0.44154897", "0.4414914", "0.4409679", "0.44093934", "0.4407888", "0.44021013", "0.44020408", "0.43850183", "0.43776843", "0.43712136", "0.43689293", "0.43645248", "0.4361014", "0.43583843", "0.43565434", "0.4352875", "0.43390214", "0.43379784", "0.43347323", "0.4332762", "0.43225154", "0.4316156", "0.43140683", "0.4311459", "0.43069348", "0.43013436", "0.42978612", "0.4277643", "0.42766392", "0.42696598", "0.42650387", "0.42647687", "0.42644402" ]
0.6860952
1
Sets the "version made by" field.
public void setVersionMadeBy(final int versionMadeBy) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "4f3a4f9c-a6d0-45d5-99d0-cedc79ad4b94"); this.versionMadeBy = versionMadeBy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setVersion(long version);", "void setVersion(String version);", "void setVersion(String version);", "public void setVersion(long param){\n \n // setting primitive attribute tracker to true\n \n if (param==java.lang.Long.MIN_VALUE) {\n localVersionTracker = false;\n \n } else {\n localVersionTracker = true;\n }\n \n this.localVersion=param;\n \n\n }", "public void setManifestVersion() {\n\t\tSharedPreferences.Editor editor = sp.edit();\n\t\teditor.putString(VERSION_KEY, thisVersion);\n\t\teditor.commit();\n\t}", "public void setLastUpdatedBy(Number value)\n {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public int getVersionMadeBy() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"284fe80a-e714-45e1-aa2f-65828d5889c7\");\n return versionMadeBy;\n }", "public void setVersion(String version);", "public void setModifiedBy(String v) \n {\n \n if (!ObjectUtils.equals(this.modifiedBy, v))\n {\n this.modifiedBy = v;\n setModified(true);\n }\n \n \n }", "public void setLastUpdatedBy(Number value) {\r\n setAttributeInternal(LASTUPDATEDBY, value);\r\n }", "public void setVersion(int value) {\n this.version = value;\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(Number value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setVersion(String version)\n {\n this.ver = version;\n }", "@SuppressWarnings(\"unused\")\n private void setVersion(Long version) {\n this.version = version;\n }", "public void setUpdatedby( String updatedby )\n {\n this.updatedby = updatedby;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setCreatedBy(Number value)\n {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setVer(Integer ver) {\n this.ver = ver;\n }", "private void setVersionNumber(int version) {\n versionNumber = version;\n }", "public void setCreatedBy(String v) \n {\n \n if (!ObjectUtils.equals(this.createdBy, v))\n {\n this.createdBy = v;\n setModified(true);\n }\n \n \n }", "public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }", "public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }", "public void setUpdatedBy(String value) {\n setAttributeInternal(UPDATEDBY, value);\n }", "private void setVersion(long value) {\n bitField0_ |= 0x00000002;\n version_ = value;\n }", "@Override\r\n\tpublic void setVersion(int version) {\n\r\n\t}", "public void setVersion(final Long version);", "public void setLastUpdatedBy(String value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setLastUpdatedBy(String value) {\n setAttributeInternal(LASTUPDATEDBY, value);\n }", "public void setModifiedBy(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());\r\n }else\r\n {\r\n removeModifiedBy();\r\n }\r\n }", "public void setModifiedBy(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());\r\n }else\r\n {\r\n removeModifiedBy();\r\n }\r\n }", "public void setModifiedBy(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_modifiedBy, value.getSemanticObject());\r\n }else\r\n {\r\n removeModifiedBy();\r\n }\r\n }", "public void setVersion(String value) {\n\t\tthis._version = value;\n\t}", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(Number value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public synchronized void setVersion(final InternationalString newValue) {\n checkWritePermission();\n version = newValue;\n }", "public void setModifiedBy(String value) {\r\n setAttributeInternal(MODIFIEDBY, value);\r\n }", "void setUpdateby(final U lastModifiedBy);", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public void setVer(Integer ver) {\n\t\tthis.ver = ver;\n\t}", "public void setModifiedBy(String value) {\n setAttributeInternal(MODIFIEDBY, value);\n }", "public void setCreatedby( java.lang.Integer newValue ) {\n __setCache(\"createdby\", newValue);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setModifiedBy(Date modifiedBy) {\n this.modifiedBy = modifiedBy;\n }", "public void setVersion(String version)\n {\n this.version = version;\n }", "public void setModifiedBy(int tmp) {\n this.modifiedBy = tmp;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public void setAuthor(String author) {\r\n String old = this.author;\r\n this.author = author;\r\n this.changeSupport.firePropertyChange(\"author\", old, this.author );\r\n }", "public void setAuthor(String value) {\n setAttributeInternal(AUTHOR, value);\n }", "public void setModifiedby( java.lang.Integer newValue ) {\n __setCache(\"modifiedby\", newValue);\n }", "public void setLastModifiedBy(com.sforce.soap.enterprise.sobject.User lastModifiedBy) {\r\n this.lastModifiedBy = lastModifiedBy;\r\n }", "public void setVersion(String version) {\n\t\t\r\n\t}", "public void setVersion(Number value) {\n setAttributeInternal(VERSION, value);\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(int version)\n\t{\n\t\tconferenceInfo.setAttribute(VERSION_ATTR_NAME, Integer.toString(version));\n\t}", "Builder addVersion(String value);", "@Override\n\tpublic void setModifiedBy(long modifiedBy) {\n\t\t_candidate.setModifiedBy(modifiedBy);\n\t}", "public final void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(java.lang.String version) {\r\n this.version = version;\r\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public com.babbler.ws.io.avro.model.BabbleValue.Builder setAuthor(java.lang.String value) {\n validate(fields()[0], value);\n this.author = value;\n fieldSetFlags()[0] = true;\n return this;\n }", "public void setCurrentVersion(String currentVersion) {\n this.currentVersion = currentVersion;\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setLastChangedBy(java.lang.String lastChangedBy) {\n\t\tthis.lastChangedBy = lastChangedBy;\n\t}", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setCreatedBy(String value) {\n setAttributeInternal(CREATEDBY, value);\n }", "public void setFileVersion(int fileVersion) {\r\n\t\tthis.fileVersion = fileVersion;\r\n\t}", "public void setVersion(String _version) {\n this._version = _version;\n }", "public void setModifiedByUser(long modifiedByUser);", "public void setSrcModifiedBy(String value) {\r\n setAttributeInternal(SRCMODIFIEDBY, value);\r\n }", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public void setTitleVersion(String val){\n\t\ttvr = val;\n\t}" ]
[ "0.6371589", "0.6170341", "0.6170341", "0.6101211", "0.60862917", "0.60620135", "0.6057954", "0.60324407", "0.5976147", "0.59337074", "0.5918645", "0.59052545", "0.59052545", "0.59052545", "0.59052545", "0.59052545", "0.59052545", "0.59052545", "0.59052545", "0.59052545", "0.5877958", "0.5826897", "0.58238417", "0.57942265", "0.57867575", "0.57862234", "0.57747954", "0.5748171", "0.5745777", "0.5745777", "0.5745777", "0.56916064", "0.5674623", "0.56737626", "0.56686884", "0.56686884", "0.5656993", "0.5656993", "0.5656993", "0.56497055", "0.564539", "0.564539", "0.564539", "0.564539", "0.564539", "0.564539", "0.564539", "0.564539", "0.5644644", "0.5639516", "0.562447", "0.5619911", "0.56087154", "0.55969036", "0.5554624", "0.5541681", "0.5541681", "0.55370826", "0.552468", "0.5492487", "0.5491935", "0.5491935", "0.5491935", "0.5491935", "0.5491458", "0.5491458", "0.5491458", "0.5490752", "0.5490752", "0.54842716", "0.5463911", "0.5437474", "0.5431546", "0.5426144", "0.5419812", "0.54159856", "0.54050237", "0.540128", "0.5389493", "0.53892666", "0.5388743", "0.538296", "0.5380177", "0.537785", "0.5374431", "0.5370054", "0.5368849", "0.5367367", "0.5367367", "0.5367367", "0.5367367", "0.5367367", "0.5367367", "0.5367367", "0.5366168", "0.5357794", "0.5355606", "0.5344619", "0.5342082", "0.53415424" ]
0.723946
0
Sets the "version required to expand" field.
public void setVersionRequired(final int versionRequired) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "a3cfc1d1-f42d-4774-a02f-08271b842f43"); this.versionRequired = versionRequired; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setVersion(String version);", "@CompositeValue(ignore=true)\n @XmlAttribute(name=\"version\")\n public void setVersion(Version version)\n {\n versionRange = new VersionRange(version, true, version, true);\n }", "void setVersion(long version);", "void setVersion(String version);", "void setVersion(String version);", "public void setVersion(java.math.BigInteger version)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(VERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(VERSION$6);\r\n }\r\n target.setBigIntegerValue(version);\r\n }\r\n }", "@Override\r\n\tpublic void setVersion(int version) {\n\r\n\t}", "private void setVersion(long value) {\n bitField0_ |= 0x00000002;\n version_ = value;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public void setVersion(final Long version);", "SchemaReference setVersion(String version);", "public void setVersion(int value) {\n this.version = value;\n }", "private void setVersionNumber(int version) {\n versionNumber = version;\n }", "public void setManifestVersion() {\n\t\tSharedPreferences.Editor editor = sp.edit();\n\t\teditor.putString(VERSION_KEY, thisVersion);\n\t\teditor.commit();\n\t}", "public ResourceMount setMinVersion(final AbstractResourceVersion minVersion) {\n\t\t_minVersion = minVersion;\n\t\treturn this;\n\t}", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public static void requireVersion(String version) throws IllegalStateException {\n // check dependencies\n\n // NOTE: this is safe as int operations are atomic ...\n if (VERSION_MAJOR < 0)\n extractCurrentVersion();\n int[] parsed;\n try {\n parsed = parseVersion(version);\n } catch (NumberFormatException ex) {\n throw new IllegalStateException(\"could not parse \" + PROJECT_NAME + \" version string \" + version);\n }\n int major = parsed[0];\n int minor = parsed[1];\n int increment = parsed[2];\n\n if (major != VERSION_MAJOR) {\n throw new IllegalStateException(\"required \" + PROJECT_NAME + \" \" + version + \" has different major version\"\n + \" from current \" + SPEC_VERSION);\n }\n if (minor > VERSION_MINOR) {\n throw new IllegalStateException(\"required \" + PROJECT_NAME + \" \" + version + \" has too big minor version\"\n + \" when compared to current \" + SPEC_VERSION);\n }\n if (minor == VERSION_MINOR) {\n if (increment > VERSION_INCREMENT) {\n throw new IllegalStateException(\"required \" + PROJECT_NAME + \" \" + version\n + \" has too big increment version\" + \" when compared to current \" + SPEC_VERSION);\n }\n }\n }", "public void setVersion(String version) {\n\t\t\r\n\t}", "public void setVersion(Number value) {\n setAttributeInternal(VERSION, value);\n }", "public void setVersion(String version)\n {\n this.ver = version;\n }", "public Builder setVersion(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n version_ = value;\n bitField0_ |= 0x00008000;\n onChanged();\n return this;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(String version) {\r\n this.version = version == null ? null : version.trim();\r\n }", "public void setVersion(org.hl7.fhir.String version)\n {\n generatedSetterHelperImpl(version, VERSION$4, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void xsetVersion(org.apache.xmlbeans.XmlInteger version)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(VERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_element_user(VERSION$6);\r\n }\r\n target.set(version);\r\n }\r\n }", "public Builder setVersion(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n version_ = value;\n onChanged();\n return this;\n }", "public Builder clearVersion() {\n\n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public Builder clearVersion() {\n\n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public Builder clearVersion() {\n\n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public void setVersion(String version) {\n this.version = version == null ? null : version.trim();\n }", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n version_ = value;\n onChanged();\n return this;\n }", "public void setVersion(String value) {\n\t\tthis._version = value;\n\t}", "public void setVersion(String _version) {\n this._version = _version;\n }", "public void setVersion(long param){\n \n // setting primitive attribute tracker to true\n \n if (param==java.lang.Long.MIN_VALUE) {\n localVersionTracker = false;\n \n } else {\n localVersionTracker = true;\n }\n \n this.localVersion=param;\n \n\n }", "public Builder clearVersion() {\n \n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public Builder clearVersion() {\n version_ = getDefaultInstance().getVersion();\n bitField0_ = (bitField0_ & ~0x00008000);\n onChanged();\n return this;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "@SuppressWarnings(\"unused\")\n private void setVersion(Long version) {\n this.version = version;\n }", "public Builder clearVersion() {\n \n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public Builder clearVersion() {\n \n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public Builder clearVersion() {\n \n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "public void setVersion(String version)\n {\n this.version = version;\n }", "private void setNodeVersion(int nodeVersion) {\n this.nodeVersion = nodeVersion;\r\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "void xsetApplicationVersion(com.microsoft.schemas.office.x2006.digsig.STVersion applicationVersion);", "public final void setVersion(String version) {\n this.version = version;\n }", "public Builder clearVersion() {\n bitField0_ = (bitField0_ & ~0x00000002);\n version_ = getDefaultInstance().getVersion();\n onChanged();\n return this;\n }", "Builder addVersion(String value);", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "@SuppressWarnings(\"unused\")\n private void setVersion(final Integer version) {\n this.version = version;\n }", "@SuppressWarnings(\"unused\")\n private void setVersion(final Integer version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(BigDecimal version) {\r\n this.version = version;\r\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\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 void setVersion(String version) {\n\t\tthis.version = version;\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 }", "public void setVersion(java.lang.String version) {\r\n this.version = version;\r\n }", "public Builder setVersion(long value) {\n copyOnWrite();\n instance.setVersion(value);\n return this;\n }", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "public Gel_BioInf_Models.VirtualPanel.Builder setEnsemblVersion(java.lang.String value) {\n validate(fields()[2], value);\n this.ensemblVersion = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "public Builder setVersion(final String value) {\n _version = value;\n return this;\n }", "public void setVersion( String version )\n {\n this.version = version.toLowerCase( Locale.ENGLISH );\n }", "@ApiModelProperty(value = \"Software Statement version as provided by the organisation's PTC\")\n\n @Valid\n\n public BigDecimal getVersion() {\n return version;\n }", "@ApiModelProperty(value = \"(Is this valid?)\")\n public Long getVersion() {\n return version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVersion(Long version) {\n this.version = version;\n }", "public void setVer(Integer ver) {\n this.ver = ver;\n }", "public void setMajorSchemaVersion(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(MAJORSCHEMAVERSION_PROP.get(), value);\n }", "@Override\r\n public void setMaxVersions(int parseInt) {\n\r\n }", "public void setMajorSchemaVersion(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(MAJORSCHEMAVERSION_PROP.get(), value);\n }", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setEnvelopeVersion(java.lang.String value) {\n validate(fields()[12], value);\n this.envelopeVersion = value;\n fieldSetFlags()[12] = true;\n return this;\n }", "public void setMissiveVersion(String version) {\n\n // Set the missive document version\n this.missive.setVersion(version);\n\n // Build the missive document\n this.build();\n }", "@Override\n\tpublic void setVersion(java.lang.String version) {\n\t\t_scienceApp.setVersion(version);\n\t}", "public final native void setRequired(boolean required) /*-{\n\t\tthis.required = required;\n\t}-*/;", "public Builder setCurrentVersion(int value) {\n bitField0_ |= 0x00000080;\n currentVersion_ = value;\n onChanged();\n return this;\n }", "void setApplicationVersion(java.lang.String applicationVersion);", "public void setVer(Integer ver) {\n\t\tthis.ver = ver;\n\t}", "public void addVersion() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"version\",\n null,\n childrenNames());\n }", "public Builder version(String version) {\n descriptor.version(version);\n return this;\n }" ]
[ "0.6121146", "0.6098822", "0.6071798", "0.6070614", "0.6070614", "0.6056473", "0.59276134", "0.59157157", "0.58429974", "0.58429974", "0.58429974", "0.58289003", "0.5794881", "0.57813895", "0.57806915", "0.5773024", "0.57716066", "0.57630664", "0.5750056", "0.5746905", "0.574334", "0.5709537", "0.57029915", "0.5685274", "0.56828815", "0.5665379", "0.5656035", "0.56540954", "0.56533515", "0.56533515", "0.56533515", "0.5645538", "0.56444055", "0.5644276", "0.5644276", "0.5644276", "0.56428325", "0.5619235", "0.5613243", "0.5608532", "0.55995506", "0.5593015", "0.5593015", "0.5592092", "0.5592092", "0.55813324", "0.5569602", "0.5569602", "0.5569602", "0.5562623", "0.5539992", "0.5539245", "0.5539096", "0.553366", "0.5532709", "0.55112535", "0.5507597", "0.55063653", "0.5502856", "0.5502856", "0.5501838", "0.5476866", "0.54712653", "0.54632086", "0.54632086", "0.54632086", "0.5440397", "0.5436718", "0.5436718", "0.5436718", "0.5436718", "0.5436718", "0.5436718", "0.5429612", "0.5423848", "0.5423172", "0.5404558", "0.54008996", "0.53981227", "0.53835136", "0.53756326", "0.53698033", "0.53638023", "0.5353534", "0.5353534", "0.5353534", "0.5353534", "0.53394186", "0.5306597", "0.5298688", "0.529388", "0.5258977", "0.5254804", "0.524008", "0.52390057", "0.52105653", "0.52032536", "0.51979995", "0.5197368", "0.5192392" ]
0.58281124
12
The "version required to expand" field.
public int getVersionRequired() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "ec31c6e5-34ef-44da-8808-414620998e2a"); return versionRequired; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ApiModelProperty(value = \"(Is this valid?)\")\n public Long getVersion() {\n return version;\n }", "public String getVersionConstraint() {\n return version;\n }", "@ApiModelProperty(value = \"Software Statement version as provided by the organisation's PTC\")\n\n @Valid\n\n public BigDecimal getVersion() {\n return version;\n }", "public String getRequestVersion () {\n\treturn requestVersion;\n }", "@Override\n @XmlElement(name = \"version\", required = true)\n public synchronized InternationalString getVersion() {\n return version;\n }", "public String getExpectedVersion() {\r\n\t\treturn this.exp;\r\n\t}", "@CheckForNull\n 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();", "String getEmptyVersion();", "public String getProductVersion();", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "String offerVersion();", "private MappingFieldElement validateVersionFieldExistence () \n\t\t\t\tthrows ModelValidationException\n\t\t\t{\n\t\t\t\tList versionFields = mappingClass.getVersionFields();\n\n\t\t\t\t// must have exactly 1 version field (for this release)\n\t\t\t\tif (versionFields.size() != 1)\n\t\t\t\t{\n\t\t\t\t\tthrow constructClassException(mappingClass.getName(), \n\t\t\t\t\t\tnull, \"util.validation.version_field_cardinality\");\t//NOI18N\n\t\t\t\t}\n\n\t\t\t\treturn (MappingFieldElement)versionFields.get(0);\n\t\t\t}", "public String getVersion(){\r\n return version;\r\n }", "public String getVersionNumber ();", "public int getVersion() { return 1; }", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersion () {\r\n return version;\r\n }", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "public String getVersion()\n {\n return ver;\n }", "public CimString getFullVersion() {\n return fullVersion;\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "@ApiModelProperty(example = \"1.0.0\", value = \"The raw version for this package.\")\n public String getVersion() {\n return version;\n }", "public long getVersionNo() {\r\n return versionNo;\r\n }", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "public String getVersion()\r\n {\r\n return(\"Ver. 1.0\");\r\n }", "String getSchemaVersion();", "public String getVersion() {\r\n return version;\r\n }", "@NotNull\n @JsonProperty(\"version\")\n public Long getVersion();", "public BigDecimal getVersion() {\r\n return version;\r\n }", "String buildVersion();", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersionNum();", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "@Key(\"application.version\")\n\tString applicationVersion();", "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 }", "@Override\n public String getVersionString() {\n return versionString;\n }", "public String getVer() {\r\n return this.ver;\r\n }", "public String getVersion() {\n return version;\n }", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\n\t\treturn version;\n\t}", "@Override\n public double getVersion() {\n return 0;\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 String getVersion() {\n\t\treturn (VERSION);\n\t}", "@Internal(\"Represented as part of archiveName\")\n public String getVersion() {\n return version;\n }", "BigDecimal getLqnSchemaVersion();", "@ApiModelProperty(value = \"The version is used for optimistic locking and incremented whenever the object is updated.\")\n public Integer getVersion() {\n return version;\n }", "public static String getVersion()\n {\n return \"\";\n }", "public static String getVersion()\n {\n return \"\";\n }", "public String getVersion() {\n\t\treturn _version;\n\t}", "public String getVersion() {\n return _version;\n }", "public String getVersion() {\n return this.version;\n }", "public java.lang.String getVersion() {\n return version_;\n }", "public final String getVersion() {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "@Override\n public int getVersion() {\n return 0;\n }", "public CimString getVersion() {\n return version;\n }", "public String getRequiredVersion() {\n/* 152 */ return this.jspversion;\n/* */ }", "public Version version()\n/* */ {\n/* 518 */ return PackageVersion.VERSION;\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 getVersion() {\n\t\treturn version;\r\n\t}" ]
[ "0.6804754", "0.6674165", "0.64950365", "0.64614856", "0.6444204", "0.6409048", "0.63975", "0.6387709", "0.6387709", "0.6387709", "0.6387709", "0.6387709", "0.6387709", "0.6387709", "0.6387709", "0.6324045", "0.6294297", "0.6276682", "0.6270078", "0.625893", "0.6248959", "0.6215836", "0.621322", "0.6193257", "0.617953", "0.617953", "0.6179435", "0.6178102", "0.6173928", "0.6163132", "0.6157853", "0.6157797", "0.6157797", "0.6157797", "0.6157797", "0.6157762", "0.612929", "0.6128396", "0.61258787", "0.61251205", "0.6118927", "0.61186063", "0.6111629", "0.60978425", "0.6095381", "0.6095381", "0.60846895", "0.6084112", "0.60724884", "0.6067041", "0.6067041", "0.6067041", "0.6067041", "0.6060393", "0.6059654", "0.6053773", "0.6048792", "0.6041078", "0.6038249", "0.6036537", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.6034406", "0.60307556", "0.6027845", "0.6020769", "0.6016996", "0.60167134", "0.60167134", "0.60099673", "0.6008696", "0.6006786", "0.6005608", "0.6004981", "0.59987336", "0.59987336", "0.59795743", "0.5971847", "0.5953177", "0.5950417", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5944687", "0.5940976" ]
0.5953137
87
The "version made by" field.
public int getVersionMadeBy() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "284fe80a-e714-45e1-aa2f-65828d5889c7"); return versionMadeBy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVersion()\n\t{\n\t\treturn \"$Date$\";\n\t}", "public String getVersionDate();", "public static String getVersion()\n {\n return \"$Id$\";\n }", "public String getVersion()\r\n {\r\n return(\"Ver. 1.0\");\r\n }", "public String getVersionNumber ();", "public String getVersion(){\r\n return version;\r\n }", "public String getVersionname() {\r\n return versionname;\r\n }", "public String getVersion()\n {\n return ver;\n }", "public Date getVersionDate ();", "public String getVer() {\r\n return this.ver;\r\n }", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public static String getVersion()\n\t{\n\t\treturn (\"$Revision: 1.2 $,$Date: 2006/10/26 01:35:10 $\") ;\n\t}", "public long getVersionNo() {\r\n return versionNo;\r\n }", "public String getAuthor() {\n\t\treturn \"Prasoon, Vikas, Shantanu\";\n\t}", "public String getVersion() {\r\n return (\"2004.09\");\r\n }", "public String getLastUpdateAuthor() {\n return (String)content.get(LAST_UPDATE_AUTHOR);\n }", "public String getVerName() {\n return verName;\n }", "@DISPID(1)\r\n\t// = 0x1. The runtime will prefer the VTID if present\r\n\t@VTID(7)\r\n\tjava.util.Date revisionDateTime();", "public String getVersion () {\r\n return version;\r\n }", "public static String getVersion()\n\t{\n\t\treturn (\"$Revision: 1.2 $,$Date: 2006/12/07 08:57:29 $\");\n\t}", "public String getVersionId() {\n return versionId;\n }", "public String getRevision() {\n\t\treturn null;\r\n\t}", "public static String getVersion()\n\t{\n\t\treturn (\"$Revision: 1.3 $\") ;\n\t}", "public void setVersionMadeBy(final int versionMadeBy) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4f3a4f9c-a6d0-45d5-99d0-cedc79ad4b94\");\n this.versionMadeBy = versionMadeBy;\n }", "@Override\n public String toString() {\n return versionString;\n }", "public String getVersion() {\n return this.version;\n }", "public String getVersionTitle()\r\n\t{\r\n\t\treturn versionTitle;\r\n\t}", "public String getVersion() {\n\t\treturn (VERSION);\n\t}", "public static String getVersion()\n\t{\n\t\treturn \"$Revision: 1.2 $,$Date: 2006/11/14 06:09:22 $\";\n\t}", "@Override\r\n\tpublic String getRevision() {\n\t\treturn null;\r\n\t}", "public String getVersionNumber() {\n return versionNumber;\n }", "@Override\n\t\tpublic String getRevision() {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic String getRevision() {\n\t\t\treturn null;\n\t\t}", "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 getAuthor()\r\n {\r\n return(\"Judy O'Brien\");\r\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 getRevision() {\n return RevisionUtils.extract(\"$Revision: 8034 $\");\n }", "public String getVersion () {\n return this.version;\n }", "public String getRevision() {\n\t\treturn RevisionUtils.extract(\"$Revision: 1.9 $\");\n\t}", "public String getVersion()\n {\n return version;\n }", "public String getVersionName() {\n return versionName;\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getRevision() {\n return revision;\n }", "public String getVersion() {\n return _version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getRevision() {\n return RevisionUtils.extract(\"$Revision$\");\n }", "public String getVersion() {\n\t\treturn _version;\n\t}", "public String getVersion() {\r\n return version;\r\n }", "@Override\n\tpublic String getRevision() {\n\t\treturn RevisionUtils.extract(\"$Revision$\");\n\t}", "public String getModifiAuthor() {\n return modifiAuthor;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion()\n {\n return version;\n }", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "long getVersionNumber();", "@DISPID(2)\r\n\t// = 0x2. The runtime will prefer the VTID if present\r\n\t@VTID(8)\r\n\tjava.lang.String revisionUser();", "@Override\n\tpublic String author() {\n\t\treturn author;\n\t}", "public String getVersionName() {\n return this.versionName;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n\t\treturn version;\n\t}", "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 abstract String getRevision();", "@Override\n public String getVersionString() {\n return versionString;\n }", "public String getRevisionNumber()\n {\n return (revisionNumber);\n }", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public final String getVersion() {\n return version;\n }", "public long getVersion(){\n return localVersion;\n }", "private static String authorLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, NAME_STR, NAME);\n }", "public String getMODIFIED_BY() {\r\n return MODIFIED_BY;\r\n }", "public String getMODIFIED_BY() {\r\n return MODIFIED_BY;\r\n }", "public String getMODIFIED_BY() {\r\n return MODIFIED_BY;\r\n }", "public String getMODIFIED_BY() {\r\n return MODIFIED_BY;\r\n }", "public String getVersionNum();", "public java.lang.String getVersion() {\n return version_;\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public java.lang.String getVersion() {\r\n return version;\r\n }" ]
[ "0.6957432", "0.6797854", "0.6554161", "0.6482959", "0.6406343", "0.63538426", "0.63385814", "0.6323003", "0.6312326", "0.6310795", "0.62963974", "0.626614", "0.6254972", "0.6251574", "0.62461716", "0.62358946", "0.6222391", "0.62151796", "0.62040466", "0.61976224", "0.61966777", "0.6193559", "0.6189806", "0.6176398", "0.6176331", "0.6169745", "0.6167584", "0.6156731", "0.6147727", "0.61352193", "0.6131887", "0.613076", "0.613076", "0.6130566", "0.6130566", "0.6130566", "0.6130566", "0.6130566", "0.6130566", "0.6130566", "0.6130566", "0.6124817", "0.612422", "0.612422", "0.612422", "0.612422", "0.6118663", "0.6118001", "0.6116659", "0.61123383", "0.610457", "0.61019415", "0.61019415", "0.61019415", "0.61019415", "0.61002904", "0.6097324", "0.6097181", "0.6097181", "0.6090718", "0.6088152", "0.6085393", "0.60733896", "0.60585886", "0.6058486", "0.6058486", "0.6052296", "0.60512", "0.60498655", "0.60473454", "0.60472363", "0.60452414", "0.60401154", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6039055", "0.6027792", "0.6004105", "0.59934556", "0.5988553", "0.598081", "0.5979872", "0.5967085", "0.5962738", "0.5962738", "0.5962738", "0.5962738", "0.5961112", "0.5960493", "0.59579617", "0.59579617", "0.59511584" ]
0.7229806
0
The content of the flags field.
public int getRawFlag() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "0811c831-ddd9-4df1-b31c-c5d631e39389"); return rawFlag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFlags() {\r\n \t\treturn flags;\r\n \t}", "public byte[] getFlags() {\n return flags;\n }", "public int getFlags() {\n return flags;\n }", "public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }", "public long getFlags() {\n }", "public String getFlaginfo() {\n return flaginfo;\n }", "public short getFlags() {\n\treturn flags;\n }", "public int getFlags() {\n Object value = library.getObject(entries, FLAGS);\n if (value instanceof Number) {\n return ((Number) value).intValue();\n }\n return 0;\n }", "public @Flags int getFlags() {\n return mFlags;\n }", "public int getFlags() {\n return ByteUtils.toUnsignedShort(flags);\n }", "public int getFlags();", "public int getFlags();", "long getFlags();", "public Integer getFLAG() {\n return FLAG;\n }", "public java.lang.String getReservedFlags() {\n return reservedFlags;\n }", "public int getFlagsNumber ()\r\n {\r\n return flagsNumber;\r\n }", "IntsRef getFlags();", "public char flags_GET()\n { return (char)((char) get_bytes(data, 0, 1)); }", "@Override\n\tpublic int getFlags() {\n\t\treturn heldObj.getFlags();\n\t}", "public int getFileFlags() { return fileFlags; }", "@Override\n public int getFlag() {\n return flag_;\n }", "@Override\n public int getFlag() {\n return flag_;\n }", "String getFlag() {\n return String.format(\"-T%d\", this.value);\n }", "public ArrayList<Flag> getFlags()\r\n {\r\n\tif(flags.isEmpty()) {\r\n\t flags.add(Flag.NONE);\r\n\t}\r\n\treturn new ArrayList<Flag>(flags);\r\n }", "@Nullable\n public Set<NameFlag> getFlags() {\n return flags;\n }", "public abstract int flags();", "public int getFlag()\n {\n return flag;\n }", "public String getQuestionFlags() \n {\n return questionFlags;\n }", "public Integer getUserFlags() {\r\n return userFlags;\r\n }", "@Nullable\n public Map<String, List<String>> getCustomFlags() {\n return mCustomFlags;\n }", "public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }", "public int getFlags() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 156);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 124);\n\t\t}\n\t}", "public int getApplicationFlags() {\n return getActivityInfo().flags;\n }", "public int getAccessFlags() {\n return access_flags;\n }", "public String getIsFlag() {\r\n return isFlag;\r\n }", "public static Collection<FieldAccessFlag> getFlags()\n\t{\n\t\treturn Lists.newArrayList(PUBLIC, PRIVATE, PROTECTED, STATIC, FINAL, VOLATILE, TRANSIENT, ENUM,\n\t\t\tSYNTHETIC);\n\t}", "public RecordFlagEnum getFlag();", "public String getShowFlag() {\r\n return (String) getAttributeInternal(SHOWFLAG);\r\n }", "int getFlagImage() {\n return this.flagImage;\n }", "public String getActiveFlag() {\n return (String) getAttributeInternal(ACTIVEFLAG);\n }", "public String getFeatureFlagString() {\n return featureFlagString;\n }", "public String getChangedflag() {\n return (String) getAttributeInternal(CHANGEDFLAG);\n }", "public String getIvaMFlag() {\n return (String) getAttributeInternal(IVAMFLAG);\n }", "public Byte getShowFlag() {\n return showFlag;\n }", "public Boolean getFlag() {\n return flag;\n }", "public String getApprovedFlag() {\r\n return (String) getAttributeInternal(APPROVEDFLAG);\r\n }", "int getFlag();", "public boolean getFlag(){\n\t\treturn flag;\n\t}", "public java.lang.Integer getBgFlags() {\r\n return bgFlags;\r\n }", "public int getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 20);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 12);\n\t\t}\n\t}", "public String osFlagsToString() {\n String result = \"\";\n if ((osFlags & FLAG_OS_RECOVERY) != 0) {\n result += \"Recovery,\";\n }\n if ((osFlags & FLAG_OS_SIGNED_MCU) != 0) {\n result += \"Signed MCU,\";\n }\n if ((osFlags & FLAG_OS_ONBOARDED) != 0) {\n result += \"Onboarded,\";\n }\n if ((osFlags & FLAG_TRUST_ISSUER) != 0) {\n result += \"Trust issuer,\";\n }\n if ((osFlags & FLAG_TRUST_CUSTOMCA) != 0) {\n result += \"Trust Custom CA,\"; \n }\n if ((osFlags & FLAG_HSM_INITIALIZED) != 0) {\n result += \"Personalized,\";\n }\n if ((osFlags & FLAG_PIN_VALIDATED) != 0) {\n result += \"PIN ready,\";\n }\n if (result.length() == 0) {\n return result;\n }\n else {\n return result.substring(0, result.length() - 1);\n }\n }", "public boolean getFlag() {\n\t\treturn flag;\n\t}", "public String getActiveflag() {\n return (String)getAttributeInternal(ACTIVEFLAG);\n }", "public Byte getModFlag() {\n return modFlag;\n }", "public short getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readShort(__io__address + 6);\n\t\t} else {\n\t\t\treturn __io__block.readShort(__io__address + 6);\n\t\t}\n\t}", "public int getFlag() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 4);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 4);\n\t\t}\n\t}", "public String getDateFlag() {\n return mDateFlag;\n }", "public String getLocalFlag() {\n return (String) getAttributeInternal(LOCALFLAG);\n }", "public int getOSFlags() {\n return osFlags;\n }", "public boolean hasContent() {\n return fieldSetFlags()[8];\n }", "public String getOutputFlag();", "public boolean getFlag() {\r\n\t\treturn (value.getInt() != 0);\r\n\t}", "public String getLocalFlag() {\n return (String)getAttributeInternal(LOCALFLAG);\n }", "public String getSignFlag() {\n return signFlag;\n }", "public String getValidflag() {\n return validflag;\n }", "public String getValidflag() {\n return validflag;\n }", "private FormattableFlags() {}", "@Test\n public void getFeatureFlagsTest() throws ApiException {\n String projectKey = null;\n String env = null;\n String tag = null;\n FeatureFlags response = api.getFeatureFlags(projectKey, env, tag);\n\n // TODO: test validations\n }", "public final native void setFlags(int value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.flags = value;\n }-*/;", "public String getValidflag() {\n\t\treturn validflag;\n\t}", "public String getDisplayFlag() {\n return displayFlag;\n }", "public static byte[] getBytes( int flags )\n {\n return new byte[]{\n (byte)( flags >>> 24), \n (byte)( ( flags >> 16 ) & 0x00ff ), \n (byte)( ( flags >> 8 ) & 0x00ff ), \n (byte)( flags & 0x00ff ) };\n }", "public BitField getBitField(){\n \treturn bitField;\n }", "public boolean hasContent() {\n return fieldSetFlags()[1];\n }", "abstract protected EnumSet<Parser.Flag> getParserFlags();", "BitSet valueLeafFlags();", "BitSet valueLeafFlags();", "public String getCompAccomFlag() {\n return (String)getAttributeInternal(COMPACCOMFLAG);\n }", "public Character getCurrentFlag() {\n return currentFlag;\n }", "public AbstractKerberosFlags( byte[] flags )\n {\n super( flags );\n // Remember getBytes() \"A first byte containing the number of unused bits is added\"\n value = ( ( getBytes()[1] & 0x00F ) << 24 ) | ( ( getBytes()[2] & 0x00FF ) << 16 ) | ( ( getBytes()[3] & 0x00FF ) << 8 ) | ( 0x00FF & getBytes()[4] ); \n }", "@Field(11) \n\tpublic byte CombOffsetFlag() {\n\t\treturn this.io.getByteField(this, 11);\n\t}", "public byte getModifier(){\r\n\t\treturn modifiers;\r\n\t}", "public java.lang.String getContractFlag() {\n return contractFlag;\n }", "protected String getBitLength()\n {\n return bitLength;\n }", "public Set<Glyph> getFlagGlyphs ()\r\n {\r\n return flagGlyphs;\r\n }", "ForumFlag getFlag();", "public String getDisplayFlag() {\n\t\treturn displayFlag;\n\t}", "public boolean isFlagsreceived() {\r\n return flagsreceived;\r\n }", "com.google.protobuf.ByteString\n getModeBytes();", "abstract char[] parseFlags(String rawFlags);", "public String toString()\n\t{\n\t\treturn Integer.toString(bitHolder.getValue());\n\t}", "public Flag()\n {\n super(\"Flag\");\n }", "public Set<E> getActiveFlags();", "public int getFlagPoints() {\n\n return m_flagPoints;\n }", "public Character getOperationalFlag() {\n return operationalFlag;\n }", "public BooleanSeqContent() {\n this.value = new boolean[0];\n this.isAll = false;\n }", "public java.lang.String getField1111() {\n java.lang.Object ref = field1111_;\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 field1111_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@XmlTransient\n public List<FlagDataTypeConfig> getFlagConfigs() {\n return flagCfg;\n }", "public Byte getDeleteFlag() {\n return deleteFlag;\n }", "public short getFlagsCarried() {\n\n return m_flagsCarried;\n }" ]
[ "0.7989398", "0.7497036", "0.7297307", "0.7098499", "0.7059775", "0.70476496", "0.70460963", "0.70009995", "0.69704014", "0.6833208", "0.6821035", "0.6821035", "0.663849", "0.66015047", "0.6546239", "0.6530054", "0.6529755", "0.6426113", "0.64193636", "0.63818157", "0.63030887", "0.6302764", "0.6295976", "0.6293727", "0.6286607", "0.62583095", "0.62314135", "0.6192906", "0.6188458", "0.6087196", "0.606646", "0.60602045", "0.6060092", "0.6051245", "0.604861", "0.60360813", "0.5959569", "0.5887274", "0.5880988", "0.5878849", "0.5862773", "0.58503944", "0.5842624", "0.5834934", "0.58274615", "0.5817163", "0.581633", "0.5795245", "0.5791647", "0.57874674", "0.5752269", "0.5751593", "0.5744982", "0.57100093", "0.56868565", "0.568381", "0.56704944", "0.56624484", "0.565978", "0.5633813", "0.56314313", "0.5630522", "0.56222564", "0.560355", "0.55869204", "0.55869204", "0.5568732", "0.55681324", "0.5559691", "0.5536603", "0.55316603", "0.5517758", "0.5513387", "0.55046076", "0.5503942", "0.5488148", "0.5488148", "0.5471985", "0.54560405", "0.5452251", "0.54325324", "0.542392", "0.5422411", "0.54219437", "0.5402899", "0.5397289", "0.5390804", "0.53824806", "0.53728884", "0.53613", "0.53535575", "0.5345233", "0.5342278", "0.5325879", "0.53175133", "0.5306251", "0.5298723", "0.5294912", "0.5291758", "0.52910435" ]
0.5398754
85
Sets the content of the flags field.
public void setRawFlag(final int rawFlag) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "e6d9783a-df0e-4db2-926b-f8935921c8da"); this.rawFlag = rawFlag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFlags(final Flags flags);", "public final native void setFlags(int value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.flags = value;\n }-*/;", "public void setFlags(org.apache.axis.types.UnsignedInt flags) {\n this.flags = flags;\n }", "public static void setFlags(int flag){\r\n flags |= flag;\r\n }", "public void setFlags(short flag) {\n\tflags = flag;\n }", "public void setFlags( byte[] bytes )\n {\n if ( (bytes== null ) || ( bytes.length != 4 ) )\n {\n value = -1;\n }\n \n value = ( ( bytes[0] & 0x00F ) << 24 ) | ( ( bytes[1] & 0x00FF ) << 16 ) | ( ( bytes[2] & 0x00FF ) << 8 ) | ( 0x00FF & bytes[3] ); \n setData( bytes );\n }", "public void setFlags(int flags) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 156, flags);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 124, flags);\n\t\t}\n\t}", "public void setFlags(int param1) {\n }", "public ItemBuilder setFlags(ItemFlag... flags) {\r\n\t\tthis.flags = flags;\r\n\t\treturn this;\r\n\t}", "public void setUserFlags(Integer userFlags) {\r\n this.userFlags = userFlags;\r\n }", "public void setFlag( int flag )\n {\n value |= 1 << flag;\n setBit( flag );\n }", "public synchronized void setFlags(Flags newFlags, boolean set) throws MessagingException {\n/* 91 */ Flags oldFlags = (Flags)this.flags.clone();\n/* 92 */ super.setFlags(newFlags, set);\n/* 93 */ if (!this.flags.equals(oldFlags)) {\n/* 94 */ this.folder.notifyMessageChangedListeners(1, (Message)this);\n/* */ }\n/* */ }", "protected void setFlag() {\n flag = flagVal;\n }", "protected void setFlag() {\n flag = flagVal;\n }", "public void setFlag( int flag )\n {\n value |= 1 << ( MAX_SIZE - 1 - flag );\n }", "public void setFlag( KerberosFlag flag )\n {\n int pos = MAX_SIZE - 1 - flag.getOrdinal();\n value |= 1 << pos;\n }", "public void updateFlags()\n {\n initialize();\n }", "public Builder setFlag(int value) {\n bitField0_ |= 0x00000400;\n flag_ = value;\n onChanged();\n return this;\n }", "public void setFlag(Integer flag) { this.flag = flag; }", "public void setFlag(RecordFlagEnum flag);", "public void setFlags(long uid, Flags f, boolean value) throws IOException {\n BufferedWriter out = null;\n try {\n out = openCacheFile();\n out.write(Long.toString(uid));\n out.newLine();\n Flags.Flag[] systemFlags = f.getSystemFlags();\n for (int i = 0; i < systemFlags.length; i++) {\n if (systemFlags[i] == Flags.Flag.ANSWERED) {\n out.write(\"Answered\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.DELETED) {\n out.write(\"Deleted\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.DRAFT) {\n out.write(\"Draft\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.FLAGGED) {\n out.write(\"Flagged\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.RECENT) {\n out.write(\"Recent\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.SEEN) {\n out.write(\"Seen\");\n out.newLine();\n }\n }\n String[] userFlags = f.getUserFlags();\n for (int i = 0; i < userFlags.length; i++) {\n out.write(userFlags[i]);\n out.newLine();\n }\n out.write(DONE_MSG);\n out.newLine();\n if (value) out.write(\"true\"); else out.write(\"false\");\n out.newLine();\n out.write(DONE_MSG);\n out.newLine();\n } finally {\n if (out != null) closeCacheFile(out); else lock = false;\n }\n }", "private void setBooleanFlags (short flags){\n\t\tthis.flags = flags;\n\t\tflagResetNeeded = false;\n\t\tpartOfAPairedAlignment = isPartOfAPairedAlignment();\n\t\taProperPairedAlignment = isAProperPairedAlignment();\n\t\tunmapped = isUnmapped();\n\t\tmateUnMapped = isMateUnMapped();\n\t\treverseStrand = isReverseStrand();\n\t\tmateReverseStrand = isMateReverseStrand();\n\t\tfirstPair = isFirstPair();\n\t\tsecondPair = isSecondPair();\n\t\tnotAPrimaryAlignment = isNotAPrimaryAlignment();\n\t\tfailedQC = failedQC();\n\t\taDuplicate = isADuplicate();\n\t\t\n\t}", "public void setFlags(String uid, Flags f, boolean value) throws IOException {\n BufferedWriter out = null;\n try {\n out = openCacheFile();\n out.write(uid);\n out.newLine();\n Flags.Flag[] systemFlags = f.getSystemFlags();\n for (int i = 0; i < systemFlags.length; i++) {\n if (systemFlags[i] == Flags.Flag.ANSWERED) {\n out.write(\"Answered\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.DELETED) {\n out.write(\"Deleted\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.DRAFT) {\n out.write(\"Draft\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.FLAGGED) {\n out.write(\"Flagged\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.RECENT) {\n out.write(\"Recent\");\n out.newLine();\n } else if (systemFlags[i] == Flags.Flag.SEEN) {\n out.write(\"Seen\");\n out.newLine();\n }\n }\n String[] userFlags = f.getUserFlags();\n for (int i = 0; i < userFlags.length; i++) {\n out.write(userFlags[i]);\n out.newLine();\n }\n out.write(DONE_MSG);\n out.newLine();\n if (value) out.write(\"true\"); else out.write(\"false\");\n out.newLine();\n out.write(DONE_MSG);\n out.newLine();\n } finally {\n if (out != null) closeCacheFile(out); else lock = false;\n }\n }", "public void setFlag( KerberosFlag flag )\n {\n value |= 1 << flag.getOrdinal();\n setBit( flag.getOrdinal() );\n }", "void setFlag(long flag, boolean val) {\n\t\tif (val)\r\n\t\t\tflags = flags | flag;\r\n\t\telse\r\n\t\t\tflags = flags & ~flag;\r\n\t}", "public void setFlag(int flag) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 20, flag);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 12, flag);\n\t\t}\n\t}", "protected void performFlags()\n {\n Assert.isNotNull(field);\n Assert.isNotNull(flagLabel);\n\n if (!isEnabled())\n {\n field.setBackground(GUI.DisabledColor);\n field.setForeground(GUI.DisabledTextColor);\n flagLabel.setIcon(GUI.getOptionalIcon());\n }\n else if (isReadonly())\n {\n field.setBackground(GUI.ReadOnlyColor);\n field.setForeground(GUI.ReadOnlyTextColor);\n flagLabel.setIcon(GUI.getOptionalIcon());\n }\n else // regular state\n {\n field.setBackground(GUI.DefaultColor);\n field.setForeground(GUI.DefaultTextColor);\n\n if (mandatory && (getText() == null || getText().length() == 0))\n {\n flagLabel.setIcon(GUI.getMandatoryIcon());\n }\n else\n {\n flagLabel.setIcon(GUI.getOptionalIcon());\n }\n }\n repaint();\n }", "public void setFlag(int which, boolean value) {\n if (value) {\n flags |= (1 << which); // set flag\n } else {\n flags &= ~(1 << which); // clear flag\n }\n }", "public void setFlag(int flag) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 4, flag);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 4, flag);\n\t\t}\n\t}", "public void setFLAG(Integer FLAG) {\n this.FLAG = FLAG;\n }", "public void setFlag(int which) {\n setFlag(which, true);\n }", "public void setFlag(short flag) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeShort(__io__address + 6, flag);\n\t\t} else {\n\t\t\t__io__block.writeShort(__io__address + 6, flag);\n\t\t}\n\t}", "EdgeIteratorState setFlags(IntsRef edgeFlags);", "public void \nsetFlag( int pFlagNumber, boolean pYesNo ) {\n if (pYesNo)\n fFlagBox = fFlagBox | (1 << pFlagNumber); \n else\n fFlagBox = fFlagBox & (~(1 << pFlagNumber));\n}", "protected final synchronized void setFlag(int flag, boolean sts) {\n\t\tboolean state = (m_flags & flag) != 0 ? true : false;\n\t\tif ( state && sts == false)\n\t\t\tm_flags -= flag;\n\t\telse if ( state == false && sts == true)\n\t\t\tm_flags += flag;\n\t}", "public String getFlags() {\r\n \t\treturn flags;\r\n \t}", "public void setFlags(int nRun, int nFlags, float fConfidence);", "public void setIvaFlag(String value) {\n setAttributeInternal(IVAFLAG, value);\n }", "public void setReservedFlags(java.lang.String reservedFlags) {\n this.reservedFlags = reservedFlags;\n }", "public void setCurrentFlag(Character aCurrentFlag) {\n currentFlag = aCurrentFlag;\n }", "public void giveFlag(Flag f)\r\n\t{\r\n\t\thasFlag = true;\r\n\t\tflag = f;\r\n\t}", "protected void setFlags(Parameters p, int flags) {\n\t\tif ((flags & ZF) == ZF) {\n\t\t\tdataspace.fZero = (p.result & ((((long) 1) << (p.size * 8)) - 1)) == 0;\n\t\t}\n\t\tif ((flags & SF) == SF) {\n\t\t\tdataspace.fSign = (p.result >> p.size * 8 - 1 & 1) == 1;\n\t\t}\n\t\tif ((flags & PF) == PF) {\n\t\t\t// parity flag = even number of 1s in lowest byte?\n\t\t\tlong temp = (p.result & 1) + (p.result >> 1 & 1) + (p.result >> 2 & 1) + (p.result >> 3 & 1)\n\t\t\t\t+ (p.result >> 4 & 1)\n\t\t\t\t+ (p.result >> 5 & 1) + (p.result >> 6 & 1) + (p.result >> 7 & 1);\n\t\t\tdataspace.fParity = temp % 2 == 0;\n\t\t}\n\t\tif ((flags & CF) == CF) {\n\t\t\t// carry flag = (n+1)th bit\n\t\t\tdataspace.fCarry = ((p.result >> p.size * 8) & 1) == 1;\n\t\t}\n\t\tif ((flags & OF) == OF) {\n\t\t\t// overflow flag = incorrect sign\n\t\t\tboolean aSign = ((p.a >> p.size * 8 - 1 & 1) == 1);\n\t\t\tboolean bSign = ((p.b >> p.size * 8 - 1 & 1) == 1);\n\t\t\tboolean resultSign = ((p.result >> p.size * 8 - 1 & 1) == 1);\n\t\t\tdataspace.fOverflow = (aSign == bSign) && (resultSign != aSign);\n\t\t}\n\t\tif ((flags & AF) == AF) {\n\t\t\t// adjust / auxiliary carry flag = carry of bit 3, used for BCD only\n\t\t\t\n\t\t\t// This line is just plain wrong:\n\t\t\t// if (((p.result >> 4) & 1) == 1) {\n\t\t\t\n\t\t\t// This line is better, but fails in a few cases, e.g.:\n\t\t\t// MOV AL, 80h; SUB AL, 18h\n\t\t\t// and that can't be fixed easily because the information just isn't there due to\n\t\t\t// SUB inverting the second argument and then adding it.\n\t\t\tdataspace.fAuxiliary = ((p.result >> 4) & 1) != ((((p.a >> 4) & 1) + ((p.b >> 4) & 1)) & 1);\n\t\t}\n\t}", "public void setBgFlags(java.lang.Integer bgFlags) {\r\n this.bgFlags = bgFlags;\r\n }", "void setFlag(ForumFlag flag);", "IntsRef getFlags();", "public void setFlag(boolean bol){\n\t\tflag = bol;\n\t}", "public AbstractKerberosFlags( byte[] flags )\n {\n super( flags );\n // Remember getBytes() \"A first byte containing the number of unused bits is added\"\n value = ( ( getBytes()[1] & 0x00F ) << 24 ) | ( ( getBytes()[2] & 0x00FF ) << 16 ) | ( ( getBytes()[3] & 0x00FF ) << 8 ) | ( 0x00FF & getBytes()[4] ); \n }", "public void setFlag(Boolean flag) {\n this.flag = flag;\n }", "public void setIvaMFlag(String value) {\n setAttributeInternal(IVAMFLAG, value);\n }", "public void setModifierFlag(int flag) {\n\t\tthis.modifier = flag;\n\t}", "public void setFlagPosition(Integer[] flagPosition)\n {\n if (!flagLocations.contains(flagPosition) && flagPosition.length == 2)\n flagLocations.add(flagPosition);\n }", "public void setAllUpdateFlags() {\n\t}", "private void createFlags() {\n if (flags!=null) return;\n flags = JCSystem.makeTransientBooleanArray(NUMFLAGS, JCSystem.CLEAR_ON_RESET);\n setValidatedFlag(false);\n }", "public void setPersistentStringAndMessageFlags(String key, String value,\n Flag[] setFlags, Flag[] clearFlags) throws MessagingException;", "public byte[] getFlags() {\n return flags;\n }", "public void set(int flag)\n {\n setWaitFlags( waitFlags | flag );\n }", "public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }", "public int getFlags() {\n return flags;\n }", "public void setModifiers(int modifiers);", "long getFlags();", "public short getFlags() {\n\treturn flags;\n }", "protected void setStateFlag(int flag, boolean sts) {\n\t\tif ( sts == true && (m_flags & flag) == 0)\n\t\t\tm_flags += flag;\n\t\telse if ( sts == false && (m_flags & flag) != 0)\n\t\t\tm_flags -= flag;\n\t}", "public AbstractKerberosFlags( int value )\n {\n this.value = value;\n }", "public long getFlags() {\n }", "public void initFlag(int val, int i) {\n flagVal = i;\n flag = val;\n }", "public void initFlag(int val, int i) {\n flagVal = i;\n flag = val;\n }", "public void setIsFlag(String isFlag) {\r\n this.isFlag = isFlag == null ? null : isFlag.trim();\r\n }", "public void setBit(int pos, int bit) {\r\n\t\tflagBits[pos] = bit;\r\n\t}", "private void init(boolean[] flags) {\n\t\tflags[0] = false; \n\t\tflags[1] = false; \n\t\t\n\t\tfor (int i=2; i<flags.length; i++) {\n\t\t\tflags[i] = true; \n\t\t}\n\t}", "public BB set(String flag)\n {\n Validate.notNull(flag,What.VARIABLE_NAME);\n return add(BAL().newSet(flag,VARIABLE,Boolean.TRUE));\n }", "private void resetFlags(){\n\t\tint count = 0;\n\t\tif (partOfAPairedAlignment) count += Math.pow(2, 0);\n\t\tif (aProperPairedAlignment) count += Math.pow(2, 1);\n\t\tif (unmapped) count += Math.pow(2, 2);\n\t\tif (mateUnMapped) count += Math.pow(2, 3);\n\t\tif (reverseStrand) count += Math.pow(2, 4);\n\t\tif (mateReverseStrand) count += Math.pow(2, 5);\n\t\tif (firstPair) count += Math.pow(2, 6);\n\t\tif (secondPair) count += Math.pow(2, 7);\n\t\tif (notAPrimaryAlignment) count += Math.pow(2, 8);\n\t\tif (failedQC) count += Math.pow(2, 9);\n\t\tif (aDuplicate) count += Math.pow(2, 10);\n\t\tflags = (short) count;\n\t\tflagResetNeeded = false;\n\t\t\n\t}", "void setBinaryFileAttribute(boolean flag);", "public static byte setFlag(byte field, int pos, boolean value) {\n if(pos < 1 || pos > 8) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 8\");\n }\n\n short flag = (short) Math.pow(2, (pos-1));\n\n if(value) {\n field |= flag;\n } else {\n field &= ~flag;\n }\n return field;\n }", "public static int setFlag(int field, int pos, boolean value) {\n if(pos < 1 || pos > 32) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 32\");\n }\n\n long flag = (long) Math.pow(2, (pos-1));\n\n if(value) {\n field |= flag;\n } else {\n field &= ~flag;\n }\n return field;\n }", "protected long setBit(long word, boolean flag, long position) {\n\t\tif (!flag) {\n\t\t\treturn word & (~(1L << position));\n\t\t}\n\t\treturn word | (1L << position);\n\t}", "public void addFlags( String flagSet ) {\n\t\tStringBuilder sb = new StringBuilder() ;\n\t\tsb.append( flagSet ) ;\n\t\tif( !flagSet.contains( \"-oX\" ) ) {\n\t\t\tsb.append( \" -oX \" ).append(outFilePath).append(\" \") ;\n\t\t}\n\t\tflags.addFlag( sb.toString() ) ;\n\t}", "public boolean setState(final String title, final int flags) {\n\t\treturn setState(title, null, flags);\n\t}", "@RequestLine(\"PUT /v1/users/{userId}/features/flags/{feature}\")\n @Headers({\n \"Content-Type: multipart/form-data\",\n \"Accept: application/json\",\n })\n FeatureFlag setFeatureFlagUsers(@Param(\"userId\") String userId, @Param(\"feature\") String feature, @Param(\"state\") String state);", "public abstract int flags();", "public int getFlags();", "public int getFlags();", "public void setActiveFlag(String value) {\n setAttributeInternal(ACTIVEFLAG, value);\n }", "public void setActiveFlag(Character aActiveFlag) {\n activeFlag = aActiveFlag;\n }", "public void setreadFlag(Boolean value) {\r\n setAttributeInternal(READFLAG, value);\r\n }", "public void setAdjustmentFeeFlag(Character aAdjustmentFeeFlag) {\n adjustmentFeeFlag = aAdjustmentFeeFlag;\n }", "private void setDirty(boolean flag) {\n\tdirty = flag;\n\tmain.bSave.setEnabled(dirty);\n }", "public void setFlagsreceived(boolean flagsreceived) {\r\n this.flagsreceived = flagsreceived;\r\n }", "public AbstractKerberosFlags( byte[] flags )\n {\n if ( ( flags == null ) || ( flags.length != 4 ) )\n {\n throw new IllegalArgumentException( \"The given flags is not correct\" );\n }\n \n value = ( ( flags[0] & 0x00FF ) << 24 ) | ( ( flags[1] & 0x00FF ) << 16 ) | ( ( flags[2] & 0x00FF ) << 8 ) | ( 0x00FF & flags[3] ); \n }", "public void setActiveflag(String value) {\n setAttributeInternal(ACTIVEFLAG, value);\n }", "public void setShowFlag(String value) {\r\n setAttributeInternal(SHOWFLAG, value);\r\n }", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "protected void DefineFlag()\n {\n String flagStr = \"-ci -d -h -hs -i:STR -n -o:STR -p -s:STR -t:INT -ti -v -x:STR\";\n \n // init the system option\n systemOption_ = new Option(flagStr);\n // Add the full name for flags\n systemOption_.SetFlagFullName(\"-ci\", \"Print_Config_Info\");\n systemOption_.SetFlagFullName(\"-d\", \"Print_Operation_Details\");\n systemOption_.SetFlagFullName(\"-h\", \"Help\");\n systemOption_.SetFlagFullName(\"-hs\", \"Hierarchy_Struture\");\n systemOption_.SetFlagFullName(\"-i\", \"Input_File\");\n systemOption_.SetFlagFullName(\"-n\", \"No_Output\");\n systemOption_.SetFlagFullName(\"-o\", \"Output_File\");\n systemOption_.SetFlagFullName(\"-p\", \"Show_Prompt\");\n systemOption_.SetFlagFullName(\"-s\", \"Field_Separator\");\n systemOption_.SetFlagFullName(\"-t\", \"Term_Field\");\n systemOption_.SetFlagFullName(\"-ti\", \"Display_Filtered_Input\");\n systemOption_.SetFlagFullName(\"-v\", \"Version\");\n systemOption_.SetFlagFullName(\"-x\", \"Load_Configuration_file\");\n }", "private void setDirty(boolean flag) {\n\tmain.getState().dirty = flag;\n\tif (main.bSave != null)\n\t main.bSave.setEnabled(flag);\n }", "public Builder setAuthAccountFlags(int value) {\n bitField0_ |= 0x00000200;\n authAccountFlags_ = value;\n onChanged();\n return this;\n }", "@Override\n\t\t\t\t\tprotected void onChangeFlag(Service object, Boolean flag) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void clearFlag( KerberosFlag flag )\n {\n value &= ~( 1 << ( MAX_SIZE - 1 - flag.getOrdinal() ) );\n }", "public void setApprovedFlag(String value) {\r\n setAttributeInternal(APPROVEDFLAG, value);\r\n }", "public void addDefaultFlag(byte flag)\n {\n defaultFlags |= flag;\n }", "public void addFlag(String f)\r\n {\r\n\ttry {\r\n\t addFlag(Flag.valueOf(f.toUpperCase()));\r\n\t}\r\n\tcatch(Exception e) {\r\n\t e.printStackTrace();\r\n\t}\r\n }", "protected void setAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.setBitAt(i);\n } \t\n }", "public void setLocalFlag(String value) {\n setAttributeInternal(LOCALFLAG, value);\n }" ]
[ "0.78370506", "0.72809005", "0.7267466", "0.71503055", "0.69589", "0.69073033", "0.68629056", "0.68514943", "0.67939794", "0.66356903", "0.6624452", "0.66104174", "0.6602818", "0.6602818", "0.6500851", "0.64675134", "0.6422484", "0.6421524", "0.64087576", "0.63426083", "0.6262982", "0.6168662", "0.61583596", "0.61269283", "0.6119337", "0.6093786", "0.60180706", "0.5997714", "0.599766", "0.59474975", "0.59114844", "0.58376586", "0.58056676", "0.5759297", "0.5758805", "0.5746212", "0.5721593", "0.5715966", "0.5702397", "0.5679807", "0.5670289", "0.56590515", "0.5655471", "0.5649821", "0.5649409", "0.5624555", "0.558967", "0.55778366", "0.5557933", "0.5553624", "0.55378634", "0.5529581", "0.55292505", "0.55223083", "0.5472996", "0.54657215", "0.54584736", "0.5430629", "0.5424869", "0.54207045", "0.5409128", "0.5396247", "0.53724706", "0.5362825", "0.536147", "0.536147", "0.5360022", "0.5347417", "0.5338132", "0.53343254", "0.53143775", "0.527772", "0.5262778", "0.5251378", "0.52466035", "0.5234747", "0.52331924", "0.5228275", "0.52279735", "0.521297", "0.521297", "0.519214", "0.51712656", "0.5159544", "0.5156233", "0.51528233", "0.5146918", "0.51364857", "0.5133601", "0.51292515", "0.512297", "0.51189286", "0.5117402", "0.51007974", "0.5082334", "0.5075656", "0.50740814", "0.507252", "0.5071107", "0.5070172", "0.5061406" ]
0.0
-1
The source of the name field value.
public NameSource getNameSource() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "0a7eceea-d228-42ea-bf8b-7fe5bc03373b"); return nameSource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getName() {\n return source.getName();\n }", "@VTID(27)\n java.lang.String getSourceName();", "@Override\n\tpublic String getValue() {\n\t\treturn name;\n\t}", "public java.lang.String getSourceName() {\r\n return localSourceName;\r\n }", "String getValueName();", "public String getName(){\n\n //returns the value of the name field\n return this.name;\n }", "public String getName() {return this.name.getText();}", "SMFTypeRef getSrcName();", "public String getName() { return name.get(); }", "public String sourceField() {\n return this.sourceField;\n }", "@Override\n\tpublic String asText() {\n\t\treturn name;\n\t}", "public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }", "public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }", "@Override\n public String name() {\n return fieldName;\n }", "int getNameSourceStart();", "@Override\n public String getName() {\n return _data.getName();\n }", "String getInputName() {\n return (nameInput.getText());\n }", "public String getSrcFirstName() {\r\n return (String) getAttributeInternal(SRCFIRSTNAME);\r\n }", "public String getNameFieldText() {\n return nameField.getText();\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "private String name() {\n\t\tif (currentIndex >= data.length\n\t\t\t\t|| !Character.isLetter(data[currentIndex])) {\n\t\t\tthrow new LexerException();\n\t\t}\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& (Character.isLetter(data[currentIndex])\n\t\t\t\t\t\t|| data[currentIndex] == '_'\n\t\t\t\t\t\t|| Character.isDigit(data[currentIndex]))) {\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\n\t\treturn value;\n\t}", "public String getName() { return (String)get(\"Name\"); }", "public JExpr getNameExpr() { return _nameExpr; }", "public String getName(){\n return field.getName();\n }", "public abstract String getRawName();", "public java.lang.String getFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMNAME$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "PropertyName getName();", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Basic @Raw\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}", "public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}", "public String getSourceName() {\n\t\treturn fileName;\n\t}", "public String getName() {\n return (\"(\" + this.source.getName() + \",\" + this.destination.getName() + \")\");\n }", "public String getName() { return _name; }", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "public String name() {\n return myStrVal;\n }", "private String getSourceName() {\n return srcFileName;\n }", "public String getName() { return name; }", "public String getName() { return this.name; }", "public String getName() { return this.name; }", "public String getName() { return this.name; }", "java.lang.String getSource();", "java.lang.String getSource();", "public AXValue getName() {\n return name;\n }", "public String getName() {\n\t\treturn this.data.getName();\n\t}", "public String getsName() {\n return sName;\n }", "public static String getNameFilter() {\r\n return nameFilter;\r\n }", "public String inputName() {\n String name = editTextName.getText().toString();\n return name;\n }", "public String getName() { return name; }", "public String getName() { return name; }", "public String getName() { return name; }" ]
[ "0.71908087", "0.6841983", "0.6835881", "0.65860325", "0.6548188", "0.64728963", "0.6472646", "0.6441633", "0.6420885", "0.64178586", "0.6372712", "0.6367927", "0.6367927", "0.62878996", "0.62614685", "0.62117857", "0.61957425", "0.61666805", "0.6150058", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.614603", "0.61424315", "0.6141426", "0.61372244", "0.6123708", "0.6118121", "0.6111367", "0.6106568", "0.6094946", "0.60843927", "0.6081399", "0.60779756", "0.6073813", "0.6046482", "0.6046244", "0.6036867", "0.60299623", "0.60202706", "0.60108715", "0.60108715", "0.60108715", "0.6006177", "0.6006177", "0.60012454", "0.59974885", "0.59896106", "0.59835225", "0.5980515", "0.59804904", "0.59804904", "0.59804904" ]
0.0
-1
Sets the source of the name field value.
public void setNameSource(NameSource nameSource) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "acfe2e92-6b9b-4a4d-962c-3dd62389739d"); this.nameSource = nameSource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setSourceName(String name) {\n srcFileName = name;\n }", "public void setSourceName(java.lang.String param) {\r\n localSourceNameTracker = param != null;\r\n\r\n this.localSourceName = param;\r\n }", "public abstract void setName( String name ) throws SourceException;", "public void set_source(String name) throws ConnectorConfigException{\n\t\tsource = name.trim();\n\t\tif (source.equals(\"\"))\n\t\t\tthrow new ConnectorConfigException(\"Source of data can't be empty\");\n\t}", "public void setName(Identifier name) throws SourceException;", "public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }", "public void setSource(String source);", "public void setName(Identifier name) throws SourceException {\n getMemberImpl().setName(name);\n updateConstructorsNames(name);\n }", "public void setSource (String source);", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setName(String inName)\n {\n name = inName;\n }", "public void setName(java.lang.CharSequence value) {\n this.name = value;\n }", "public void setName(String inName)\n {\n\tname = inName;\n }", "public void setName(java.lang.String value) {\n this.name = value;\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public Builder setSource(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n source_ = value;\n onChanged();\n return this;\n }", "public void setName(String value) {\n this.name = value;\n }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public final void setName(String name) {_name = name;}", "public void setName(String nameIn) {\n name = nameIn;\n }", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName(String value) {\n\t\tname = value;\n\t}", "protected void setName(String name) {\n this._name = name;\n }", "public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}", "public void setName(String s) {\n this.name = s;\n }", "public void enterSource(String name) {\n\t\ttf_Source.sendKeys(name);\n\t\tclick_Option.click();\n\t}", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public final void setName(final String inName) {\n mName = inName;\n }", "public void setName(String name) {\r\n this._name = name;\r\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setSourceImageName(final String sourceImageNameValue) {\n this.sourceImageName = sourceImageNameValue;\n }", "public void setName(String name) {\t\t\r\n\t\tthis.name = name;\t\t\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "@Override\n public String getName() {\n return source.getName();\n }", "@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }", "protected void setName(String name) {\r\n this.name = name;\r\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public void setSource(String source) {\n _source = source;\n }", "public void setSource(String source) {\r\n this.source = source;\r\n }", "public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}", "public void setName(java.lang.String _name)\n {\n name = _name;\n }", "public void setName(java.lang.String _name)\n {\n name = _name;\n }", "public void setName(String name) {\r\n \t\tthis.name = name;\r\n \t}", "public void setName(String name) {\n _name = name;\n }", "public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }", "public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String _name) {\n this._name = _name;\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "public void setName(String name) {\n\t this.name = name;\n\t }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\n\t\tm_name = (name != null) ? name : \"\";\n\t}", "public void setName(String name) {\n\t\tName = name;\n\t}", "public void setName(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(NAME_PROP.get(), value);\n }", "public void setName(String name)\r\n {\r\n m_name = name;\r\n }", "public void setName(String name) {\n m_Name = name;\n }", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String _name)\r\n\t{\r\n\t\tthis._name=_name;\r\n\t}", "public void setName(String name){\n \t\tthis.name = name;\n \t}", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName(java.lang.String name) {\r\n this.name = name;\r\n }" ]
[ "0.7490307", "0.744267", "0.71051306", "0.70472056", "0.69724214", "0.68936676", "0.67763007", "0.676307", "0.67401105", "0.6663281", "0.6663118", "0.6663118", "0.6663118", "0.6643746", "0.6618217", "0.6602584", "0.6592879", "0.6587965", "0.6587965", "0.6575892", "0.6546218", "0.65261185", "0.65184355", "0.65013397", "0.65013397", "0.65004903", "0.64974004", "0.6496173", "0.6487406", "0.64866626", "0.64811754", "0.64808744", "0.6478748", "0.6476771", "0.6476771", "0.6474481", "0.6473154", "0.6467092", "0.64628", "0.64559776", "0.6455811", "0.6455811", "0.6455811", "0.6451613", "0.6450662", "0.6443033", "0.64418817", "0.6433076", "0.6432494", "0.6431676", "0.6430775", "0.6429208", "0.6429208", "0.64254224", "0.6424816", "0.64231765", "0.64231765", "0.64215916", "0.6421402", "0.6421402", "0.6421402", "0.64201856", "0.64121175", "0.64121175", "0.64121175", "0.64091194", "0.6406881", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64037246", "0.64014375", "0.64002717", "0.639933", "0.63989574", "0.63985085", "0.63971704", "0.63971704", "0.6396119", "0.6395528", "0.6395191", "0.639387", "0.639387", "0.639387", "0.6393603" ]
0.6462099
39
The source of the comment field value.
public CommentSource getCommentSource() { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "8a9b1fe1-6895-465a-bd8d-8b98409b313e"); return commentSource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }", "public String sourceField() {\n return this.sourceField;\n }", "public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}", "public String get_source() {\n\t\treturn source;\n\t}", "String getCommentStringValue(Object comment);", "public String getSource() {\r\n return source;\r\n }", "public String getSource() {\n return source;\n }", "public String getSource() {\n return this.source;\n }", "public String getCommentContent() {\n return commentContent;\n }", "public String getSource() {\n return source;\n }", "public String getSource() {\n return source;\n }", "public String getSource() {\n return source;\n }", "public ST getComment() { \r\n\t\tST retVal = this.getTypedField(48, 0);\r\n\t\treturn retVal;\r\n }", "public String getComment() {\n Object ref = comment_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n comment_ = s;\n }\n return s;\n }\n }", "public String getSource() {\n\t\treturn (String) _object.get(\"source\");\n\t}", "public String getSource() {\r\n return Source;\r\n }", "@Override\n\tpublic String getSource() {\n\t\treturn source;\n\t}", "public String getSource() {\n Object ref = source_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n source_ = s;\n }\n return s;\n }\n }", "public String getSource() {\n\n return source;\n }", "public final String getComment() {\n return comment;\n }", "public String getSource() {\n Object ref = source_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n source_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getComment(){\n return this.comment;\n }", "public String getComment() {\n return this.comment;\n }", "public String getSource() {\n return mSource;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment() {\n return comment;\n }", "public String getComment(){\n return comment;\n }", "public String getComment() {\n Object ref = comment_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n comment_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@Override\n public String getSource() {\n return this.src;\n }", "public String getComment() {\r\n\t\treturn comment;\r\n\t}", "public String getComment() {\n return comment ;\n }", "public String getSourceString() {\n return sourceString;\n }", "public String getComment()\n {\n return comment;\n }", "@java.lang.Override\n public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n }\n }", "java.lang.String getSource();", "java.lang.String getSource();", "public String getSourceText() {\r\n\t\treturn requestSourceText;\r\n\t}", "public String getCommentText() {\r\n\r\n\t\treturn commentText;\r\n\t}", "public java.lang.String getComment() {\r\n return comment;\r\n }", "public String getComment() {\n\t\treturn comment;\n\t}", "public String getComment() {\n\t\treturn comment;\n\t}", "public String getSource() {\n return JsoHelper.getAttribute(jsObj, \"source\");\n }", "public String getCommentText() {\n\t return this.commentText;\n\t}", "public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getComment() {\n return comment;\n }", "public java.lang.String getComment() {\n return comment;\n }", "public java.lang.String getComment() {\n return comment;\n }", "public String getSourceString() {\n return null;\n }", "public java.lang.String getSource() {\n java.lang.Object ref = source_;\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 source_ = s;\n return s;\n }\n }", "@Lob\r\n @Column (name=\"RECORD_COMMENT\")\r\n\tpublic String getComment() {\r\n\t\treturn comment;\r\n\t}", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "public String getComment();", "@Override\n\tpublic String getComment() {\n\t\treturn model.getComment();\n\t}", "public String getComment() {\n return variant == null ? null : variant.getComment(this);\n }", "public java.lang.String getSrc() {\n java.lang.Object ref = src_;\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 src_ = s;\n }\n return s;\n }\n }", "public java.lang.String getSrc() {\n java.lang.Object ref = src_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n src_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getSampleComment();", "public String getSource();", "@ApiModelProperty(value = \"The source of the data.\")\n public String getSource() {\n return source;\n }", "@Override\n \tpublic String getSource() {\n \t\tif (super.source != refSource) {\n \t\t\tif (refSource == null) {\n \t\t\t\trefSource = super.source;\n \t\t\t} else {\n \t\t\t\tsuper.source = refSource;\n \t\t\t}\n \t\t}\n \t\treturn refSource;\n \t}", "String getComment();", "String getComment();", "public java.lang.String getDisplaysource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DISPLAYSOURCE$10);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String get_comment() throws Exception {\n\t\treturn this.comment;\n\t}", "String getSource();", "public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }", "public String toString () {\n if (this.comment != null) {\n return this.comment;\n }\n return super.toString ();\n }", "public String sourceCode() {\n\t\treturn m_sourceCode;\n\t}", "public com.google.protobuf.ByteString\n getCommentBytes() {\n Object ref = comment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n comment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSouce() {\n\t\treturn source;\n\t}", "public java.lang.String getSource() {\r\n return localSource;\r\n }", "public Comment(String data) {\n value = data;\n }", "public String getComment() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}", "public String getFileComment()\r\n {\r\n return sFileComment;\r\n }", "public Widget getSource() {\n\t\treturn _source;\n\t}", "public String getSrc() {\r\n\t\treturn src;\r\n\t}", "public String getComment() {\n return description;\n }", "@Override\r\n\tpublic String getSource() {\n\t\treturn null;\r\n\t}", "public Object getSource() {return source;}", "public String getComment() {\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getComment() \" );\n Via via=(Via)sipHeader;\n return via.getComment();\n }", "@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:source\")\n public String getSource() {\n return getProperty(SOURCE);\n }", "public com.google.protobuf.ByteString\n getCommentBytes() {\n Object ref = comment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n comment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSourcecode() {\n return sourcecode;\n }", "public String getSource(){\r\n\t\treturn selectedSource;\r\n\t}", "public String getComment() {\n\t\tif (comment != null)\n\t\t\treturn ProteomeXchangeFilev2_1.COM + TAB\n\t\t\t// + \"comment\" + TAB\n\t\t\t\t\t+ comment;\n\t\treturn null;\n\t}", "public java.lang.String getComments() {\n java.lang.Object ref = comments_;\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 comments_ = s;\n }\n return s;\n }\n }", "public ST getPsl48_Comment() { \r\n\t\tST retVal = this.getTypedField(48, 0);\r\n\t\treturn retVal;\r\n }", "String getSourceString();", "@Override\r\n public String getSource()\r\n {\n return null;\r\n }", "public String getComments() {\r\n return this.comments;\r\n }" ]
[ "0.67711496", "0.67546207", "0.66536874", "0.6611548", "0.65631104", "0.6505404", "0.6481015", "0.6443842", "0.64312", "0.64148283", "0.64148283", "0.64148283", "0.6385512", "0.6367883", "0.63654655", "0.63633966", "0.63523805", "0.63406307", "0.6337143", "0.63314927", "0.6306648", "0.6300307", "0.62962615", "0.62962097", "0.6295088", "0.6295088", "0.6295088", "0.6295088", "0.6295088", "0.6295088", "0.6295088", "0.6294552", "0.62688464", "0.6267598", "0.6259667", "0.6255687", "0.6255333", "0.625191", "0.6238121", "0.62348646", "0.62348646", "0.62033916", "0.619438", "0.6194298", "0.617763", "0.617763", "0.6156879", "0.614554", "0.61315864", "0.61315864", "0.6105685", "0.6105685", "0.6105685", "0.60961396", "0.6090948", "0.6011557", "0.6008409", "0.6008409", "0.6008409", "0.6008409", "0.6008409", "0.6008409", "0.60045344", "0.60004026", "0.599804", "0.5984194", "0.5948461", "0.5931906", "0.5923509", "0.591551", "0.5904471", "0.5904471", "0.5872921", "0.58655393", "0.5861743", "0.5850688", "0.58473384", "0.58467907", "0.58417606", "0.58295256", "0.5817716", "0.5810164", "0.5809931", "0.5809534", "0.5794634", "0.5787376", "0.577897", "0.577715", "0.576402", "0.5759489", "0.5755516", "0.57421875", "0.5734111", "0.572762", "0.57256526", "0.5722202", "0.57150763", "0.57117784", "0.57006586", "0.56716704" ]
0.5866807
73
Sets the source of the comment field value.
public void setCommentSource(CommentSource commentSource) { writeline("/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage", "45c406f7-67cc-42e3-b564-2494c21698c2"); this.commentSource = commentSource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }", "public void setSource(String source);", "public void setSource (String source);", "public void setSource(String source) {\n _source = source;\n }", "public void setSource(String source) {\r\n this.source = source;\r\n }", "public void setSource(Source s)\n\t{\n\t\tsource = s;\n\t}", "public void setSource(String source) {\n this.source = source;\n }", "public void setSource(String source) {\n this.source = source;\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public Builder setSource(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n source_ = value;\n onChanged();\n return this;\n }", "public void setSource(String Source) {\r\n this.Source = Source;\r\n }", "public void setSource(String source) {\n this.source = source == null ? null : source.trim();\n }", "public void setSource(String source) {\n this.source = source == null ? null : source.trim();\n }", "public void setContent(Source source) {\n this.content = source;\n }", "public void setSource(String value) {\n configuration.put(ConfigTag.SOURCE, value);\n }", "public void setComment(String comment);", "public void setComment(String comment);", "public void setSource(Object o) {\n\t\tsource = o;\n\t}", "public void setSourceNode(String sourceNode) {\n this.sourceNode = sourceNode;\n }", "public void setComments(java.lang.String value);", "public Builder setSrc(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n src_ = value;\n onChanged();\n return this;\n }", "public void setComments(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), COMMENTS, value);\r\n\t}", "public Builder setComment(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n comment_ = value;\n onChanged();\n return this;\n }", "public void setComment(String c) {\n comment = c ;\n }", "public void setSourceUrl(String sourceUrl) {\n this.sourceUrl = sourceUrl == null ? null : sourceUrl.trim();\n }", "public Builder setSourceContext(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sourceContext_ = value;\n onChanged();\n return this;\n }", "public void set_source(String name) throws ConnectorConfigException{\n\t\tsource = name.trim();\n\t\tif (source.equals(\"\"))\n\t\t\tthrow new ConnectorConfigException(\"Source of data can't be empty\");\n\t}", "public void setComments( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), COMMENTS, value);\r\n\t}", "public void setSource(java.lang.String param) {\r\n localSourceTracker = true;\r\n\r\n this.localSource = param;\r\n\r\n\r\n }", "public static void set_SourceContent(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaSourceContentCmd, v);\n UmlCom.check();\n \n _src_content = v;\n \n }", "public void setComments(String newValue);", "public Builder setComments(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n comments_ = value;\n onChanged();\n return this;\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "public final void setComment(final String comment) {\n this.comment = comment;\n }", "public void setComment(String new_comment){\n this.comment=new_comment;\n }", "public void setComment(java.lang.String comment) {\r\n this.comment = comment;\r\n }", "public void setSource(noNamespace.SourceType source)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.SourceType target = null;\r\n target = (noNamespace.SourceType)get_store().find_element_user(SOURCE$0, 0);\r\n if (target == null)\r\n {\r\n target = (noNamespace.SourceType)get_store().add_element_user(SOURCE$0);\r\n }\r\n target.set(source);\r\n }\r\n }", "public void setSourcePath(String sourcePath) {\n this.sourcePath = sourcePath;\n }", "public void setSourceId(String source) {\n this.sourceId = sourceId;\n }", "public void setComment(java.lang.String comment) {\n this.comment = comment;\n }", "public void setComment(java.lang.String comment) {\n this.comment = comment;\n }", "public void setComment(java.lang.String comment) {\n this.comment = comment;\n }", "public void setComment(String comment){\n this.comment = comment;\n }", "public void setComment(String comment)\n {\n this.comment = comment;\n }", "public void setSourceDescription(DataSourceDescription sourceDescription) {\n\t\tthis.sourceDescription = sourceDescription;\n\t}", "@Override\n\tpublic void setComment(String comment) {\n\t\tmodel.setComment(comment);\n\t}", "public void setComment(String comment) {\n this.comment = comment;\n }", "public void setSource(char[] source) {\n\t\tthis.source = source;\n\t}", "public void setSource(Byte source) {\r\n this.source = source;\r\n }", "public void setIpSource(String value) {\n setProperty(IP_SOURCE, value, \"\");\n }", "public void setSource(edu.umich.icpsr.ddi.FileTxtType.Source.Enum source)\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(SOURCE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SOURCE$30);\n }\n target.setEnumValue(source);\n }\n }", "@objid (\"fddcf86a-595c-4c38-ad3f-c2a660a9497b\")\n void setSource(Instance value);", "public void setText(String source)\n {\n m_srcUtilIter_.setText(source);\n m_source_ = m_srcUtilIter_;\n updateInternalState();\n }", "public void setComment(String comment) throws IllegalArgumentException,\n SipParseException {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setComment() \" + comment );\n Via via=(Via)sipHeader;\n \n if (comment==null) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: null comment\" );\n else if (comment.length() == 0) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: 0 length comment\" );\n else via.setComment(comment);\n }", "public void setComment(Address address, int commentType, String comment);", "public final void testSetSource() {\n Notification n = new Notification(\"type\", \"src\", 1);\n assertEquals(\"src\", n.getSource());\n n.setSource(\"new src\");\n assertEquals(\"new src\", n.getSource());\n }", "public void setComment(String comment) {\r\n\t\tthis.comment = comment == null ? null : comment.trim();\r\n\t}", "public void setSource(org.LexGrid.commonTypes.Source[] source) {\n this.source = source;\n }", "public void setComment(String comment) {\n this.comment = comment == null ? null : comment.trim();\n }", "public void setComment(String comment) {\n this.comment = comment == null ? null : comment.trim();\n }", "public void setComment(String comment) {\n this.comment = comment == null ? null : comment.trim();\n }", "public void setComment(String comment) {\n this.comment = comment == null ? null : comment.trim();\n }", "public Builder setSourceFile(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n sourceFile_ = value;\n onChanged();\n return this;\n }", "void setComments(org.hl7.fhir.String comments);", "public void setComment(String comment) {\n this.comment = comment;\n }", "public void setComment(String comment) {\n this.comment = comment;\n }", "public Builder setVarSrc(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n varSrc_ = value;\n onChanged();\n return this;\n }", "public void setSource(String str) {\n\t\tMatcher m = Constants.REGEXP_FIND_SOURCE.matcher(str);\n\t\tif (m.find()) {\n\t\t\tsource = m.group(1);\n\t\t} else {\n\t\t\tsource = Utils.getString(R.string.tweet_source_web);\n\t\t}\n\t}", "@JsonProperty(\"source\")\n public void setSource(Source source) {\n this.source = source;\n }", "public void xsetSource(edu.umich.icpsr.ddi.FileTxtType.Source source)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileTxtType.Source target = null;\n target = (edu.umich.icpsr.ddi.FileTxtType.Source)get_store().find_attribute_user(SOURCE$30);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FileTxtType.Source)get_store().add_attribute_user(SOURCE$30);\n }\n target.set(source);\n }\n }", "public void setFileComment(String fileComment)\r\n {\r\n sFileComment = fileComment;\r\n }", "public ElementDefinitionDt setComments(StringDt theValue) {\n\t\tmyComments = theValue;\n\t\treturn this;\n\t}", "public void setComments(String value) {\n setAttributeInternal(COMMENTS, value);\n }", "public void setSource(String sourceDir)\n {\n this.sourceDir = new File(sourceDir);\n }", "@Override\n\tpublic void setSource(Object arg0) {\n\t\tdefaultEdgle.setSource(arg0);\n\t}", "public void setCommentContent(String commentContent) {\n this.commentContent = commentContent == null ? null : commentContent.trim();\n }", "@Override\r\n\tpublic void setWholeComment(String currentComment) {\n\t\t\r\n\t}", "public void setComment(String comment) {\n\t\tthis.comment = comment;\n\t}", "public void setComment(String comment) {\n\t\tthis.comment = comment;\n\t}", "public void setComments(String comments) {\n _comments = comments;\n }", "public void setComment(String path, String comment) {\n if (comment == null)\n configComments.remove(path);\n else\n configComments.put(path, comment);\n }", "@Override\n @IcalProperty(pindex = PropertyInfoIndex.COMMENT,\n adderName = \"comment\",\n analyzed = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true,\n timezoneProperty = true)\n public void setComments(final Set<BwString> val) {\n comments = val;\n }", "public void setComments (java.lang.String comments) {\r\n\t\tthis.comments = comments;\r\n\t}", "@Override\n public void setComments(java.lang.String comments) {\n _entityCustomer.setComments(comments);\n }", "public void setDataSrc(String dataSrc) {\n this.dataSrc = dataSrc == null ? null : dataSrc.trim();\n }", "@com.facebook.react.uimanager.annotations.ReactProp(name = \"src\")\n public void setSource(@javax.annotation.Nullable java.lang.String r4) {\n /*\n r3 = this;\n r0 = 0;\n if (r4 == 0) goto L_0x0017;\n L_0x0003:\n r1 = android.net.Uri.parse(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = r1.getScheme();\t Catch:{ Exception -> 0x0025 }\n if (r2 != 0) goto L_0x0023;\n L_0x000d:\n if (r0 != 0) goto L_0x0017;\n L_0x000f:\n r0 = r3.E();\n r0 = m12032a(r0, r4);\n L_0x0017:\n r1 = r3.f11557g;\n if (r0 == r1) goto L_0x001e;\n L_0x001b:\n r3.x();\n L_0x001e:\n r3.f11557g = r0;\n return;\n L_0x0021:\n r1 = move-exception;\n r1 = r0;\n L_0x0023:\n r0 = r1;\n goto L_0x000d;\n L_0x0025:\n r0 = move-exception;\n goto L_0x0023;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode.setSource(java.lang.String):void\");\n }", "public DataModelDescriptorBuilder comment(String string) {\n this.comment = string;\n return this;\n }", "public static void setSourceAnnotation (ITextUnit textUnit,\r\n \t\tIAnnotation annotation)\r\n \t{\r\n \t\tif (textUnit == null)\r\n \t\t\treturn;\r\n \t\tif (textUnit.getSource() == null)\r\n \t\t\treturn;\r\n \r\n \t\ttextUnit.getSource().setAnnotation(annotation);\r\n \t}", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "@ApiModelProperty(value = \"The source of the data.\")\n public String getSource() {\n return source;\n }", "@Override\n public void set(DP value) {\n if (value == null || \"\".equals(value)) {\n isValid.set(true);\n source.set(null);\n return;\n }\n final SP parsed;\n try {\n parsed = formatter.parse(value);\n } catch (Exception e) {\n isValid.set(false);\n // we failed to parse the value, but still treat this as touching the source property\n source.setTouched(true);\n return;\n }\n isValid.set(true);\n source.set(parsed);\n }", "public void setComments(String comments) {\r\n this.comments = comments;\r\n }", "@Override\n public void recordComment(Comment.Type type, SourceRange range, String value) {\n if (lastCommentEndPosition == null || range.end.offset > this.lastCommentEndPosition.offset) {\n value = value.trim();\n if (value.startsWith(SOURCE_MAPPING_URL_PREFIX)) {\n sourceMapURL = value.substring(SOURCE_MAPPING_URL_PREFIX.length());\n }\n comments.add(new Comment(value, range, type));\n this.lastCommentEndPosition = range.end;\n }\n }", "public final void setSource(final Integer newSource) {\n this.source = newSource;\n }", "public void setComments (java.lang.String comments) {\n\t\tthis.comments = comments;\n\t}", "public void set_comment(String comment) throws Exception{\n\t\tthis.comment = comment;\n\t}", "public void setCommentText(String commentText) {\n\t this.commentText = commentText;\n\t}", "public void setSourceID(java.lang.Object sourceID) {\n this.sourceID = sourceID;\n }", "public void setComment(final String newComment) {\n this.comment = newComment;\n }" ]
[ "0.73794377", "0.7096772", "0.7036214", "0.69864476", "0.6941604", "0.69215345", "0.68893737", "0.68893737", "0.68184716", "0.68184716", "0.6799656", "0.6790658", "0.67682606", "0.67682606", "0.67280054", "0.6727366", "0.6580132", "0.6580132", "0.6556977", "0.64291096", "0.64134765", "0.6391752", "0.6379952", "0.63663304", "0.6327161", "0.63141125", "0.62893707", "0.62868434", "0.6243634", "0.6196052", "0.6179125", "0.61713296", "0.61615396", "0.61295485", "0.6119374", "0.61091894", "0.61075425", "0.60524803", "0.60381156", "0.6028546", "0.60234666", "0.60234666", "0.60234666", "0.6023389", "0.6010707", "0.60057986", "0.5995446", "0.5979045", "0.5974398", "0.59693766", "0.5969021", "0.59678745", "0.59669155", "0.5960096", "0.59511477", "0.593908", "0.5934982", "0.59294003", "0.59275806", "0.59084725", "0.59084725", "0.59084725", "0.59084725", "0.59056664", "0.5905115", "0.58947796", "0.58947796", "0.5883003", "0.58465266", "0.58309287", "0.5823038", "0.58116513", "0.5809173", "0.5791711", "0.5783173", "0.5781839", "0.57774174", "0.57749426", "0.5768866", "0.5768866", "0.5766667", "0.5765122", "0.5765048", "0.57488495", "0.57179815", "0.5710473", "0.57024646", "0.5687764", "0.5682858", "0.56762356", "0.56696594", "0.5663248", "0.56597614", "0.5656274", "0.5652451", "0.5648245", "0.5644863", "0.56412876", "0.56216675", "0.56168973" ]
0.63356835
24
Manipulates the map once available. This callback is triggered when the map is ready to be used. This is where we can add markers or lines, add listeners or move the camera. In this case, we just add a marker near Sydney, Australia. If Google Play services is not installed on the device, the user will be prompted to install it inside the SupportMapFragment. This method will only be triggered once the user has installed Google Play services and returned to the app.
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; // move the camera to the default position or move to last position before rotating the screen if (mCameraPosition != null) { mMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition)); } else { mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(-26.167616, 28.079329), 10)); } //////////////////////////////////////////////////////////////////////////////////////////// // setup the map and clustering mMap.clear(); mClusterManager = new ClusterManager<>(this, mMap); mMap.setOnCameraIdleListener(mClusterManager); mMap.setOnMarkerClickListener(mClusterManager); mMap.setOnInfoWindowClickListener(mClusterManager); // add markers addPersonItems(); renderer = new CustomClusterRenderer(this, mMap, mClusterManager); mClusterManager.setRenderer(renderer); mClusterManager.cluster(); //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// // started delayed thread to give a time to render to complete its job before showing // the info window Thread th = new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { @Override public void run() { if (mClickedMarker != null && renderer != null) { mMarker = renderer.getMarker(mClickedMarker); mMarker.showInfoWindow(); } } }); } }); th.start(); //////////////////////////////////////////////////////////////////////////////////////////// mClusterManager.setOnClusterItemClickListener(new ClusterManager.OnClusterItemClickListener<Person>() { @Override public boolean onClusterItemClick(Person person) { // save clicked marker to get info window of it later mClickedMarker = person; mMarker = renderer.getMarker(mClickedMarker); mMarker.showInfoWindow(); return true; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMapReady(GoogleMap googleMap) {\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n double lat, lng;\n try {\n List<Address> addresses = geoCoder.getFromLocationName(\"Western Sydney Paramatta, NSW\", 5);\n lat = addresses.get(0).getLatitude();\n lng = addresses.get(0).getLongitude();\n } catch (Exception e) {\n lat = -34;\n lng = 151;\n }\n\n LatLng sydney = new LatLng(lat, lng);\n googleMap.addMarker(new MarkerOptions().position(sydney).title(\"WSU Paramatta\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n googleMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney, Australia, and move the camera.\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(17.2231, 78.2827);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Hyderbbad\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n initializeMap();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n ActivityCompat.requestPermissions(this,new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n // Add a marker in Sydney and move the camera\n if (loc != -1 && loc != 0) {\n locationManager.removeUpdates(this);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(MainActivity.locations.get(loc), 10));\n\n mMap.addMarker(new MarkerOptions().position(MainActivity.locations.get(loc)).title(MainActivity.places.get(loc)));\n } else {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationManager.requestLocationUpdates(provider, 400, 1, this);\n\n }\n mMap.setOnMapLongClickListener(this);\n }", "@SuppressLint(\"MissingPermission\")\n @Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"MAP_FRAG\", \"MapCallback\");\n\n mMap = googleMap;\n\n Log.d(\"MAP\", mMap.toString());\n\n mMap.setPadding(0, 0, 0, 300);\n\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mMap.getUiSettings().setMapToolbarEnabled(false);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(Common.latitude, Common.longitude))\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_mark_red)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Common.latitude, Common.longitude), 15.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getMarkers();\n\n // Add a marker in Sydney and move the camera\n LatLng penn = new LatLng(39.952290, -75.197060);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(penn, 15));\n mMap.setMyLocationEnabled(true);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n uiSettings.setCompassEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n //below line is use to add custom marker on our map.\n .icon(BitmapFromVector(getApplicationContext(), R.drawable.ic_flag)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mapReady = true;\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng Bangalore = new LatLng(12.972442, 77.580643);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(Bangalore)\n .zoom(17)\n .bearing(90)\n .tilt(30)\n .build();\n mMap.addMarker(new MarkerOptions().position(Bangalore).title(\"Marker in Bangalore\"));\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n mMap.setIndoorEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(43.777365,-79.3406);\n LatLng loc22=new LatLng(43.775748,-79.336674);\n LatLng loc3=new LatLng(43.769240,-79.360010);\n LatLng loc4=new LatLng(43.769290,-79.400101);\n LatLng loc5=new LatLng(43.769552,-79.601201);\n mMap.addMarker(new MarkerOptions().position(sydney).title(values[0]));\n mMap.addMarker(new MarkerOptions().position(loc22).title(values[1]));\n mMap.addMarker(new MarkerOptions().position(loc3).title(values[2]));\n mMap.addMarker(new MarkerOptions().position(loc4).title(values[3]));\n mMap.addMarker(new MarkerOptions().position(loc5).title(values[4]));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng position = new LatLng(latitude, longitude);\n\n // centre the map around the specified location\n mMap.animateCamera(CameraUpdateFactory.newLatLng(position));\n\n // add a marker at the specified location\n MarkerOptions options = new MarkerOptions();\n mMap.addMarker(options.position(position).title(locationName));\n\n // configure the map settings\n mMap.setTrafficEnabled(true);\n mMap.setBuildingsEnabled(true);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n // enable the zoom controls\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n\n /* // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in city and move the camera\n LatLng cityCoord = new LatLng(lat, lng);\n float zoom = (float) 9.0;\n mMap.addMarker(new MarkerOptions().position(cityCoord).title(cityAddr));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(cityCoord, zoom));\n }", "public static void onMapReady() {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n LatLng singapore = new LatLng(1.338709, 103.819519);\n googleMap.addMarker(new MarkerOptions().position(singapore)\n .title(\"Marker in Singapore\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(singapore));\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11),3000,null);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n addMarkers();\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng place = new LatLng(Double.parseDouble(lat),Double.parseDouble(longitude));\n\n mMap.addMarker(new MarkerOptions().position(place));\n moveToCurrentLocation(place);\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n googleMap.setMyLocationEnabled(true);\r\n\r\n LocationManager locationManager = (LocationManager)\r\n getSystemService(Context.LOCATION_SERVICE);\r\n Criteria criteria = new Criteria();\r\n\r\n Location currentLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\r\n\r\n LatLng sydney = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 13));\r\n\r\n } else {\r\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\r\n }\r\n\r\n updateMarkersData(googleMap);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n CameraUpdate cUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(35.68, 139.76), 12);\n //mMap.addMarker(new MarkerOptions().position(new LatLng(35.68, 139.76)).title(\"Marker in Tokyo\"));\n mMap.moveCamera(cUpdate);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setTrafficEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng wroclaw = new LatLng(51.110, 17.034);\n mMap.addMarker(new MarkerOptions().position(wroclaw));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(wroclaw, 12));\n mMap.clear();\n // Setting a click event handler for the map\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n bSelect.setEnabled(true);\n // Creating a marker\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting the position for the marker\n markerOptions.position(latLng);\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(\"NOWY: \" + latLng.latitude + \" : \" + latLng.longitude);\n\n markerOptions.alpha(0.6f);\n // Clears the previously touched position\n mMap.clear();\n\n // Animating to the touched position\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n\n location = latLng.latitude + \" \" + latLng.longitude;\n\n setupMarker();\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(1*1000)\n .setFastestInterval(5 * 100);\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Log.i(TAG, \"map is ready\");\r\n mMap = googleMap;\r\n\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(this);\r\n mMap.setOnMyLocationClickListener(this);\r\n\r\n startLocationUpdates();\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n frLatLng = new LatLng(getLatitude, getLongitude);\n\n map = googleMap;\n map.getUiSettings().setMyLocationButtonEnabled(false);\n\n if (ActivityCompat.checkSelfPermission(getContext()\n , Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(getContext(),\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n\n map.addMarker(new MarkerOptions().position(frLatLng)).setTitle(getString(R.string.my_location));\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(frLatLng, 520));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng montesson = new LatLng(48.9190286,2.1380955);\n mMap.addMarker(new MarkerOptions().position(montesson).title(\"Marker in Montesson\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(montesson));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n int i = 12;\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n i);\n\n }\n mMap.setMyLocationEnabled(true); //when location changed call line. loaction manager\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latitude, longitude);\n addMarker(myLocation, name);\n moveCamera(myLocation, 3);\n\n //search a place\n /*searchInput = (EditText) findViewById(R.id.map_search_input);\n searchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if(actionId == EditorInfo.IME_ACTION_SEARCH\n || actionId == EditorInfo.IME_ACTION_DONE\n || actionId == KeyEvent.ACTION_DOWN\n || actionId == KeyEvent.KEYCODE_ENTER)\n //search location\n geoLocate();\n return false;\n }\n });*/\n\n //add location\n addButton = findViewById(R.id.map_add_button);\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.putExtra(\"latitude\", marker.getPosition().latitude);\n intent.putExtra(\"longitude\", marker.getPosition().longitude);\n intent.putExtra(\"name\", marker.getTitle());\n setResult(4, intent);\n finish();\n }\n });\n\n //long tap to add a marker\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(@NonNull LatLng latLng) {\n addMarker(latLng, name);\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(this);\n markerIconBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.ic_driver_check_in);\n\n mFillColor = Color.HSVToColor(50, new float[]{0, 1, 1});\n mStrokeColor = Color.BLACK;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n updateLocationUI();\n getDeviceLocation();\n // Add a marker in Sydney and move the camera\n //float zoom = 15;\n //LatLng gbc = new LatLng(43.676209, -79.410703);\n //mMap.addMarker(new MarkerOptions().position(gbc).title(\"Marker in GBC\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(gbc, zoom));\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(121.5729889, 25.0776557);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"This is my first Maker\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng CSN = new LatLng(51.87, -8.481);\n mMap.setMapType(MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(CSN).title(\"Marker at CSN college\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CSN, 15F));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mGoogleMap != null) {\n if (checkPermission()) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n // Check if we were successful in obtaining the map.\n if (mMapView != null) {\n\n mGoogleMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n mGoogleMap.addMarker(new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"It's Me!\"));\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 10));\n }\n });\n\n }\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n LatLng charlotte = new LatLng(35.22, -80.84);\r\n //currentMarker = mMap.addMarker(new MarkerOptions().position(charlotte).title(\"Charlotte, NC\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(charlotte));\r\n //currentMarker.setTag(0);\r\n\r\n mMap.setOnMapLongClickListener(this);\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n //&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n ) {\r\n // TODO: Consider calling\r\n\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\r\n @Override\r\n public boolean onMyLocationButtonClick() {\r\n Log.d(\"maps\", \"On my location button click\");\r\n return false;\r\n }\r\n });\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TEST\", \"MAP READY\");\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n LatLng curLocation = new LatLng(latitude,longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(curLocation,15.0f);\n setPin(latitude,longitude, null);\n mMap.moveCamera(cameraUpdate);\n for(int i = 0; i < restaurantList.size(); i++){\n double lat = restaurantList.get(i).getLatitude();\n double lng = restaurantList.get(i).getLongitude();\n setPin(lat, lng, restaurantList.get(i));\n }\n //Check we have the users permission to access their location\n // if we dont have it, we have to request it\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n\n } else {\n //we dont have permission, so we have to ask for it\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_LOCATION_REQUEST_CODE);\n //run asychronously.. show an alert dialog\n //user can choose allow or deny\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setTrafficEnabled(true);\n googleMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationChangeListener(onMyLocationChangeListener);\n\n // mMap.setPadding(0, 0, 0, 100);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(65.9667, -18.5333))\n .title(\"Hello world\"));\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng loc = new LatLng(v, v1);\n mMap.addMarker(new\n MarkerOptions().position(loc).title(\"0000000000\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"you are in sydney\").draggable(true));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMarkerDragListener(this);\n mMap.setOnMapLongClickListener(this);\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n final LatLng update = getLastKnownLocation();\n if (update != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.fromLatLngZoom(update, 11.0f)));\n }\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n mIsNeedLocationUpdate = false;\n moveToLocation(latLng, false);\n }\n\n });\n\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n // Home Mark\n LatLng home = new LatLng(41.374736, 2.168308);\n float zoom = 13;\n\n // Inicialitzem mapa\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN); //Tipus de mapa\n mMap.addMarker(new MarkerOptions().position(home).title(\"IOC\")); //Marcador inicial\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(home, zoom)); //Centrem mapa en el marcador inicial\n\n this.setMapLongClick(mMap);\n this.enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n final LatLng[] myLoc = {new LatLng(1, 1)};\n mMap.setMyLocationEnabled(true);\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n// @Override\n// public void onMyLocationChange(Location location) {\n// myLoc[0] = new LatLng(location.getLatitude(), location.getLongitude());\n// mMap.addCircle(new CircleOptions().center(myLoc[0]));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc[0], 15));\n// }\n// });\n\n mMap.addCircle(new CircleOptions().center(new LatLng(lat, lng)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lng), 18));\n\n mMap.setOnPoiClickListener(new GoogleMap.OnPoiClickListener() {\n @Override\n public void onPoiClick(PointOfInterest poi) {\n\n }\n });\n\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n\n showItems(lat, lng, radius);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng posini = new LatLng(3.4,-76.5);\n myMarker = mMap.addMarker(new MarkerOptions().position(posini));\n\n requestLocation();\n\n googleMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n if (!flag) {\n\n addMarker();\n flag = true;\n }\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(logTag,\"4\");\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST);\n return;\n }\n mMap.setOnMapLongClickListener(this);\n mMap.setOnInfoWindowClickListener( this );\n mMap.setOnMapClickListener(this);\n mMap.setMyLocationEnabled(true);\n ll=new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options = new MarkerOptions().position(ll);\n options.title(getAddressFromLatLng(ll));\n\n Log.d(logTag,\"5\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng hn = new LatLng(14.079526, -87.180662);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(hn));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(hn,7));\n helperFacturacion = new FacturacionHelper(MapListClientesActivity.this);\n\n\n addMarkers();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},101);\r\n }\r\n loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n populateMap(loc);\r\n try {\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()), 15.0f));\r\n }catch(Exception blyat){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"No hemos podido acceder a tu localización, revisa el estado de GPS y reinicia la app\");\r\n builder.show();\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n try{\n Geocoder geo = new Geocoder(this);\n\n //Get address provided for location as Address object\n List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);\n Address address = geo.getFromLocationName(location.getAddress(),1).get(0);\n\n LatLng position= new LatLng(address.getLatitude(),address.getLongitude());\n\n googleMap.addMarker(new MarkerOptions().position(position)\n .title(location.getTitle()));\n googleMap.setMinZoomPreference(12);\n googleMap.setMaxZoomPreference(15);\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(position));\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch(IndexOutOfBoundsException e){\n e.printStackTrace();\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "@Override\n @SuppressWarnings({\"MissingPermission\"})\n public void onMapReady(GoogleMap googleMap) {\n\n Log.d(TAG, \"Map is ready.\");\n mMap = googleMap;\n\n mMap.setMyLocationEnabled(true);\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n mGoogleApiClient);\n\n setMarkerToCurrentLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n// updateMap(new LocationModel(41.806363, 44.768531, \"Agmasheneblis Xeivani\"));\n if (shoppingList.getLocationReminder() != null) {\n updateMap(shoppingList.getLocationReminder());\n } else {\n updateMap(null);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(LocationStorage.getInstance().getLocation().getLatitude(), LocationStorage.getInstance().getLocation().getLongitude());\n// BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_large_marker);\n Marker marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Current Location\").snippet(\"Hold and drag to your desired location\"));\n marker.showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(sydney, 15);\n mMap.animateCamera(cameraUpdate);\n marker.setDraggable(true);\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng latLng=marker.getPosition();\n Location temp = new Location(LocationManager.GPS_PROVIDER);\n temp.setLatitude(latLng.latitude);\n temp.setLongitude(latLng.longitude);\n LocationStorage.getInstance().setLocation(temp);\n }\n });\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n//\n// return true;\n// }\n// });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mcircleOptions = mcircleOptions.center(sydney);\n mcircleOptions = mcircleOptions.radius(500);\n mcircleOptions = mcircleOptions.strokeWidth(2);\n mcircleOptions = mcircleOptions.strokeColor(Color.argb(100, 255, 73, 73));\n mcircleOptions = mcircleOptions.fillColor(Color.argb(100, 255, 73, 73));\n mMap.addCircle(mcircleOptions);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n !=\n PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mlatLng = latLng;\n mMap.clear();\n mMap.addMarker(new MarkerOptions().position(mlatLng));\n mcircleOptions = mcircleOptions.center(mlatLng);\n mMap.addCircle(mcircleOptions);\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n geocoder = new Geocoder(Maps.this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(mlatLng.latitude, mlatLng.longitude, 1);\n for (int i=0; i < addresses.get(0).getMaxAddressLineIndex(); i++) {\n Log.e(\"Address\", addresses.get(0).getAddressLine(i) + \"\");\n caddress = addresses.get(0).getAddressLine(i);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n loc_data = getSharedPreferences(\"loc_data\", MODE_PRIVATE);\n SharedPreferences.Editor loc_data_editor = loc_data.edit();\n loc_data_editor.putString(\"lat\", Double.toString(mlatLng.latitude));\n loc_data_editor.putString(\"lng\", Double.toString(mlatLng.longitude));\n loc_data_editor.putString(\"add\", caddress + \"\");\n loc_data_editor.commit();\n }\n });\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n\r\n //Initialize Google Play Services\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n\n initializeOtherSettlements(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n initializeQuestLocations(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()));\n\n mMap.setOnMarkerClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnPoiClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), 9));\n\n final PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)\n getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);\n\n autocompleteFragment.getView().setBackgroundColor(Color.WHITE);\n autocompleteFragment.getView().setVisibility(View.GONE);\n autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {\n @Override\n public void onPlaceSelected(Place place) {\n //Bias results towards the user's current location\n /*autocompleteFragment.setBoundsBias(new LatLngBounds(\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude),\n new LatLng(place.getLatLng().latitude, place.getLatLng().longitude)));*/\n\n //Get info about the selected place.\n //Log.i(TAG, \"Place: \" + place.getName());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }\n\n @Override\n public void onError(Status status) {\n // TODO: Handle the error.\n Log.i(TAG, \"An error occurred: \" + status);\n }\n });\n\n updateMapHistory();\n updateCustomTimeUI();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n enableMyLocation();\n buildGoogleApiClient();\n\n }", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n String info = sTitle;\n // Add a marker in Sydney and move the camera\n LatLng pos = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(pos).title(info));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 8));\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n gpsTracker = new GPSTracker(this);\n\n // TODO Cek Permission >= Marshmellow\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&\n checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION\n }, 110);\n return;\n }\n }\n\n if (gpsTracker.canGetLocation()) {\n latawal = gpsTracker.getLatitude();\n lonawal = gpsTracker.getLongitude();\n namelocationawal = myLocation(latawal, lonawal);\n }\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latawal, lonawal);\n locawal.setText(namelocationawal);\n mMap.addMarker(new MarkerOptions().position(myLocation).title(namelocationawal));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 14));\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.setPadding(30, 80, 30, 80);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng oregon = new LatLng(45.3, -122);\n mMap.addMarker(new MarkerOptions().position(oregon).title(\"Marker in Oregon\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(oregon));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n /* mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n LatLng ifto = new LatLng(-10.199202218157746, -48.31158433109522);\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.addMarker(new MarkerOptions().position(ifto).title(\"IFTO Campus Palmas\"));\n }", "private void setupMap() {\n if (googleMap == null) {\n SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\n mapFrag.getMapAsync(this);\n mLocationProvider = new LocationProvider(this, this);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n\n mMap.getUiSettings().setCompassEnabled(true);\n// mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setIndoorLevelPickerEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n mMap.getUiSettings().setAllGesturesEnabled(true);\n getDeviceLocation();\n mMap.setOnMarkerDragListener(this);\n\n }\n }", "public void onMapReady(GoogleMap googleMap , double lati, double longi) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(lati, longi);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mGoogleMap = map;\n mGoogleMap.setMyLocationEnabled(true);\n Log.d(TAG, \"Map Ready\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n\n mMap = googleMap;\n\n attachLocationListener();\n\n\n mMap.setOnMarkerDragListener(this);\n\n }", "public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(1));\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n\r\n /// This allows the user to zoom in and out of the map\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n mMap.getUiSettings().isMyLocationButtonEnabled();\r\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n //Agafar la localitzacio actual per mostrar-ho al mapa\n LocationManager locationManager = (LocationManager)\n getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n LatLng actual = new LatLng((location.getLatitude()),location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(actual,13));\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(getContext());\n mMap = googleMap;\n mMap.setMinZoomPreference(13.0f);\n mMap.setMaxZoomPreference(20.0f);\n mMap.setOnMapClickListener(this);\n mMap.setInfoWindowAdapter(this);\n mMap.setOnInfoWindowClickListener(MyOnInfoWindowClickListener);\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.\n ACCESS_FINE_LOCATION}, 1);\n } else {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n mMap.setMyLocationEnabled(true);\n\n buildGoogleApiClient();\n mGoogleApiClient.connect();\n\n }", "@Override\n public void onMapReady(final GoogleMap map) {\n mMap = map;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng point) {\n mMap.clear();\n buildMarker(\"User Tap\", \"This is snippet\", point, true);\n @SuppressLint(\"DefaultLocale\") String latLong = String.format(\"%f,%f\", point.latitude, point.longitude);\n String endPoint = String.format(placesURL,latLong, String.valueOf(distance), BuildConfig.API_KEY);\n Location locationSelected = new Location(mLastKnownLocation);\n locationSelected.setLatitude(point.latitude);\n locationSelected.setLongitude(point.longitude);\n showPlacesNearby(locationSelected, endPoint);\n }\n });\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n mMap.clear();\n }\n });\n\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n mMap.clear();\n updateLocationUI();\n getDeviceLocation();\n return true;\n }\n });\n\n\n // Prompt the user for permission.\n getLocationPermission();\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setAllGesturesEnabled(mLock);\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n enableMyLocation();\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n riderLat = getIntent().getDoubleExtra(DriverActivity.RIDER_LATITUDE_EXTRA, 0.0);\n riderLong = getIntent().getDoubleExtra(DriverActivity.RIDER_LONGITUDE_EXTRA, 0.0);\n LatLng rider = new LatLng(riderLat, riderLong);\n riderMarker = mMap.addMarker(new MarkerOptions()\n .position(rider)\n .title(\"Rider\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n Toast.makeText(this, \"You don't have location permission\", Toast.LENGTH_LONG).show();\n return;\n }\n\n Location hereNow = mLocationManager.getLastKnownLocation(mBestProvider);\n if (hereNow != null) {\n onLocationChanged(hereNow);\n }\n\n mLocationManager.requestLocationUpdates(mBestProvider, 400, 1, this);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n //Enable Current location\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.\n PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.\n ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, MY_REQUEST_INT);\n\n }\n\n\n return;\n\n } else {\n mMap.setMyLocationEnabled(true);\n\n\n }\n\n\n // Add a marker in Sydney and move the camera\n //LatLng sydney = new LatLng(-34, 151);\n //mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot))\n // );\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney,16),5000,null);\n //new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.blackspot));\n\n //LatLng latLng = new LatLng(-1.2652560778411037, 36.81265354156495);\n //mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Parklands\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n //BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.blackspot);\n ////LatLng harmbug = new LatLng(-37, 120);\n //mMap.addMarker(new MarkerOptions().position(harmbug).title(\"Marker in Harmbug\")\n //.icon(icon));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(harmbug,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(harmbug));\n\n //LatLng kenya = new LatLng(-2.456, 37);\n //mMap.addMarker(new MarkerOptions().position(kenya).title(\"Marker in Kenya\"));\n //mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(kenya,16),5000,null);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(kenya));\n\n LatLng sydney = new LatLng(-0.8041213212075744, 36.53117179870606);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Blackspot at Kinungi\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(sydney, 18), 5000, null);\n\n LatLng gilgil = new LatLng(-0.2167, 36.2667);\n mMap.addMarker(new MarkerOptions().position(gilgil).title(\"Blackspot at Gilgil\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(gilgil));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(gilgil, 18), 5000, null);\n\n LatLng njoro = new LatLng(-0.3290, 35.9440);\n mMap.addMarker(new MarkerOptions().position(njoro).title(\"Blackspot at Njoro\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(njoro));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(njoro, 18), 5000, null);\n\n LatLng bluepost = new LatLng(-1.0226988092777693, 37.06806957721711);\n mMap.addMarker(new MarkerOptions().position(bluepost).title(\"Blackspot at Bluepost Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(bluepost));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Nithi = new LatLng(-0.26649259802107667, 37.66248464584351);\n mMap.addMarker(new MarkerOptions().position(Nithi).title(\"Blackspot at Nithi Bridge\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Nithi));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(bluepost, 18), 5000, null);\n\n LatLng Maungu = new LatLng(-3.558353542362671, 38.74993801116944);\n mMap.addMarker(new MarkerOptions().position(Maungu).title(\"Blackspot at Maungu Area\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Maungu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Misikhu = new LatLng(0.6662027919912484, 34.75215911865235);\n mMap.addMarker(new MarkerOptions().position(Misikhu).title(\"Blackspot at Misikhu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Misikhu));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Muthaiga = new LatLng(-1.2614375406469367, 36.840720176696784);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Muthaiga Road\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Muthaiga));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Maungu, 18), 5000, null);\n\n LatLng Pangani = new LatLng(-1.2665003190843396, 36.834239959716804);\n mMap.addMarker(new MarkerOptions().position(Muthaiga).title(\"Blackspot at Pangani\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(Pangani));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Pangani, 18), 5000, null);\n\n LatLng KU = new LatLng(-1.1823303731373749, 36.93703293800355);\n mMap.addMarker(new MarkerOptions().position(KU).title(\"Blackspot at KU\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(KU));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(KU, 18), 5000, null);\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Toast.makeText(this, \"Map is Ready\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n\n if (mLocationPermissionsGranted) {\n getDeviceLocation();\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n init();\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng location = new LatLng(mLat, mLng);\n moveCamera(location, DEFAUT_ZOOM);\n if (ActivityCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(\n this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Pula and move the camera\n LatLng pula = new LatLng(44.86726450096342, 13.850460687162476);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(pula, 13));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n enableUserLocation();\n zoomTooUserLocation();\n } else {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission\n .ACCESS_FINE_LOCATION)) {\n //we can show user dialog why this permission is necessery\n\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission\n .ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.mapstyle_day);\n mMap.setMapStyle(style);\n\n if (locationProvider != null) {\n enableLocationBullet();\n if (lastpos != null) {\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(lastpos));\n }\n }\n // Start clustermanager and add markers\n setUpClusterManager();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapReady = true;\n if (searchedRestaurants != null) {\n addRestaurants(searchedRestaurants, false);\n }\n\n Location loc = locationProvider.getLastLocation();\n if (!init) {\n zoomMapToPosition(loc, MY_LOCATION_ZOOM);\n init = true;\n }\n\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n ////run with it to check what is happening and remove it to see\n\n\n //Initialize Google Play Services\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n } else {\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n\r\n //Initialize Google Play Services\r\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\r\n if (ContextCompat.checkSelfPermission(this,\r\n Manifest.permission.ACCESS_FINE_LOCATION)\r\n == PackageManager.PERMISSION_GRANTED) {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n }\r\n else {\r\n buildGoogleApiClient();\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n\r\n\r\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(false);\n mUiSettings.setMapToolbarEnabled(false);\n mUiSettings.setZoomControlsEnabled(false);\n mUiSettings.setScrollGesturesEnabled(false);\n mUiSettings.setTiltGesturesEnabled(false);\n mUiSettings.setRotateGesturesEnabled(false);\n\n // Add a marker in Sydney and move the camera\n final LatLng airport = new LatLng(listAirport.get(index).getLatitude(), listAirport.get(index).getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLng(airport));\n mMap.setMinZoomPreference(10.0f);\n mMap.setMaxZoomPreference(10.0f);\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n onClick(index, MapsActivity.class);\n }\n });\n\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n LatLng latlong = new LatLng(29.375859, 47.977405);\n googleMap.addMarker(new MarkerOptions().position(latlong).title(\"\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong, 9.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng livraria = new LatLng(maps.getLatitude(), maps.getLongitude());\n if(this.maps.getId() == 1){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Saraiva - Praia de Belas\"));\n } else if(this.maps.getId() == 2){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cultura - Bourbon Country\"));\n } else if(this.maps.getId() == 3){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Cameron\"));\n } else if(this.maps.getId() == 4){\n mMap.addMarker(new MarkerOptions().position(livraria).title(\"Livraria Siciliano\"));\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(livraria, 15f));\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(LOG_TAG, \"called onMapReady()\");\n mMap = googleMap;\n\n // Set up UI for map\n mMap.setMyLocationEnabled(true);\n mMap.setBuildingsEnabled(true);\n mUiSettings = mMap.getUiSettings(); // https://developers.google.com/maps/documentation/android-sdk/controls\n mUiSettings.setMyLocationButtonEnabled(false);\n mUiSettings.setCompassEnabled(true);\n mUiSettings.setTiltGesturesEnabled(true);\n mUiSettings.setRotateGesturesEnabled(true);\n mUiSettings.setScrollGesturesEnabled(true);\n mUiSettings.setZoomGesturesEnabled(true);\n\n\n // Move the camera to last known user location\n fusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() { // this -> getActivity()??\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng startingLocation = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(startingLocation) // Sets the center of the map\n .zoom(16) // Sets the zoom\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition), 250, null);\n Log.d(LOG_TAG, \" > moved map to last known location\");\n }\n }\n });\n addZoneHolesToMap(shiftZones);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng liege = new LatLng(50.620552, 5.581177);\n LatLng victime = new LatLng(50.620957, 5.582263);\n mMap.addMarker(new MarkerOptions()\n .position(liege)\n .title(\"You are here !\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW)));\n mMap.addMarker(new MarkerOptions()\n .position(victime)\n .title(\"Aurélie\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(liege,17));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng parque = new LatLng(latitud, longitud);\n mMap.addMarker(new MarkerOptions().position(parque).title(lugar).icon(BitmapDescriptorFactory.fromResource(R.drawable.icons8_terraria_48)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(parque));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitud, longitud),16.0f));\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n marker = googleMap.addMarker(markerOptions);\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n mapLoaded = true;\n waitForMapPlease();\n }\n });\n }" ]
[ "0.81884885", "0.8042996", "0.80369604", "0.8033771", "0.7998488", "0.79770344", "0.7957945", "0.7957621", "0.7954723", "0.79429656", "0.7936834", "0.79301476", "0.7915297", "0.79048723", "0.7888234", "0.7885085", "0.7885085", "0.7885085", "0.7885085", "0.7878164", "0.78446823", "0.7827953", "0.7820209", "0.781347", "0.77963114", "0.7792471", "0.77872795", "0.7786649", "0.77632064", "0.77445674", "0.7742489", "0.77364564", "0.7729635", "0.76863027", "0.7673587", "0.7666516", "0.7666381", "0.7660542", "0.7660032", "0.7658027", "0.7656693", "0.764701", "0.7640233", "0.76333576", "0.76280946", "0.7621821", "0.7620966", "0.7618586", "0.76174897", "0.7608421", "0.76047516", "0.75995344", "0.7598638", "0.7593479", "0.75854367", "0.7585161", "0.75797725", "0.7571025", "0.7568314", "0.7563941", "0.7563395", "0.7554277", "0.7551052", "0.75451434", "0.75433755", "0.75384784", "0.75305945", "0.7527021", "0.7520158", "0.75182885", "0.75154966", "0.7492834", "0.74907964", "0.749", "0.74861366", "0.74739647", "0.7467611", "0.74626285", "0.7457827", "0.7457491", "0.7452213", "0.74507207", "0.7448966", "0.74479777", "0.74376386", "0.7429154", "0.7425011", "0.7417805", "0.74167794", "0.7416", "0.7411618", "0.7410149", "0.7408731", "0.7399689", "0.73954254", "0.7393991", "0.7389341", "0.73889375", "0.7377822", "0.7369343", "0.73593694" ]
0.0
-1
save clicked marker to get info window of it later
@Override public boolean onClusterItemClick(Person person) { mClickedMarker = person; mMarker = renderer.getMarker(mClickedMarker); mMarker.showInfoWindow(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onInfoWindowClick(Marker marker) {\n Integer markerId = markers.get(marker);\n InfoWindowClicked(markerId);\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t}", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tint id = hashmap.get(marker)-1;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDataBase.Object object = new Object();\n\t\t\t\tobject = list.get(id);\n\n\t\t\t\tbundle.putSerializable(\"ob\", object);\n\n\t\t\t\tIntent intent = new Intent(getActivity(), Places.class);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t\t\tLog.d(\"ASD\", marker.getTitle());\n\t\t\t\t\t\tString markerItemId = infoList.get(marker.getTitle());\n\t\t\t\t\t\tonMapWindwosClick(markerItemId, marker.getTitle());\n\t\t\t\t\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n makeText(this, \"Info window clicked\",\n LENGTH_SHORT).show();\n marker.getTag();\n marker.getTitle();\n marker.getId();\n\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n\n if (Config.CEK_KONEKSI(ListDealerMaps.this)) {\n if (markerAccessMapping.get(marker).equals(\"1\")) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(Config.DISP_KD_DEALER, markerIdMapping.get(marker));\n resultIntent.putExtra(Config.DISP_COY_DEALER, markerCoyMapping.get(marker));\n resultIntent.putExtra(Config.DISP_NAMA_DEALER, marker.getTitle());\n setResult(Activity.RESULT_OK, resultIntent);\n finish();\n }else{\n Toast.makeText(ListDealerMaps.this, Config.ALERT_ONLY_VIEW, Toast.LENGTH_SHORT).show();\n }\n } else {\n showDialog(Config.TAMPIL_ERROR);\n }\n\n }", "@Override\n\tpublic void onInfoWindowClick(Marker marker)\n\t{\n\t\tString id = marker.getId();\n\t\tid = id.substring(1);\n\n\t\tmyLocation = new LatLng(map.getMyLocation().getLatitude(), map.getMyLocation().getLongitude());\n\n\t\tif (myLocation != null)\n\t\t{\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putString(KEY_NAMA, listTempatMakan.get(Integer.parseInt(id)).getNama());\n\t\t\tbundle.putString(KEY_ALAMAT, listTempatMakan.get(Integer.parseInt(id)).getAlamat());\n\t\t\tbundle.putDouble(KEY_LAT_TUJUAN, marker.getPosition().latitude);\n\t\t\tbundle.putDouble(KEY_LNG_TUJUAN, marker.getPosition().longitude);\n\t\t\tbundle.putDouble(KEY_LAT_ASAL, myLocation.latitude);\n\t\t\tbundle.putDouble(KEY_LNG_ASAL, myLocation.longitude);\n\n\t\t\tIntent i = new Intent(MainActivity.this, InfoTempatMakanActivity.class);\n\t\t\ti.putExtras(bundle);\n\t\t\tstartActivity(i);\n\n\t\t} else\n\t\t{\n\t\t\tToast.makeText(this, \"Tidak dapat menemukan lokasi anda \", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "public void onInfoWindowClick(Marker marker2) {\n\n AlertDialog.Builder builder2 = new AlertDialog.Builder(Detalles.this);\n builder2.setTitle(\"Epicent\");\n builder2.setMessage(\"Referencia : \" +\"ddddddd\" +\"\\n\" +\n \"Fecha local : \" + \"ccccccc\" +\"\\n\" +\n \"Hora local : \" + \"ccccccc\"+ \"\\n\" +\n \"Profundidad : \" + \"ccccccc\"+\" km\"+ \"\\n\" +\n \"Intensidad : \" + \"ccccccc\"+ \"\\n\" +\n \"Magnitud : \" + \"ccccccc\"+ \"\\n\" +\n \"Ubicación : \" + \"ccccccc\"+ \", \" + \"ccccccc\");\n builder2.setNegativeButton(\"Cerrar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog2, int which) {\n dialog2.cancel();\n }\n });\n\n builder2.setCancelable(true);\n builder2.create().show();\n\n }", "@Override\n public void onInfoWindowLongClick(Marker marker) {\n if (marker.getTitle().equals(\"New Maintenance Form\")){\n newOld = false; //don't have to do anything.....\n }else{\n //newOld = true;\n load_id=marker.getSnippet();\n }\n //pull up the maintenance form\n Intent intent = new Intent(MaintenanceMapActivity.this, MaintenanceActivity.class);\n intent.putExtra(\"latitude\", latitude );\n intent.putExtra(\"longitude\",longitude);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tLog.e(\"map\", \"at InfoWindowClisck\");\n\t\t\t\t\n\t\t\t\tString id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파\n\t\t\t\tArrayList<String> _pathOfPic = mAreaList.get(mIdx).pathOfPic;\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(\"android.intent.action.CUSTOM_ALBUM\");\n\t\t\t\tintent.putStringArrayListExtra(\"pathOfPic\", _pathOfPic);\n\t\t\t\t\n\t\t\t\tmCtx.startActivity(intent);\t\n\t\t\t\t\n\t\t\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n return;\n// openTimesheetInfo(marker.getTitle());\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker arg0) {\n\t\t\t\tString id = arg0.getTitle();\n\t\t\t\t\n\t\t\t\tif(id.startsWith(\"Dis\") || id.startsWith(\"my\")){\n\t\t\t\t\tif(id.startsWith(\"Dis\")){\n\t\t\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).setTitle(\"Warning\")\n\t\t\t\t\t .setMessage(\"Please select a right victim!!!\")\n\t\t\t\t\t .setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t \t // finish();\n\t\t\t\t }\n\t\t\t\t }).create();\n\t\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\tif(id.startsWith(\"my\")){\n\t\t\t\t\t\tmyLocation = arg0.getPosition();\n\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t\t .setMessage(\"Do you what to update your current location?\")\n\t\t\t\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t setFlag = false;\n\t\t\t }\n\t\t\t })\n\t\t\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t \n\t\t\t }\n\t\t\t }).create();\n\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tvicLocation = arg0.getPosition();\n\t\t\t\t\tfinal String PoVictim = readOneVictim(id);\n\t\t\t\t\tLog.d(\"victim infomtion:\",PoVictim);\n\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t .setMessage(\"What do you want to do with this victim?\")\n\t\t\t .setNegativeButton(\"Edit/Delect Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t EditVictim(PoVictim);\n\t\t }\n\t\t })\n\t\t .setPositiveButton(\"Find THIS Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t //String[] PoVIF = PoVictim.split(\",\");\n\t\t \t vicFlag = true;\n\t\t \t //LatLng vic = new LatLng(42.39398619218224,-72.52872716635466);\n\t\t \t if(vicLocation != null && myLocation != null){\n\t\t \t\t if(wayList != null){\n\t\t \t\t\t wayList.clear();\n\t\t \t\t }\n\t\t \t\t \n\t\t \t\t if(indoorFlag){ //when isindoor return true\n\t\t \t\t\t wayList = findOneVictim(myLocation, vicLocation);\n\t\t \t\t\t if(wayList != null){\n\t\t \t\t\t\t getPath();\n\t\t \t\t\t\t}\n\t\t \t\t }else{\n\t\t \t\t\t LatLng door = getNearestDoor(vicLocation);\n\t\t \t\t\t //get the first part outdoor path \n\t\t \t\t\t findDirections(myLocation.latitude,myLocation.longitude,door.latitude,door.longitude,GMapV2Direction.MODE_DRIVING );\n\t\t \t\t\t //wayList.addAll(findOneVictim(door, vicLocation));\n\t\t \t\t } \n\t\t \t }\n\t\t }\n\t\t }).create();\n\t\t\t dialog.show();\n\t\t\t\t}\t\n\t\t\t}", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n marker.hideInfoWindow();\n Punto temp = esEste(marker.getTitle());\n agregarItems(temp, marker);\n\n return true;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n showMarkerButtons(false);\n current_number=\"\";\n markerClickflag=false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n //Cuando se presiona un marker, se abre la ventana de info (default)\n marker.showInfoWindow();\n return true;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")){\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n for(MapItem mi : lmi) {\n Log.d(TAG, \"clickCount \"+mi.getId()+\" \"+\n marker.getTag());\n if(mi.getId().equals(marker.getTag())) {\n Log.d(TAG, \"clickCount \"+mi.getImages().get(0));\n Picasso.get().load(mi.getImages().get(0)).into(sh.getI0());\n sh.setVisibility(View.VISIBLE);\n sh.fill(mi.getSiteName(), mi.getCreator(),\n \"\"+mi.getSiteLocation().getLatitude()+\", \"+mi.getSiteLocation().getLongitude());\n }\n }\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n if (Objects.equals(marker.getTag(), true)) {\n Toast.makeText(MapsActivity.this,\n \"Own marker\", Toast.LENGTH_SHORT).show();\n } else {\n try {\n showDetails(marker);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return true;\n }", "@Override\n\tpublic boolean onMarkerClick(Marker marker) {\n\t\tImageView imageView = ((ImageView) infobox.findViewById(R.id.loaded_image));\n\t\t\n//\t\t title.setText( marker.getTitle() );\n\t\t \n\t\t // load the image\n//\t\t imageLoader.displayImage( protestMap.get( marker.getId() ).getImageUrl(), imageView, new SimpleImageLoadingListener() {\n//\t\t @Override\n//\t\t public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n//\t\t super.onLoadingComplete(imageUri, view, loadedImage);\n//\t\t getInfoContents(marker);\n//\t\t }\n//\t\t });\n//\t\t \n \timageLoader.displayImage( protestMap.get( marker.getId() ).getImageUrl(), imageView);\n\t\t\n\t\t// if the Infobox is already showing hide it \n if( infobox.isShown() )\n \tinfobox.setVisibility(LinearLayout.GONE);\n // else show it\n else\n \tinfobox.setVisibility(LinearLayout.VISIBLE);\n\t\treturn false;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n //setOnInfoWindowClick listener\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n if(markerOnClick.get(marker).isItUserMarker()) {\n Intent intent = new Intent(MainActivity.this, FriendProfileActivity.class);\n intent.putExtra(\"friendID\", markerOnClick.get(marker).getID());\n startActivity(intent);\n }else{\n Intent intent = new Intent(MainActivity.this, AnswerTheQuestionActivity.class);\n intent.putExtra(\"questionID\", markerOnClick.get(marker).getID());\n intent.putExtra(\"userID\", user.getId());\n startActivityForResult(intent,ANSWER_THE_QUESTION_ACTIVITY_REQUSET_CODE);\n }\n }\n });\n restoreCurrentLocation();\n }", "@Override\n\t\t\t\tpublic boolean onMarkerClick(Marker arg0) {\n\t\t\t\t\t\n\t\t\t\t\tfor(final PoiInfo poiInfo:AppContext.listmap){\n\t\t\t\t\t\tif(poiInfo.location.latitude==arg0.getPosition().latitude&&poiInfo.location.longitude==arg0.getPosition().longitude){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tView mView = LayoutInflater.from(ZhouBianYaodian.this).inflate(R.layout.map_massage_data, null);\n\t\t\t\t\t\t\tTextView dataname=(TextView) mView.findViewById(R.id.txt_map_name);\n\t\t\t\t\t\t\tTextView address=(TextView)mView. findViewById(R.id.txt_map_address);\n\t\t\t\t\t\t\tImageView imageView=(ImageView)mView. findViewById(R.id.map_image_call); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdataname.setText(poiInfo.name==null?\"\":poiInfo.name);\n\t\t\t\t\t\t\t\taddress.setText(poiInfo.address==null?\"\":poiInfo.address);\n\t\t\t\t\t\t\t\tif(poiInfo.phoneNum!=null&&!poiInfo.phoneNum.equals(\"\")){\n\t\t\t\t\t\t\t\t\timageView.setVisibility(ImageView.VISIBLE);\n\t\t\t\t\t\t\t\t\timageView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_DIAL, Uri\n\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(\"tel:\" + poiInfo.phoneNum));\n\t\t\t\t\t\t\t\t\t\t\tLog.d(\"测试数据\", poiInfo.phoneNum);\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\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\n\t\t\t\t\t\t\tmInfoWindow= new InfoWindow(mView,arg0.getPosition(), -47);\n\t\t\t\t\t\t\tmBaiduMap.showInfoWindow(mInfoWindow);\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\t\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public View getInfoContents(Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(place.getAddress());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(place.getLatLng().latitude + \",\" + place.getLatLng().longitude);\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", place.getAddress());\n intent.putExtra(\"place_selection\", place_selection_flag);\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n openTimesheetInfo(marker.getTitle());\n }", "@Override\n public View getInfoContents(final Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", marker.getTitle());\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n System.out.println(\"The map was clicked\");\n if(lineSelected == true) {\n resetInfoBox();\n }\n }", "private void retrieveLocationClicked() {\n locationClikedId = getIntent().getIntExtra(GeneralConstants.EDIT_LOCATION_DETAILS_KEY, 0);\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String markerName = mTextField.getText().toString();\n\n // check if a marker name is set\n if(markerName.isEmpty()) {\n markerName = \"Marker\" + Integer.toString(numberOfMarkers);\n }\n\n // add marker\n Marker marker = mMap.addMarker(\n new MarkerOptions()\n .position(latLng)\n .title(markerName)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED))\n );\n\n // add halo\n Circle halo = mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(100.0)\n .strokeColor(Color.RED)\n .visible(false)\n );\n\n // add marker and halo to tracked markers\n mMarkerHalos.put(marker, halo);\n\n // lat and long to separate values\n double markerLat = latLng.latitude;\n double markerLong = latLng.longitude;\n\n // save marker to shared preferences\n Set<String> positionSet = new HashSet<String>();\n positionSet.add(Double.toString(markerLat));\n positionSet.add(Double.toString(markerLong));\n mPrefEditor.putStringSet(markerName, positionSet);\n mPrefEditor.apply();\n\n // clear text field\n mTextField.setText(\"\");\n\n // increase marker counter\n ++numberOfMarkers;\n }", "private void showPlaceInfo(Marker marker){\n if (marker != null){\n //unlock the drawer\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);\n\n et_drawer_name.setText(marker.getTitle());\n\n //open the drawer layer from the right\n layout_drawer.openDrawer(Gravity.RIGHT);\n\n final Marker markerCopy = marker;\n\n Button remove = (Button) findViewById(R.id.drawer_btn_remove);\n remove.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n layout_drawer.closeDrawer(Gravity.RIGHT);\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);\n // set dialog message\n alertDialogBuilder\n .setMessage(\"Are you sure you want to remove location?\")\n .setCancelable(false)\n .setPositiveButton(\"Remove\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n removeMarkerFromMap(markerCopy);\n Toast.makeText(getApplicationContext(), \"Location Removed\",\n Toast.LENGTH_SHORT).show();\n }\n })\n .setNegativeButton(\"Cancel\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n // if this button is clicked, just close\n // the dialog box and do nothing\n dialog.cancel();\n }\n });\n\n // create alert dialog\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }\n });\n\n //Close the drawer when cancel is pressed\n Button cancel = (Button) findViewById(R.id.drawer_btn_cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n layout_drawer.closeDrawer(Gravity.RIGHT);\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n }\n });\n\n //Save changes in the name and close drawer when save is pressed\n Button save = (Button) findViewById(R.id.drawer_btn_save);\n save.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n EditText editName = (EditText) findViewById(R.id.drawer_et_name);\n String editedName = editName.getText().toString();\n changeMarkerName(markerCopy, editedName);\n Toast.makeText(getApplicationContext(), \"Name Saved\", Toast.LENGTH_SHORT).show();\n layout_drawer.closeDrawer(Gravity.RIGHT);\n layout_drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n }\n });\n }\n }", "private void setUpTheIcon ( Marker marker ){\n\n // Hide the current info window\n HideCurrentInfoWindow();\n\n if ( mCurrentDestination == null || !mCurrentDestination.getId().equals(marker.getId()) ){\n\n if ( mCurrentPark != null ){\n if ( !mCurrentPark.getId().equals(marker.getId() ) ){\n // clicked ! on current selected parking;\n setSmallIcon ( mCurrentPark );\n\n mCurrentPark = marker;\n\n setBigIcon ( mCurrentPark );\n\n }\n }\n else {\n //previous was selected nothing;\n\n mCurrentPark = marker;\n setBigIcon ( mCurrentPark );\n mCurrentPark.showInfoWindow();\n }\n }else{\n //clicked not a parking;\n if ( mCurrentPark != null ){\n\n setSmallIcon ( mCurrentPark );\n mCurrentPark = null;\n }\n }\n\n // show info window for clicked marker;\n marker.showInfoWindow();\n\n }", "@Override\n public View getInfoWindow(Marker marker) {\n\n if(shownMarker!=null&&shownMarker.isInfoWindowShown()){\n shownMarker.hideInfoWindow();\n shownMarker.showInfoWindow();\n\n }\n\n return null;\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n if(marker.equals(markerPrueba)){\n UnsaFragment.newInstance(marker.getTitle(),\"Universidad nacional de san Agustin de Arequipa\" )\n .show(getSupportFragmentManager(), null);\n\n\n }\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "@Override\n\t\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\t\tgoogleMap.clear();\n\n\t\t\t\t\t// Creating an instance of MarkerOptions to set position\n\t\t\t\t\t// MarkerOptions markerOptions = new MarkerOptions();\n\n\t\t\t\t\t// Setting position on the MarkerOptions\n\t\t\t\t\tmarker.position(arg0);\n\n\t\t\t\t\t// Animating to the currently touched position\n\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory.newLatLng(arg0));\n\n\t\t\t\t\t// Adding marker on the GoogleMap\n\t\t\t\t\tMarker marker1 = googleMap.addMarker(marker);\n\n\t\t\t\t\t// Showing InfoWindow on the GoogleMap\n\t\t\t\t\tmarker1.showInfoWindow();\n\t\t\t\t}", "@Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }", "@Override\n\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\tfinal LatLng location = arg0;\n \tAlertDialog builder = new AlertDialog.Builder(MainActivity.this)\n\t .setMessage(\"Do you want to add your location here?\")\n\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t \t setFlag = true;\n\t \t myLocation = location;\n\t \t //use this flag to indicate that we want to see the path from current location or a set point\n\t \t Log.d(\"my location:\", \"\"+myLocation.latitude + myLocation.longitude);\n\t \t if(setFlag == true){\n\t \t\t if(myMarker != null){\n\t\t \t\t myMarker.remove();\n\t\t \t }\n\t\t \t myMarker = mMap.addMarker(new MarkerOptions().position(myLocation).title(\"myLocation\").draggable(true)\n\t\t \t\t\t\t\t\t.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n\t\t \t\t\t\t landmarks.addMarker(\"myLocation\", myMarker);\n\t \t } \n\t }\n\t })\n\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t // User cancelled the dialog\n\t }\n\t }).create();\n \tbuilder.show();\n\t\t\t}", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Toast.makeText(CameraInfoActivity.this,\"点击布点\",Toast.LENGTH_SHORT).show();\n return true;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n marker.showInfoWindow();\n marker.setTag(true);\n totalCounter = totalCounter + 1;\n\n // If both stations have been selected save destination station id to array\n\n if ((totalCounter % 2) == 0 ) {\n\n // Iterate current stations and save its id to array\n\n for (int i = 0; i < currentStations.size(); i++) {\n if (currentStations.get(i).getName().equals(marker.getTitle())) {\n stationIDs[1] = currentStations.get(i).getId();\n }\n }\n\n // If destination station is the same as start station, prompt user to select a different station\n\n if (stationIDs[0] == stationIDs[1]) {\n\n stationIDs[1] = -1;\n totalCounter = totalCounter - 1;\n Helpers.showToast(getApplicationContext(), \"Select a different station for destination\");\n\n } else {\n infoMessage.setText(\"Destination: \" + marker.getTitle());\n }\n\n } else {\n\n // If number of stations selected is not an even number, mark their tag with false value\n\n stationIDs[0] = -1;\n stationIDs[1] = -1;\n\n for (Marker currentMarker : mMarkerArray) {\n marker.hideInfoWindow();\n currentMarker.setTag(false);\n }\n\n // Iterate current stations and save its id to array\n\n for (int i = 0; i < currentStations.size(); i++) {\n if (currentStations.get(i).getName().equals(marker.getTitle())) {\n stationIDs[0] = currentStations.get(i).getId();\n }\n }\n marker.showInfoWindow();\n marker.setTag(true);\n infoMessage.setText(\"From station: \" + marker.getTitle());\n }\n return true;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n if(findViewById(R.id.marker_window).getVisibility() == View.VISIBLE){\n findViewById(R.id.marker_window).setVisibility(View.INVISIBLE);\n setIconListVisibility(true);\n }else{\n if (!firstMapTouch) {\n Toast.makeText(getApplicationContext(), R.string.maps_onmapclick, Toast.LENGTH_SHORT).show();\n firstMapTouch = true;\n }\n }\n }", "@Override\n public void onMapClick(LatLng point) {\n mMap.clear();\n\n // Add marker on clicked point\n mMap.addMarker(new MarkerOptions().position(point)\n .icon(BitmapDescriptorFactory\n .defaultMarker(BitmapDescriptorFactory.HUE_RED)))\n .setTag(true);\n\n // Set global lat and lng\n lat = point.latitude;\n lng = point.longitude;\n\n // Hide detail view\n hideDetails();\n }", "@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n Integer markerId = markers.get(marker);\n LatLng latLng = marker.getPosition();\n OnMarkerClick(markerId, latLng.latitude, latLng.longitude);\n\n // We return false to indicate that we have not consumed the event and that we wish\n // for the default behavior to occur (which is for the camera to move such that the\n // marker is centered and for the marker's info window to open, if it has one).\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Listing listing = (Listing) marker.getTag();\n goToDetailedListingScreen(listing);\n return false;\n }", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n\n\n mMap = googleMap;\n Intent intent = getIntent();\n seisme = (Seisme) intent.getSerializableExtra(\"seisme\");\n String[] split = seisme.getPoint().split(\" \");\n LatLng point = new LatLng(Double.parseDouble(split[0]), Double.parseDouble(split[1]));\n mMap.addMarker(new MarkerOptions().position(point).title(seisme.getTitle()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(point));\n\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener()\n {\n @Override\n public void onInfoWindowClick(Marker marker)\n {\n Context context = getApplicationContext();\n Intent intent = new Intent(MapsActivity.this, infoDetail.class);\n intent.putExtra(\"item\", seisme);\n startActivity(intent);\n }\n });\n }", "@Override\n\t\t\tpublic View getInfoWindow(Marker marker) {\n\t\t\t\tView v = getLayoutInflater().inflate(R.layout.map_info_window, null);\n\n // Getting reference to the TextView to set title\n TextView memo = (TextView) v.findViewById(R.id.memo);\n ImageView imgV = (ImageView) v.findViewById(R.id.photo);\n\n memo.setText(marker.getTitle());\n\n \n /**\n * marker는 생성되는 순서대로 m0, m1, m2... m 뒤에 붙는 숫자들은 마커의 인덱스이고 이 인덱스는 \n * areaList의 인덱스와 같으므로 마커의 인덱스를 파싱해서 areaList에 그 인덱스로 접근하면 지역정보를 얻을 수 있다.\n */\n String id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파.\n // LatLng l = marker.getPosition();\n \n String mPath = mAreaList.get(mIdx).pathOfPic.get(0); // 해당 위치에 저장된 많은 사진중 첫번째 사진주\n Bitmap bitm = decodeBitmapFromStringpath(mPath, 100, 100);\n imgV.setImageBitmap(bitm);\n// imgV.setImageURI(Uri.parse(mPath));\n // Returning the view containing InfoWindow contents\n return v;\n\t\t\t}", "@Override\n public boolean onMarkerClick(Marker marker) {\n searchMarker.remove();\n if(truckMarker!= null) {\n truckMarker.remove();\n }\n truckMarker = mMap.addMarker(new MarkerOptions().position(marker.getPosition()));\n new LoadTruckDetails().execute(marker.getTag());\n return true;\n }", "@Override\n public boolean onMarkerClick(final Marker marker) {\n\n // Recupera la información del marcador\n Integer marcadorId = (Integer) marker.getTag();\n\n //le pasa el nombre del punto punto00...punto99\n if (marcadorId<10){\n intent.putExtra(\"puntoId\", \"punto0\"+marcadorId);\n startActivity(intent);\n }\n else{\n intent.putExtra(\"puntoId\", \"punto\"+marcadorId);\n startActivity(intent);\n }\n\n // Return false to indicate that we have not consumed the event and that we wish\n // for the default behavior to occur (which is for the camera to move such that the\n // marker is centered and for the marker's info window to open, if it has one).\n return false;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }", "private void restoreCurrentLocation(){\n if(globalCurrentLocation==null){\n return;\n }\n if(currentLocation==null){\n Bitmap icon = ((BitmapDrawable)userImage.getDrawable()).getBitmap();\n Bitmap smallIcon = Bitmap.createScaledBitmap(icon,100,100,false);//Sony xperia mini 40x40\n MarkerOptions markerOptions = new MarkerOptions().position(globalCurrentLocation).title(\"Me\").icon(BitmapDescriptorFactory.fromBitmap(smallIcon));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(globalCurrentLocation,15));\n\n currentLocation = mMap.addMarker(markerOptions);\n markerOnClick.put(currentLocation,new MyMarker(user.getId(),true));\n }\n }", "public boolean onMarkerClick(final Marker marker ) {\n marker.showInfoWindow();\n LatLng point = marker.getPosition();\n\n markerPoints.add(point);\n MarkerOptions options = new MarkerOptions();\n options.position(point);\n // marker.setVisible(false);\n // Toast.makeText(getBaseContext(), \"inside marker click \" , Toast.LENGTH_SHORT).show();\n LatLng myLatLng = new LatLng(marker.getPosition().latitude,marker.getPosition().longitude);\n Button delete_Accomodation = (Button) findViewById(R.id.deleteAccomodation);\n delAccOnClickListener delAcc = new delAccOnClickListener( myLatLng, marker)\n {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n\n AlertDialog alertDialog = new AlertDialog.Builder(MapsActivity.this).create();\n alertDialog.setTitle(\"Delete Marker\");\n alertDialog.setMessage(\"Want To Delete Marker?\");\n alertDialog.setButton(\"Delete\",new DialogInterface.OnClickListener()\n {\n @SuppressLint({ \"ShowToast\", \"NewApi\" })\n public void onClick(final DialogInterface dialog,final int which)\n {\n\n getKey(googleMap, delAcc.latitude,delAcc.longitude);\n // Below two lines to delete marker\n googleMap.clear();\n getLocation(googleMap);\n // Toast.makeText(getApplicationContext(),\"Transaction ID Created\",1000).show();\n\n }\n });\n alertDialog.setButton2(\"Cancel\",new DialogInterface.OnClickListener()\n {\n @SuppressLint(\"ShowToast\")\n public void onClick(final DialogInterface dialog,final int which)\n {\n\n Toast.makeText(getApplicationContext(),\"Cancelled\",1000).show();\n }\n });\n\n alertDialog.show();\n\n\n }\n };\n\n //return true;\n // Setting button click event listener for the find button\n delete_Accomodation.setOnClickListener(delAcc);\n\n if (markerPoints.size() >= 2) {\n // Get Directions\n Button get_Directions = (Button) findViewById(R.id.getDirection);\n directionsAccOnClickListener getDir = new directionsAccOnClickListener(point) {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n\n //getDirections(point, googleMap);\n getDirections(googleMap);\n }\n };\n\n\n // Setting button click event listener for the find button\n get_Directions.setOnClickListener(getDir);\n }\n //\n\n return doNotMoveCameraToCenterMarker;\n }", "private void addCurrentMarker(double lat, double lon) {\n mLatLng = new LatLng(lat, lon);\n marker_inter = map.addMarker(new MarkerViewOptions()\n .position(mLatLng)\n .title(\"Intervention\")\n .snippet(\"Desc inter\")\n .icon(iconUsr));\n run = 1;\n }", "public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }", "@Override\n public boolean onMarkerClick(Marker marker) {\n if(!marker.getTitle().equalsIgnoreCase(\"Destination\")) {\n if(mPreviousMarker !=null) // destination is marked\n show_card(marker.getTitle(),true,mlocation,mPreviousMarker);\n else\n show_card(marker.getTitle(),false,mlocation,mPreviousMarker);\n }else\n mPreviousMarker.getSnippet();\n\n return false;\n }", "public void markerClicked(Object markerId,\r\n\t\t\t\t\t\t\t\tString markerLabel,\r\n\t\t\t\t\t\t\t\tint clickXCoordinate,\r\n\t\t\t\t\t\t\t\tint clickYCoordinate);", "private void showMarker() {\n\n if (myMarker == null) {\n MarkerOptions options = new MarkerOptions();//1 option co 2 thu k thieu vi tri ,hinh anh\n options.position(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));//vi tri kinh do vi do,no tra ve vi tri cuoi cung gps nhan dc ,neu\n options.title(\"dung123\");\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n //newu chua co thif sedc sinh ra bang cach add\n googleMap.addMarker(options);\n// myMarker.setTag(\"Hello\");//co the truyen doi tuig vao duoi window marker getTag\n } else {\n myMarker.setPosition(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));\n }\n }", "@Override\n public void onMapClick(LatLng latLng) {\n AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this);\n //Set the title of the dialog.\n builder.setTitle(\"Create a new Marker\");\n\n final LatLng markerPoint = latLng;\n\n // Set up the input\n final EditText input = new EditText(MapsActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Create a new marker with the Latitude and Longitude of the click event.\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Cancel\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }", "@Override\n public void onMarkerDragEnd(Marker marker){\n int indexOf = locationNames.indexOf(marker.getTitle());\n latLngs.set(indexOf, marker.getPosition());\n saveMarkerPrefs();\n }", "public void showMarkerInfo(OperaFirebase mapMarker){\n Intent i = new Intent(this, MarkerInfoActivity.class);\n i.putExtra(\"MapMarker\", mapMarker);\n startActivity(i);\n }", "public void selectMarker(Marker marker) {\n if (!this.selectedMarkers.contains(marker)) {\n if (!this.infoWindowManager.isAllowConcurrentMultipleOpenInfoWindows()) {\n deselectMarkers();\n }\n if (this.infoWindowManager.isInfoWindowValidForMarker(marker) || this.infoWindowManager.getInfoWindowAdapter() != null) {\n this.infoWindowManager.add(marker.showInfoWindow(this.mapboxMap, this.mapView));\n }\n this.selectedMarkers.add(marker);\n }\n }", "public interface onMarkerClickListener{\n void onMarkerClick(int id);\n }", "@Override\n public void onMapLongClick(LatLng point){\n location = new cLocation(point, this);\n\n //Open a dialog for the user to allow the user to set the name for the saved location\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }", "public boolean createMarker(ArrayList<LocationsData>datas) {\n\n boolean isNotEmpty= true;\n if (isNotEmpty) {\n placesMarker= placesMap.addMarker(new MarkerOptions()\n .position(new LatLng(datas.get(0).locationLatitude,datas.get(0).locationLongitude))\n .title(datas.get(0).locationName));\n placesMarker.showInfoWindow();\n placesMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(\"Places Marker\",marker.getTitle()+\"\\n\"+places.toString());\n\n LocationsData data= new LocationsData();\n data.set_id(places.get(0).get_id());\n data.setImage_path(places.get(0).getImage_path());\n data.setLocationName(places.get(0).getLocationName());\n data.setLocationLatitude(places.get(0).getLocationLatitude());\n data.setLocationLongitude(places.get(0).getLocationLongitude());\n data.setLocationProducts(places.get(0).getLocationProducts());\n\n Intent i= new Intent(MainActivity.this,PlaceDetailsActivity.class);\n i.putExtra(\"places\",data);\n startActivity(i);\n\n Log.i(\"Intent\",i.toString());\n Log.i(\"onMarkerClick\",\"Successfull, Title: \"+marker.getTitle());\n Log.i(\"Getting Item Id\",String.valueOf(places.get(0).get_id()));\n return false;\n }\n });\n }else {\n isNotEmpty=false;\n }\n return isNotEmpty;\n }", "@Override\n\t\t\tpublic boolean onMarkerClick(Marker arg0) {\n\t\t\t\tBundle b = arg0.getExtraInfo();\n\t\t\t\tint i = b.getInt(\"id\");\n\t\t\t\tint count = b.getInt(\"count\");\n\t\t\t\tMarks m = currentClustersForScenic.get(i);\n\n\t\t\t\tif (count > 1) {\n\t\t\t\t\tif (isTest) {\n\t\t\t\t\t\tString ids = \"\";\n\t\t\t\t\t\tint j = 0;\n\t\t\t\t\t\tfor (Marks item : m.getmMarkers()) {\n\t\t\t\t\t\t\tif (j == 0) {\n\t\t\t\t\t\t\t\tids = item.getItemBean().getId();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tids = ids + \",\" + item.getItemBean().getId();\n\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (j > 50)\n//\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tBundle p = new Bundle();\n\t\t\t\t\t\tp.putString(\"ids\", ids);\n\t\t\t\t\t\tUIHelper.jump(_activity,\n\t\t\t\t\t\t\t\tTestOrganizationListActivity.class, p);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString ids = \"\";\n\t\t\t\t\t\tint j = 0;\n\t\t\t\t\t\tfor (Marks item : m.getmMarkers()) {\n\t\t\t\t\t\t\tif (j == 0) {\n\t\t\t\t\t\t\t\tids = item.getItemBean().getId();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tids = ids + \",\" + item.getItemBean().getId();\n\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (j > 50)\n//\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tBundle p = new Bundle();\n\t\t\t\t\t\tp.putInt(\"type\", type);\n\t\t\t\t\t\tp.putString(\"ids\", ids);\n\t\t\t\t\t\tUIHelper.jump(_activity,\n\t\t\t\t\t\t\t\tElevatorPlaygroundListForMapActivity.class, p);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tif (isTest) {\n\t\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\t\tbundle.putString(\"name\", m.getItemBean().getName());\n\t\t\t\t\t\tbundle.putString(\"check_org_id\", m.getItemBean()\n\t\t\t\t\t\t\t\t.getId());\n\t\t\t\t\t\tUIHelper.jump(_activity,\n\t\t\t\t\t\t\t\tTestOrganizationDetailActivity.class, bundle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlon = m.getItemBean().getLon();\n\t\t\t\t\t\tlat = m.getItemBean().getLat();\n\t\t\t\t\t\taddress = m.getItemBean().getName();\n\t\t\t\t\t\t// navigation.setVisibility(View.VISIBLE);\n\t\t\t\t\t\tAppUtil.getQualityCloudApiClient(ac).getFacilityDetail(\n\t\t\t\t\t\t\t\tm.getItemBean().getId(),\n\t\t\t\t\t\t\t\tNearbyElevatorOrPlaygroundMap.this);\n\t\t\t\t\t}\n\t\t\t\t\t// changeState(i);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n public void handleOnGoogleMapClick(GoogleMap mMap, LatLng latLng) {\n mMap.clear();\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n }", "private void highLightMarker(Marker marker) {\n\n\t\t/*\n\t\tfor (Marker foundMarker : this.markers) {\n\t\t\tif (!foundMarker.equals(marker)) {\n\t\t\t\tfoundMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\t\t\t} else {\n\t\t\t\tfoundMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n\t\t\t\tfoundMarker.showInfoWindow();\n\t\t\t}\n\t\t}\n\t\t*/\n marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n marker.showInfoWindow();\n\n //Utils.bounceMarker(googleMap, marker);\n\n this.selectedMarker=marker;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(LOG_MAP, \"setOnMarkerClickListener\");\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n Log.i(LOG_MAP, \"setOnMarkerClickListener\");\n\n return false;\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true));\n }", "@Override\n public boolean onMarkerClick(final Marker marker) {\n // Return false to indicate that we have not consumed the event and that we wish\n // for the default behavior to occur (which is for the camera to move such that the\n // marker is centered and for the marker's info window to open, if it has one).\n Toast.makeText(mContext, \"onMarkerClick called\", Toast.LENGTH_SHORT).show();\n\n return false;\n }", "@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n\n String address = getMarkerAddress(latLng);\n //if there is a valid address associated with marker\n if (address != null) {\n markerOptions.title(address);\n }\n mMap.clear();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n mMap.addMarker(markerOptions);\n markerPlaced = true;\n lat = latLng.latitude;\n lon = latLng.longitude;\n }", "private void drawMarker(LatLng point){\n\t\tgoogleMap.clear();\t\t\r\n\t\t\r\n // Creating an instance of MarkerOptions\r\n MarkerOptions markerOptions = new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point); \r\n \r\n // Setting title for the InfoWindow\r\n markerOptions.title(\"Position\");\r\n \r\n // Setting InfoWindow contents\r\n markerOptions.snippet(\"Latitude:\"+point.latitude+\",Longitude\"+point.longitude);\r\n // markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.));\r\n\r\n // Adding marker on the Google Map\r\n googleMap.addMarker(markerOptions);\r\n \r\n // Moving CameraPosition to the user input coordinates\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(point));\r\n\r\n // Setting the zoom level\r\n //googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); \r\n \r\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n int id = hashMarker.get(marker.getPosition());\n Log.d(TAG, \"Posicion\" + marker.getPosition() + \" - \" + id);\n Iterator i = listMarkers.iterator();\n int numImages = 1;\n\n while(i.hasNext()){\n MarkerPropio m = (MarkerPropio) i.next();\n if (m.getId()==id){\n numImages=m.getNumImages();\n }\n }\n\n if (numImages==1){\n\n JsonArrayRequest jsArrayRequest = new JsonArrayRequest(GalleryImageActivity.URL_FROM_MARKER + id +\n GalleryImageActivity.URL_FORMAT, new Response.Listener<JSONArray>() {\n\n @Override\n public void onResponse(JSONArray response) {\n\n // Obtener el marker del objeto\n for(int i=0; i<response.length(); i++){\n try {\n JSONObject objeto= response.getJSONObject(i);\n int idImagen = objeto.getInt(\"id\");\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(DetailActivity.EXTRA_PARAM_ID, idImagen);\n startActivity(intent);\n } catch (JSONException e) {\n Log.e(TAG, \"Error de parsing: \"+ e.getMessage() + \"/// \"+ e.getCause());\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error Respuesta en JSON: \" + error.getMessage() + \" || \" + error.getLocalizedMessage());\n }\n });\n requestQueue.add(jsArrayRequest);\n\n } else{\n Intent intent = new Intent(this, GalleryImageActivity.class);\n intent.putExtra(GalleryImageActivity.EXTRA_PARAM_ID, id);\n intent.putExtra(GalleryImageActivity.EXTRA_PARAM, 1);\n intent.putExtra(GalleryImageActivity.EXTRA_PARAM_NAME_MARKER, marker.getTitle());\n startActivity(intent);\n }\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position we are also making the draggable true\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n// Toast.makeText(this, \"longitude=\" + latLng.longitude + \"latitude=\" + latLng.latitude, Toast.LENGTH_LONG).show();\n String msg = latLng.longitude + \", \" + latLng.latitude;\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latLng.latitude, latLng.longitude);\n\n }", "private void setAllMarkerOnClickListeners(){\n mMap.setOnMarkerClickListener((Marker marker)->{\n Singleton.get(mainActivity).setCurrentCafeId((String) marker.getTag());\n showInfoBox();\n return false;\n });\n }", "@Override\n public void onMapClick(LatLng latLng) {\n map.addMarker(new MarkerOptions().position(latLng));\n }", "@Override\n public void onMapClick(LatLng latLng) {\n rvTencentMapViewMessage.setVisibility(View.GONE);\n rlyTencentMapViewCollect.setVisibility(View.GONE);\n handler.removeCallbacks(runnable);\n InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n View v = getWindow().peekDecorView();\n if (null != v) {\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n\n rlyTencentMapViewBaiTang.setVisibility(View.GONE);\n if(markers != null){\n markers.remove();\n latLng1 = orginalLng;\n }\n if(scaleMarker != null){\n Animation scaleAnimation2 = new ScaleAnimation((float)1.36,(float) 1,(float)1.36,(float)1);\n scaleAnimation2.setDuration(100);\n scaleMarker.setAnimation(scaleAnimation2);\n scaleMarker.startAnimation();\n scaleMarker = null;\n// scaleMarker.refreshInfoWindow();\n// scaleMarker.setFastLoad(true);\n }\n\n// marker.setIcon(BitmapDescriptorFactory.fromBitmap(getBitMap(R.mipmap.booth,40,40)));\n }", "Marker getMarker();", "@Override\n public boolean onMarkerClick(Marker marker) {\n layoutManager.smoothScrollToPosition(recyclerView, null, stationList.indexOf(main.stationMap.get(marker.getTag())));\n centreOnStation(main.stationMap.get(marker.getTag()), true);\n return true;\n }", "@Override\n public void onClick(View view) {\n if (markerPlaced) {\n //Firestore handler method that adds geopoint as a field in database\n setPickupLocation(bookId, lat, lon);\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Pickup location has been updated\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n Toast toast = Toast.makeText(SetLocationActivity.this,\n \"Place a marker first\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }", "@Override\r\n public View getInfoWindow(Marker marker) {\n return null;\r\n }", "public interface MapMarkerClickHandler {\r\n\r\n\t\t\r\n\t////////////////////////////////////////////////////////////\r\n\t// PUBLIC INTERFACE METHODS\r\n\t////////////////////////////////////////////////////////////\r\n\tpublic void markerClicked(Object markerId,\r\n\t\t\t\t\t\t\t\tString markerLabel,\r\n\t\t\t\t\t\t\t\tint clickXCoordinate,\r\n\t\t\t\t\t\t\t\tint clickYCoordinate);\r\n\r\n\r\n\t\r\n}", "@Override\n public boolean onMarkerClick(Marker marker) {\n return false;\n }", "@Override\n\tpublic void onInfoWindowClick(Marker marker) {\n\t\tString url = \"http://maps.google.com/maps?daddr=\"+marker.getPosition().latitude+\",\"+marker.getPosition().longitude+\"&dirflg=w\";\n\t\tIntent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(url));\n\t\tintent.setClassName(\"com.google.android.apps.maps\", \"com.google.android.maps.MapsActivity\");\n\t\tstartActivity(intent);\n\t}", "@Override\n public void onClick(View v) {\n mMap.clear();\n //Es crea un marcador amb la seva informacio\n MarkerOptions opcions = new MarkerOptions();\n opcions.title(\"El teu cotxe esta aqui\");\n opcions.position(posicioActual);\n opcions.snippet(\"El teu cotxe esta aparcat aqui\");\n opcions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n //Un cop creat el marquem al mapa\n Marker marca = mMap.addMarker(opcions);\n\n //Serveix per mostrar la seva informacio sense haver de tocar-la\n marca.showInfoWindow();\n\n //https://stackoverflow.com/questions/13692398/remove-a-marker-from-a-googlemap\n //esborrar el marcador antic\n }", "private void drawMarker1(LatLng point){\n MarkerOptions markerOptions=new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point);\r\n\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\r\n // Adding marker on the Google Map\r\n mMap.addMarker(markerOptions);\r\n\r\n // marker.showInfoWindow();\r\n }", "@Override\r\n public boolean onMarkerClick(Marker marker) {\r\n if(!marker.getTitle().equals(\"Are you here!\")) {\r\n alertDialogBuldingData.showBuldingData(marker.getTitle(), marker.getSnippet(), _university_name, _buildings_type, \"\", \"\");\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public void onMapClick(LatLng point) {\n double lati = point.latitude;\n\n\n // Getting longitude of the current location\n double longi = point.longitude;\n\n\n i = new Intent(MapsActivity.this, addtasks.class);\n\n\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", lati);\n b.putDouble(\"longitude\", longi);\n i.putExtras(b);\n\n startActivity(i);\n\n }", "@Override\n public void onMapClick(final LatLng point) {\n name = (EditText) findViewById(R.id.name);\n name.setVisibility(View.VISIBLE);\n\n phoneNumber = (EditText) findViewById(R.id.phoneNumber);\n phoneNumber.setVisibility(View.VISIBLE);\n\n type = (RadioGroup)findViewById(R.id.needprovide);\n type.setVisibility(View.VISIBLE);\n\n if(markerPoints.size()>1){\n markerPoints.clear();\n\n mMap.clear();\n }\n markerPoints.add(point);\n MarkerOptions options = new MarkerOptions();\n options.position(point);\n\n if(markerPoints.size()==1){\n\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n\n }else if(markerPoints.size()==2){\n\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\n\n }\n mMap.addMarker(options);\n // mMap.addMarker(new MarkerOptions().position(point).title(\"Added\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(point));\n\n // Clear Map\n Button clear_Map = (Button) findViewById(R.id.clear);\n View.OnClickListener findClickListener1 = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n googleMap.clear();\n markerPoints.clear();\n name = (EditText) findViewById(R.id.name);\n name.setVisibility(View.INVISIBLE);\n\n phoneNumber = (EditText) findViewById(R.id.phoneNumber);\n phoneNumber.setVisibility(View.INVISIBLE);\n\n type = (RadioGroup)findViewById(R.id.needprovide);\n type.setVisibility(View.INVISIBLE);\n }\n };\n\n // Setting button click event listener for the find button\n clear_Map.setOnClickListener(findClickListener1);\n\n // End of Clear Map\n\n\n\n // Save Accomodation\n Button save_Accomodation = (Button) findViewById(R.id.saveAccomodation);\n saveAccOnClickListener saveAcc = new saveAccOnClickListener( point)\n {\n\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n saveLocation(saveAcc,googleMap);\n }\n };\n\n\n // Setting button click event listener for the find button\n save_Accomodation.setOnClickListener(saveAcc);\n\n // End of Save Accomodation\n\n // Get Directions\n Button get_Directions = (Button) findViewById(R.id.getDirection);\n directionsAccOnClickListener getDir = new directionsAccOnClickListener( point)\n {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n\n //getDirections(point, googleMap);\n getDirections( googleMap);\n }\n };\n\n\n // Setting button click event listener for the find button\n get_Directions.setOnClickListener(getDir);\n\n // End of Save Accomodation\n // Get Accomodation\n Button get_Accomodation = (Button) findViewById(R.id.getAccomodation);\n View.OnClickListener getAccomodation = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Start NewActivity.class\n getLocation(googleMap);\n\n }\n };\n\n // Setting button click event listener for the find button\n get_Accomodation.setOnClickListener(getAccomodation);\n System.out.println(point.latitude+\"---\"+ point.longitude);\n }", "@Override\n public View getInfoContents(Marker arg0) {\n\n // Getting view from the layout file info_window_layout\n View v = getLayoutInflater().inflate(R.layout.window_layout, null);\n\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.beacon_title1);\n\n // Getting reference to the TextView to set longitude\n ImageView img = (ImageView) v.findViewById(R.id.goat);\n\n // Setting the latitude\n tvLat.setText(arg0.getTitle());\n // Returning the view containing InfoWindow contents\n return v;\n\n }", "private void addGreenMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\r\n markerOptions.position(latLng);\r\n //markerOptions.title(dt.format(newDate));\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n mMap.addMarker(markerOptions);\r\n }", "public String getMarker() {\n return marker;\n }", "public String getMarker() {\n return marker;\n }", "private void saveMarkerPrefs(){\n String latLngsList = new Gson().toJson(latLngs);\n String namesList = new Gson().toJson(locationNames);\n dataStorage.setLatLngList(latLngsList);\n dataStorage.setLocNameList(namesList);\n }", "@Override\n public View getInfoWindow(Marker marker) {\n\n return null;\n }", "@Override\n public void onMapLongClick(@NonNull LatLng point) {\n latitude = String.valueOf(point.getLatitude());\n longitude = String.valueOf(point.getLongitude());\n mapboxMap.addMarker(new MarkerOptions()\n .position(point)\n .title(\"New Maintenance Form\")\n .snippet(\"Click to add site\")\n );\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n MarkerOptions m= new MarkerOptions().position(new LatLng(28.7041,77.1025)).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).title(\"tap to get the alerts\");\n n= mMap.addMarker(m);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n\n if (!lati.equals(\"false\") && !longi.equals(\"false\")) {\n Double la = Double.parseDouble(lati);\n Double lo = Double.parseDouble(longi);\n // Add a marker in Sydney and move the camera\n n.setPosition(new LatLng(la,lo));\n n.setTitle(level);\n if(level.equals(\"hard\")){\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA));}\n else\n {\n n.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));}\n LatLng posi = new LatLng(la, lo);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(posi));\n }\n\n\n }\n });\n\n\n\n }", "public MapObject addMarker(EncodedImage icon, Coord location, String text, String longText, ActionListener onClick) {\n if(internalNative != null) {\n byte[] iconData = null;\n if(icon != null) {\n iconData = icon.getImageData();\n }\n long key = internalNative.addMarker(iconData, location.getLatitude(), location.getLongitude(), text, longText, onClick != null);\n MapObject o = new MapObject();\n o.mapKey = key;\n o.callback = onClick;\n markers.add(o);\n return o;\n } else {\n if(internalLightweightCmp != null) {\n PointLayer pl = new PointLayer(location, text, icon);\n if(points == null) {\n points = new PointsLayer();\n internalLightweightCmp.addLayer(points);\n points.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n PointLayer point = (PointLayer)evt.getSource();\n for(MapObject o : markers) {\n if(o.point == point) {\n if(o.callback != null) {\n o.callback.actionPerformed(new ActionEvent(o));\n }\n return;\n }\n }\n }\n });\n points.addPoint(pl);\n MapObject o = new MapObject();\n o.point = pl;\n o.callback = onClick;\n markers.add(o);\n return o;\n } \n } else {\n // TODO: Browser component\n }\n }\n return null;\n }" ]
[ "0.77157974", "0.75176954", "0.7497578", "0.7387378", "0.7320753", "0.73033327", "0.7122982", "0.71082985", "0.70782715", "0.70475185", "0.70370954", "0.70089144", "0.6923648", "0.6922867", "0.6832939", "0.6795608", "0.6795608", "0.67655593", "0.6761698", "0.6761037", "0.6714245", "0.6700766", "0.6699755", "0.66935325", "0.66641796", "0.66501004", "0.661823", "0.6614989", "0.66067916", "0.6606202", "0.65949804", "0.65692705", "0.6559994", "0.6531243", "0.65299255", "0.6506809", "0.6491053", "0.64828396", "0.6480704", "0.64589196", "0.64440644", "0.6428655", "0.6427293", "0.64177525", "0.6414913", "0.6407055", "0.63943154", "0.6376992", "0.6360432", "0.63559294", "0.6354316", "0.63280785", "0.6311671", "0.62813866", "0.6279897", "0.62724245", "0.62710583", "0.6264198", "0.6244423", "0.6234792", "0.62310034", "0.6219275", "0.6206294", "0.6198324", "0.6191078", "0.6189689", "0.6183828", "0.6183345", "0.61774284", "0.61774284", "0.61737376", "0.6168151", "0.61680216", "0.6165898", "0.6141799", "0.6132501", "0.6129609", "0.6111486", "0.6085059", "0.6070307", "0.6068921", "0.6040666", "0.6038397", "0.60300815", "0.60205394", "0.6019931", "0.6014478", "0.60135376", "0.6007717", "0.60038656", "0.6001448", "0.59889495", "0.598134", "0.59767145", "0.59767145", "0.5966742", "0.5963132", "0.5960366", "0.59532744", "0.5939196" ]
0.6302288
53
here should be the source where we getting the data (Internet, Database, ...)
private List<Person> fetchingUtility() { List<Person> fetchedList = new ArrayList<>(); fetchedList.add(new Person(-26.220616, 28.079329, "PJ0", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.187616, 28.079329, "PJ1", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.207616, 28.079329, "PJ2", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.217616, 28.079329, "PJ3", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.346316, 28.079329, "PJ4", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.215896, 28.079329, "PJ5", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.215436, 28.079129, "PJ6", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.431461, 28.079329, "PJ7", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.168879, 28.079329, "PJ8", "https://twitter.com/pjapplez", false)); fetchedList.add(new Person(-26.227616, 28.079329, "PJ9", "https://twitter.com/pjapplez", false)); return fetchedList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockDetailFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n TextView noConnectionView = (TextView) findViewById(R.id.empty_view);\n noConnectionView.setText(getString(R.string.error_no_internet_connection));\n noConnectionView.setVisibility(View.VISIBLE);\n }\n }", "public void getData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.restartLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockPickingFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = getView().findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.error_no_internet_connection);\n }\n }", "private void initData() {\n requestServerToGetInformation();\n }", "protected abstract void retrievedata();", "void getDataFromServer();", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }", "public void loadData(){\n JsonArrayRequest request = new JsonArrayRequest(\"http://www.efstratiou.info/projects/newsfeed/getList.php\", netListener, errorListener);\n\n //submit request\n ArticlesApp.getInstance().getRequestQueue().add(request);\n\n }", "private static void getTheData()\n {\n try\n {\n ITEMS = getSalesOrderSets();\n }\n catch (OnlineODataStoreException e)\n {\n Log.e(TAG, \"caught OnlineODataStoreException\");\n }\n }", "public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "public void initData() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n\n // number the loaderManager with mPage as may be requesting up to three lots of JSON for each tab\n loaderManager.initLoader(FETCH_STOCK_PICKING_LOADER_ID, null, loadStockPickingFromServerListener);\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator = getView().findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Update empty state with no connection error message\n mEmptyStateTextView.setText(R.string.error_no_internet_connection);\n }\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "private void fetchData() {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setDataObject(hierarchyTitle);\r\n requesterBean.setFunctionType(GET_HIERARCHY_DATA);\r\n AppletServletCommunicator conn = new AppletServletCommunicator(connect,requesterBean);\r\n conn.send();\r\n ResponderBean responderBean = conn.getResponse();\r\n if(responderBean != null) {\r\n if(responderBean.isSuccessfulResponse()) {\r\n queryKey = hierarchyTitle;\r\n Hashtable htData = (Hashtable)responderBean.getDataObject();\r\n extractToQueryEngine(htData);\r\n }\r\n }else {\r\n //Server Error\r\n// throw new CoeusUIException(responderBean.getMessage(),CoeusUIException.ERROR_MESSAGE);\r\n }\r\n }", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "@Override\n\tpublic List<Map<String, String>> getData() throws Exception{\n\t\tqueryForList(\"\", null);\n\t\treturn null;\n\t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Override\r\n protected void fetchData() {\n\r\n }", "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "protected void loadData()\n {\n }", "public interface loadDataService {\n public List<Row> getComboContent( String sType,String comboType, Map<String,String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public Result getGridContent(PagingObject po, String gridType,Map<String,String[]> parameterMap,String searchText , usersInfo loggedUser,String statusID,String from,String where ) throws Exception;\n public List<listInfo> loadStrukturList(String partID,long langID) throws Exception;\n public finalInfo getOrgInfo(long treeID) throws Exception;\n public categoryFinalInfo getCategoryInfo(long treeID) throws Exception;\n public carriersInfo getCariesInfo(long carryID) throws Exception;\n public carriersInfo getOrganizationInfo(long carryID) throws Exception;\n public List<contact> getOrgContacts(long treeID) throws Exception;\n public person getEmployeeInfo( long empId) throws Exception;\n public List<examples> getExamplesInfo(long exmpID,String langID) throws Exception;\n public List<contact> getPersonContact(long perID) throws Exception;\n public List<docList> loadQRphoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> loadPhoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> getExamplesPictures(Connection cc, long relID, long relType) throws Exception;\n public List<examples> getExamplesOperation(Connection cc, long relID, long langID) throws Exception;\n public int checkUser(String uName) throws Exception;\n public int checkDictRecord(String text, int dictType,String org,String pos) throws Exception ;\n public usersInfo loadUserInfo(String pID) throws Exception;\n public List<person> loadEmpList( int OrgID) throws Exception;\n public List<Row> getSelectContent( String type, Map<String, String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public List<subjElement> getADVSearchMenuList(String partID) throws Exception;\n public String getADVInfo(String paramID,String paramVal,String val,String cond,String typ)throws Exception;\n public List<listInfo> loadComboForAdvancedSearch(String prmID,long parametr) throws Exception;\n public List<docList> loadRightPanelPhoto(long realID, int iType) throws Exception;\n public List<categoryFinalInfo> getCategoryStructure(long catID, int id) throws Exception;\n}", "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }", "public void fetchData()\n {\n FetchingDataTask fetchingDataTask = new FetchingDataTask();\n fetchingDataTask.execute();\n }", "private void getData(){\r\n \tsetProgressBarIndeterminateVisibility(true);\r\n \t\r\n\t String url = \"HospitalInfo?hospital=\" + URLEncoder.encode(hospital) + \"&ssid=\" + UserInfo.getSSID();\r\n\t download = new HttpGetJSONConnection(url, mHandler, TASK_GETDATA);\r\n\t download.start();\r\n }", "private void getFlowData() {\n\t\tdbService.getCacheLastUpdated(Tables.STATIONS, new ListCallback<GenericRow>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\tString currentMap = localStorage.getItem(\"KEY_CURRENT_MAP\");\n\t\t\t\tboolean shouldUpdate = true;\n\n\t\t\t\tif (!result.isEmpty()) {\n\t\t\t\t\tdouble now = System.currentTimeMillis();\n\t\t\t\t\tdouble lastUpdated = result.get(0).getDouble(CachesColumns.CACHE_LAST_UPDATED);\n\t\t\t\t\tshouldUpdate = (Math.abs(now - lastUpdated) > (3 * 60000)); // Refresh every 3 minutes.\n\t\t\t\t}\n\n\t\t\t view.showProgressIndicator();\n\t\t\t \n\t\t\t if (!currentMap.equalsIgnoreCase(\"seattle\")) {\n\t\t\t \tshouldUpdate = true;\n\t\t\t\t\tlocalStorage.setItem(\"KEY_CURRENT_MAP\", \"seattle\");\n\t\t\t }\n\t\t\t \n\t\t\t if (shouldUpdate) {\n\t\t\t \ttry {\n\t\t\t \t String url = Consts.HOST_URL + \"/api/flowdata/MinuteDataNW\";\n\t\t\t \t JsonpRequestBuilder jsonp = new JsonpRequestBuilder();\n\t\t\t \t jsonp.setTimeout(30000); // 30 seconds\n\t\t\t \t jsonp.requestObject(url, new AsyncCallback<FlowDataFeed>() {\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t \t\t\t\tview.hideProgressIndicator();\n\t\t\t \t\t\t\tGWT.log(\"Failure calling traffic flow api.\");\n\t\t\t \t\t\t}\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onSuccess(FlowDataFeed result) {\n\t\t\t \t\t\t\tstationItems.clear();\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\tif (result.getFlowData() != null) {\n\t\t\t \t\t\t\t\tint numStations = result.getFlowData().getStations().length();\n\t\t\t \t\t\t\t\tString timestamp = result.getFlowData().getTimestamp();\n\t\t\t \t\t\t\t\ttimestamp = timestamp.replaceAll(\"PST|PDT\", \"\");\n\t\t\t \t\t\t\t\tDate date = parseDateFormat.parse(timestamp);\n\t\t\t \t\t\t\t\tString lastUpdated = displayDateFormat.format(date);\n\t\t\t \t\t\t\t\tlocalStorage.setItem(\"KEY_LAST_UPDATED\", lastUpdated);\n\t\t\t \t\t\t\t\tStationItem item;\n\t\t\t \t\t\t\t\t\n\t\t\t \t\t\t\t\tfor (int i = 0; i < numStations; i++) {\n\t\t\t \t\t\t\t\t\tString stationId = result.getFlowData().getStations().get(i).getId();\n\t\t\t \t\t\t\t\t\tString status = result.getFlowData().getStations().get(i).getStat();\n\t\t\t \t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\tif (stationItemsMap.containsKey(stationId) && status.equalsIgnoreCase(\"good\")) {\n\t\t\t\t \t\t\t\t\t\titem = new StationItem();\n\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t \t\t\t\t\t\titem.setId(stationId);\n\t\t\t \t\t\t\t\t\t\titem.setVolume(result.getFlowData().getStations().get(i).getVol());\n\t\t\t \t\t\t\t\t\t\titem.setSpeed(result.getFlowData().getStations().get(i).getSpd());\n\t\t\t \t\t\t\t\t\t\titem.setOccupancy(result.getFlowData().getStations().get(i).getOcc());\n\t\t\t \t\t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\t\tstationItems.add(item);\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\t// Purge existing stations covered by incoming data\n\t\t\t \t\t\t\tdbService.deleteStations(new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t// Bulk insert all the new stations and data.\n\t\t\t\t\t\t\t\t\t\tdbService.insertStations(stationItems, new RowIdListCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\tview.hideProgressIndicator();\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<Integer> rowIds) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Update the cache table with the time we did the update\n\t\t\t\t\t\t\t\t\t\t\t\tList<CacheItem> cacheItems = new ArrayList<CacheItem>();\n\t\t\t\t\t\t\t\t\t\t\t\tcacheItems.add(new CacheItem(Tables.STATIONS, System.currentTimeMillis()));\n\t\t\t\t\t\t\t\t\t\t\t\tdbService.updateCachesTable(cacheItems, new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all the stations and data just inserted.\n\t\t\t\t\t\t\t\t\t\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetStations(result);\n\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\t\t\t\t\t\t\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}\n\t\t\t\t\t\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\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}\n\t\t\t \t\t});\n\n\t\t\t \t} catch (Exception e) {\n\t\t\t \t\t// TODO Do something with the exception\n\t\t\t \t}\n\t\t\t } else {\n\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\tgetStations(result);\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\t}\n\t\t});\n\t}", "public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}", "@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}", "Object getCurrentData();", "void fetchStartHousesData();", "@Override\n public JsonObjectRequest fetchData(AppDatabase database) {\n // create the JSON request for courses offered by each school\n return new JsonObjectRequest\n (Request.Method.GET, \"https://data.gov.sg/api/action/datastore_search?resource_id=3bb9e6b0-6865-4a55-87ba-cc380bc4df39&limit=500000\", null, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n try {\n // parse results as json array\n JSONArray allSchoolToCourseAsJSONArray = getResultsAsJSONArray(response);\n\n // get each entry in results and store in database\n parseJSONArrayAndStoreInDatabase(database, allSchoolToCourseAsJSONArray);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n // TODO: Handle error\n System.out.println(\"Rabak la bro: \" + error.toString());\n }\n });\n }", "@Override\n\tprotected void initData() throws Exception {\n\t\tif (ManagerUtils.getInstance().getShenFen(activity)\n\t\t\t\t.contains(\"@店家@\")) {\n\t\t\t// 获取店铺列表\n\t\t\tJiaoYiJiLuExec.getInstance().getDianPuList(mHandler,\n\t\t\t\t\tManagerUtils.getInstance().getUser_id(activity),\n\t\t\t\t\tNetworkAsyncCommonDefines.GET_BZ_LIST_S,\n\t\t\t\t\tNetworkAsyncCommonDefines.GET_BZ_LIST_F);\n\t\t} else if (ManagerUtils.getInstance().getShenFen(activity)\n\t\t\t\t.contains(\"@雇员@\")) {\n\t\t\t// 获取店铺列表\n\t\t\tJiaoYiJiLuExec.getInstance().getDianPuList(mHandler,\n\t\t\t\t\tManagerUtils.getInstance().getDjId(),\n\t\t\t\t\tNetworkAsyncCommonDefines.GET_BZ_LIST_S,\n\t\t\t\t\tNetworkAsyncCommonDefines.GET_BZ_LIST_F);\n\t\t}\n\t}", "private void getData() {\n\t\tif (ultimoItem == 2)\n\t\t\taa.clear();\n\t\tString result = \"\";\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_BOOKS);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tresult = sb.toString();\n\t\t\t\t\tJSONArray jArray = new JSONArray(result);\n\t\t\t\t\tif (jArray.length() == 0) {\n\t\t\t\t\t\tvalorUltimo = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < jArray.length(); i++) {\n\t\t\t\t\t\tJSONObject json_data = jArray.getJSONObject(i);\n\t\t\t\t\t\tBooks resultRow = new Books();\n\t\t\t\t\t\tString creado = json_data.getString(\"created_at\");\n\t\t\t\t\t\tresultRow.id = json_data.getString(\"id\");\n\t\t\t\t\t\tresultRow.title = json_data.getString(\"title\");\n\t\t\t\t\t\tresultRow.author = json_data.getString(\"author\");\n\t\t\t\t\t\tresultRow.publisher = json_data.getString(\"publisher\");\n\t\t\t\t\t\tresultRow.additional_info = json_data\n\t\t\t\t\t\t\t\t.getString(\"additional_info\");\n\t\t\t\t\t\tresultRow.contact_info = json_data\n\t\t\t\t\t\t\t\t.getString(\"contact_info\");\n\t\t\t\t\t\tresultRow.offer_type = json_data\n\t\t\t\t\t\t\t\t.getString(\"offer_type\");\n\t\t\t\t\t\tresultRow.reply_count = json_data\n\t\t\t\t\t\t\t\t.getString(\"reply_count\");\n\t\t\t\t\t\tresultRow.price = json_data.getString(\"price\");\n\t\t\t\t\t\tfechaformato = new String[jArray.length()];\n\t\t\t\t\t\tfechaformato[i] = creado;\n\t\t\t\t\t\tString eventTime = new String(creado);\n\t\t\t\t\t\tString currentTime = new String(SuperTiempo);\n\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\"yyyy-MM-dd'T'hh:mm:ss.SSS'Z'\");\n\t\t\t\t\t\tDate eventDate = sdf.parse(eventTime);\n\t\t\t\t\t\tDate currentDate = sdf.parse(currentTime);\n\t\t\t\t\t\tlong eventTimelong = eventDate.getTime();\n\t\t\t\t\t\tlong currentTimelong = currentDate.getTime();\n\t\t\t\t\t\tlong diff = currentTimelong - eventTimelong;\n\t\t\t\t\t\tlong segundoslong = diff / 1000;\n\t\t\t\t\t\tlong minutoslong = diff / 60000; // 60 por 1000\n\t\t\t\t\t\tlong horaslong = diff / 3600000; // 60 por 60 por 1000\n\t\t\t\t\t\tlong diaslong = horaslong / 24;\n\t\t\t\t\t\tlong meseslong = diaslong / 31;\n\t\t\t\t\t\tlong añolong = meseslong / 12;\n\t\t\t\t\t\tif (añolong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + añolong + \" año \";\n\t\t\t\t\t\telse if (añolong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + añolong + \" años \";\n\t\t\t\t\t\telse if (meseslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + meseslong + \" mes \";\n\t\t\t\t\t\telse if (meseslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + meseslong + \" meses \";\n\t\t\t\t\t\telse if (diaslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + diaslong + \" día \";\n\t\t\t\t\t\telse if (diaslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + diaslong + \" días \";\n\t\t\t\t\t\telse if (horaslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + horaslong + \" hora \";\n\t\t\t\t\t\telse if (horaslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + horaslong + \" horas \";\n\t\t\t\t\t\telse if (minutoslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + minutoslong + \" minuto \";\n\t\t\t\t\t\telse if (minutoslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + minutoslong + \" minutos \";\n\t\t\t\t\t\telse if (segundoslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + segundoslong + \" segundo \";\n\t\t\t\t\t\telse if (segundoslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + segundoslong + \" segundos \";\n\t\t\t\t\t\telse if (segundoslong == 0)\n\t\t\t\t\t\t\thoraAgo = \"justo ahora\";\n\t\t\t\t\t\tresultRow.created_at = horaAgo;\n\t\t\t\t\t\tJSONObject usuarios = json_data.getJSONObject(\"owner\");\n\t\t\t\t\t\tresultRow.owner_name = usuarios.getString(\"name\");\n\t\t\t\t\t\tJSONObject grupos = json_data.getJSONObject(\"group\");\n\t\t\t\t\t\tresultRow.group_name = grupos.getString(\"name\");\n\t\t\t\t\t\tresultRow.group_id = grupos.getString(\"id\");\n\t\t\t\t\t\tJSONObject owner = json_data.getJSONObject(\"owner\");\n\t\t\t\t\t\tJSONObject profile_pic = owner\n\t\t\t\t\t\t\t\t.getJSONObject(\"profile_pic\");\n\t\t\t\t\t\tresultRow.thumbnail_url = profile_pic\n\t\t\t\t\t\t\t\t.getString(\"thumbnail_url\");\n\t\t\t\t\t\tarrayBooks.add(resultRow);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\n\t\t\t\t}\n\t\t\t\tmyListView.setAdapter(aa);\n\t\t\t\tif (ultimoItem == 1) {\n\t\t\t\t\tmyListView.setSelection(superTotal);\n\t\t\t\t\tnuevo = nuevo + superTotal;\n\t\t\t\t}\n\t\t\t\tultimoItem = 0;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void fetchFromNetwork(final LiveData<ResultType> dbSource) {\n // Create the API call. Note the use of ApiResponse, the generic class we've\n // created earlier, which consists of an HTTP status code, some data and an error.\n final LiveData<ApiResponse<RequestType>> apiResponse = createCall();\n\n // Re-attach the database LiveData as a new source,\n // it will dispatch its latest value quickly.\n result.addSource(dbSource, newData -> setValue(Resource.loading(newData)));\n\n // Attach the API response as a new source.\n result.addSource(apiResponse, response -> {\n // The source value was changed, so we can stop listening\n // to both the API response LiveData and database LiveData.\n result.removeSource(apiResponse);\n result.removeSource(dbSource);\n // If the network call completes successfully, save the response\n // into the database and re-initialize the stream.\n if (response.isSuccessful()) {\n appExecutors.diskIO().execute(() -> {\n saveCallResult(processResponse(response));\n appExecutors.mainThread().execute(() -> {\n // We specially request new live data, otherwise we will\n // get the immediately last cached value, which may not\n // be updated with latest results received from network.\n result.addSource(loadFromDb(), newData ->\n setValue(Resource.success(newData)));\n });\n });\n }\n // If network request fails, dispatch a failure directly.\n else {\n onFetchFailed();\n result.addSource(dbSource, newData ->\n setValue(Resource.error(response.getError().getMessage(), newData)));\n }\n });\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public void getData() {\n new DownloadWebpageTask(new AsyncResult() {\n @Override\n public void onResult(JSONObject object) {\n processJson(object);\n }\n }).execute(\"https://spreadsheets.google.com/tq?key=1gGyJS2phIcmiTEEUdUhOsyqekEudBue_NtNkjKsTQrQ\");\n }", "private void retrieveAllUserData() {\n retrieveBasicUserInfo();\n retrieveUsersRecentMedia();\n retrieveUsersLikedMedia();\n }", "private void loadData() {\n\n if (mIsLoading) {\n return;\n }\n\n String url = mSiteData.getUrl();\n\n if (!mIsRefreshMode) {\n //if (mMaxPage > 0 && mCurrentPage > mMaxPage) {\n // return;\n //}\n //Log.e(mTag, \"mMaxPage: \" + mMaxPage);\n\n if (mCurrentPage > 1) {\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n url = url + \"?p=\" + mCurrentPage;\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n url = url + \"lite/?p=\" + mCurrentPage;\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n url = url + \"page-\" + mCurrentPage + \".html\";\n break;\n }\n //showToolbarProgressBar();\n }\n }\n\n String userAgent = Config.USER_AGENT_WEB;\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n case Config.BLOG_ID_NGT48_MANAGER:\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n userAgent = Config.USER_AGENT_MOBILE;\n break;\n }\n\n mIsLoading = true;\n\n if (!mIsFirst && !mIsRefreshMode) {\n mLoLoadingMore.setVisibility(View.VISIBLE);\n }\n\n //Log.e(mTag, url);\n requestData(url, userAgent);\n }", "private void initdata() {\n\t\tProgressDialogUtil.showProgressDlg(this, \"加载数据\");\n\t\tProdDetailRequest req = new ProdDetailRequest();\n\t\treq.id = prodInfo.id+\"\";\n\t\tRequestParams params = new RequestParams();\n\t\ttry {\n\t\t\tparams.setBodyEntity(new StringEntity(req.toJson()));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnew HttpUtils().send(HttpMethod.POST, Api.GETGOODSDETAIL, params, new RequestCallBack<String>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tT.showNetworkError(CommodityInfosActivity.this);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> resp) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tProdDetailResponse bean = new Gson().fromJson(resp.result, ProdDetailResponse.class);\n\t\t\t\tLog.e(\"\", \"\"+resp.result);\n\t\t\t\tif(Api.SUCCEED == bean.result_code && bean.data != null) {\n\t\t\t\t\tupview(bean.data);\n\t\t\t\t\tdatas = bean.data;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "DataStore getDataStore ();", "public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }", "void fetchForSaleHousesData();", "@Override\n public void refreshData() {\n\n if (InternetConnection.checkConnection(context)) {\n ApiService apiService = RetroClient.getApiService();\n Call<String> call = apiService.getFactdata();\n Log.e(TAG, \"request ongetData url :\" + call.request().url());\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n Log.e(TAG, \"response : ongetData :\" + response.body());\n parseResponse(response.body());\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Log.e(TAG, \"onFailure ongetData : \" + t.getMessage());\n }\n });\n } else {\n factDataView.displayMessage(context.getString(R.string.nonetwork), false);\n }\n }", "void fetchForRentHousesData();", "void getData() throws SQLException, IOException {\n\t\tint i = 0;\n\t\twhile (cu.rst.next()) {\n\t\t\t\n\t\t\t\n\t\t\tcm[i].setDetails(cu.rst.getInt(1), cu.rst.getString(3),\n\t\t\t\t\tcu.rst.getString(4), cu.rst.getString(5), cu.rst.getString(6),\n\t\t\t\t\tcu.rst.getInt(7));\n\t\t\ti++;\n\n\t\t}\n\t\tSystem.out.println(\"**************************DETAILS TAKEN**************************\");\n\n\t}", "@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}", "private void loadContent()\n {\n // locking the function to prevent the adapter\n // from calling multiples async requests with\n // the same definitions which produces duplicate\n // data.\n locker.lock();\n\n // this function contruct a GraphRequest to the next paging-cursor from previous GraphResponse.\n GraphRequest nextGraphRequest = lastGraphResponse.getRequestForPagedResults(GraphResponse.PagingDirection.NEXT);\n\n // if we reached the end of our pages, the above method 'getRequestForPagedResults'\n // return 'null' object\n if(nextGraphRequest != null)\n {\n // for clarificating and formatting purposes\n // I declared the callback besides the members\n // variables.\n nextGraphRequest.setCallback(callback);\n nextGraphRequest.executeAsync();\n }\n }", "public void getDataFromServer() {\n\n //can't start new request if old one is not finish\n if (isGetingDataFromMSSQL) {\n return;\n }\n\n // clear list before load elements\n listOverView.clear();\n\n // change var for true if start getting data - can't start new request if old one is not finish\n isGetingDataFromMSSQL = true;\n\n // show progress bar\n progressBarInOverViewWait.setVisibility(View.VISIBLE);\n\n if (connectionMSSQL == null) { // if is NO connection\n Log.d(TAG, \"getDataFromServer: connection NOT CONNECTED\");\n Toast.makeText(this, \"Brak połączenia z bazą danych\", Toast.LENGTH_SHORT).show();\n } else { // if connection is CONNECTED\n Log.d(TAG, \"getDataFromServer: connection CONNECTED\");\n\n new Thread(new Runnable() { // NOT in UI thread\n @Override\n public void run() {\n\n // execute query and get result\n try {\n\n // set number of rows taken from MSSQL and show in list view\n int numberOFRowsToShow = 20;\n\n Statement statement = connectionMSSQL.createStatement();\n //ResultSet result = statement.executeQuery(\"SELECT indx WHERE userName='Jan.kowalski'\"); // query for indx,\n //ResultSet result = statement.executeQuery(\"SELECT indx,dateTime,description,picture FROM dbo.androidTest\"); // query to MS SQL for all rows\n ResultSet result = statement.executeQuery(\"SELECT TOP \" + numberOFRowsToShow + \" indx,dateTime,description,miniature FROM dbo.androidTest ORDER BY indx DESC\"); // query to MS SQL for last numberOFRowsToShow rows\n\n // put data to array\n for (int i = 0; i < numberOFRowsToShow; i++) { // number of rows to show - can be more than is in DB - won't be crash - olny thow exception\n result.next(); // start from next line - must be because first line has no data\n String indxFromResult = \"\" + result.getInt(\"indx\"); // take indx from MS SQL\n String dateTimeFromResult = result.getString(\"dateTime\"); // take dateTime from MS SQL\n String descriptionFromResult = result.getString(\"description\"); // take description from MS SQL\n\n // get picture miniature\n byte[] bArrayMiniatureTakenFromMSSQL = result.getBytes(\"miniature\"); // take picture miniature from MS SQL\n // set picture miniature\n Bitmap bitmapFromResultMiniature = null;\n if (bArrayMiniatureTakenFromMSSQL != null) {\n bitmapFromResultMiniature = BitmapFactory.decodeByteArray(bArrayMiniatureTakenFromMSSQL, 0, bArrayMiniatureTakenFromMSSQL.length); // byte[] into bitmap (miniature)\n }\n\n // add element to list view\n listOverView.add(new OverViewItem(bitmapFromResultMiniature, indxFromResult, dateTimeFromResult, descriptionFromResult));\n\n //result\n Log.d(TAG, \"getDataFromServer: RESULT: \" + \"indxFromResult: \" + indxFromResult + \", dateTimeFromResult: \" + dateTimeFromResult + \", descriptionFromResult: \" + descriptionFromResult + \", number of row: \" + i);\n\n Log.d(TAG, \"getDataFromServer: listOverView.size(): \" + listOverView.size());\n }\n\n } catch (SQLException e) { // cath when is set numberOFRowsToShow more than exist - can be - no crash\n Log.d(TAG, \"onCreate: SQLException: \" + e);\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() { //in UI thread\n\n // reverse list if need\n //Collections.reverse(listOverView);\n\n // notyfi adapter\n adapterOverView.notifyDataSetChanged();\n\n // hide progress bar\n progressBarInOverViewWait.setVisibility(View.GONE);\n\n // change var for false if end getting data - can't start new request if old one is not finish\n isGetingDataFromMSSQL = false;\n }\n });\n }\n }).start();\n }\n }", "public void getData(Context context) {\n try{\n // Datos locales\n PackageInfo pckginfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode = pckginfo.versionCode;\n currentVersionName = pckginfo.versionName;\n\n // Datos remotos\n String data = downloadHttp(new URL(INFO_FILE));\n JSONObject json = new JSONObject(data);\n latestVersionCode = json.getInt(\"versionCode\");\n latestVersionName = json.getString(\"versionName\");\n downloadURL = json.getString(\"downloadURL\");\n Log.d ( \"AutoUpdate\" , \"Data obtained successfully\" );\n } catch (JSONException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with JSON\" , e);\n } catch (NameNotFoundException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with Packete: S\" , e);\n } catch (IOException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error downloading\" , e);\n }\n }", "protected void loadInfo() {\n\t\tboolean isSuccess = true;\n\t\ttry {\n\t\t\tsmt = conn.createStatement();\n\t\t\trs = smt.executeQuery(\"select * from Google_Auth\");\n\t\t\totp_username = rs.getString(\"username\");\n\t\t\totp_SECRET_KEY = aria.Decrypt(rs.getString(\"secretcode\"));\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n isSuccess = false;\n }\n }", "private void downloadData(SQLiteDatabase db){\n DeviceDataManager.downloadDeviceData(db);\n CustomerDataManager.downloadCustomerData(db);\n CheckInTypeDataManager.downloadCheckInTypeData(db);\n CheckInPointDataManager.downloadCheckInPointData(db);\n PhotographerDataManager.downloadPhotographerData(db);\n }", "protected ScServletData getData()\n {\n return ScServletData.getLocal();\n }", "public Map<String, Object> getCurrentData() throws Exception;", "@Override\r\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tgetDataFromDatabase();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "String afficherDataSource();", "private DataConnection() {\n \tperformConnection();\n }", "Collection getData();", "protected abstract void loadData();", "private void loadData() {\r\n if (WEBSITE_FORM_BOOKMARK == formType) {\r\n //bookmark\r\n log(\"bookmark load data\");\r\n Cursor cursor = getContentResolver().query(Browser.BOOKMARKS_URI,\r\n null, Browser.BookmarkColumns.BOOKMARK + \" = 1\", null, Browser.BookmarkColumns.VISITS + \" DESC\");\r\n if (null != cursor) {\r\n list.clear();\r\n log(\"cursor.count=\" + cursor.getCount());\r\n cursor.moveToFirst();\r\n while (!cursor.isAfterLast()) {\r\n WebSiteBean bean = new WebSiteBean();\r\n String name = cursor.getString(cursor.getColumnIndex(Browser.BookmarkColumns.TITLE));\r\n String website = cursor.getString(cursor.getColumnIndex(Browser.BookmarkColumns.URL));\r\n\r\n //begin:modifid by chensuyu for display url when name and website is not null [SW00126117] 20150327\r\n if (!TextUtils.isEmpty(name) && !TextUtils.isEmpty(website)) {\r\n bean.setName(name);\r\n bean.setWebsite(website);\r\n list.add(bean);\r\n }\r\n //end:modifid by chensuyu for display url when name and website is not null [SW00126117] 20150327\r\n cursor.moveToNext();\r\n //mHandler.sendEmptyMessage(EVENT_REFRESH_LISTVIEW);\r\n }\r\n cursor.close();\r\n } else {\r\n log(\"query data fail!\");\r\n }\r\n } else {\r\n //history\r\n log(\"history load data\");\r\n Cursor cursor = getContentResolver().query(BrowserContract.Combined.CONTENT_URI,\r\n null, BrowserContract.Combined.VISITS + \" > 0\", null, null);\r\n if (null != cursor) {\r\n list.clear();\r\n log(\"cursor.count=\" + cursor.getCount());\r\n cursor.moveToFirst();\r\n while (!cursor.isAfterLast()) {\r\n WebSiteBean bean = new WebSiteBean();\r\n String name = cursor.getString(cursor.getColumnIndex(BrowserContract.Combined.TITLE));\r\n String website = cursor.getString(cursor.getColumnIndex(BrowserContract.Combined.URL));\r\n\r\n //begin:modifid by chensuyu for display url when name and website is not null [SW00126117] 20150327\r\n if (!TextUtils.isEmpty(name) && !TextUtils.isEmpty(website)) {\r\n bean.setName(name);\r\n bean.setWebsite(website);\r\n list.add(bean);\r\n }\r\n //end:modifid by chensuyu for display url when name and website is not null [SW00126117] 20150327\r\n cursor.moveToNext();\r\n //mHandler.sendEmptyMessage(EVENT_REFRESH_LISTVIEW);\r\n }\r\n cursor.close();\r\n } else {\r\n log(\"query data fail!\");\r\n }\r\n \r\n }\r\n\r\n if (list.size() > 0) {\r\n ((TextView) findViewById(R.id.empty)).setText(\"\");\r\n } else {\r\n if (formType == WEBSITE_FORM_BOOKMARK) {\r\n ((TextView) findViewById(R.id.empty)).setText(R.string.website_bookmark_empty);\r\n } else {\r\n ((TextView) findViewById(R.id.empty)).setText(R.string.website_history_empty);\r\n }\r\n }\r\n\r\n adapter.notifyDataSetChanged();\r\n }", "String getDataSource();", "private void getDataFromDb() {\n viewModel.getCachedResults().observe(getViewLifecycleOwner(), searchResults -> {\n// Log.d(TAG, \"queryMusic: \" + new GsonBuilder().create().toJson(searchResults));\n\n //Checks if results is empty, will show the empty message if it do else, clears the list and adds the new one\n if (searchResults.isEmpty()) {\n resultsRv.setVisibility(View.GONE);\n progressBar.setVisibility(View.GONE);\n resultText.setVisibility(View.VISIBLE);\n } else {\n resultsRv.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n resultText.setVisibility(View.GONE);\n mSearchResultList.clear();\n mSearchResultList.addAll(searchResults);\n resultsListAdapter.setData(mSearchResultList);\n// Log.d(TAG, \"setData: mSearchResultList: \"+ new GsonBuilder().create().toJson(mSearchResultList));\n }\n });\n }", "private List<Site> readRemoteData( ) {\n\t\tList<Site> siteList = null;\n\n\t\t// Open a connection to the remote version URL\n\t\t// and get an inputStream\n\t\tURLConnection \tconnection = null; \n\t\tInputStream \tinputStream = null;\n\t\ttry {\n\t\t\tconnection = dataURL_.openConnection();\n\t\t\tinputStream = connection.getInputStream();\n\t\t} catch( IOException e ) {\n\t\t\tLog.e( getClass( ).getCanonicalName(), \"Problem getting remote data.\", e);\n\n\t\t\t// Tidy up. NB inputStream must be null to get here\n\t\t\tif( connection != null ) {\n\t\t\t\tconnection = null;\n\t\t\t}\n\t\t}\n\n\n\n\t\tif( inputStream != null ) {\n\t\t\t// Wrap inputStream as an Inputsource\n\t\t\tInputSource source = new InputSource( inputStream );\n\n\t\t\t/** Handling XML */\n\t\t\tSAXParserFactory saxParserFactory = SAXParserFactory.newInstance();\n\t\t\tSiteListContentHandler handler = new SiteListContentHandler( );\n\n\t\t\ttry {\n\t\t\t\tSAXParser saxParser = saxParserFactory .newSAXParser();\n\t\t\t\tXMLReader xmlReader = saxParser.getXMLReader();\n\n\t\t\t\t// Parse XML using handler\n\t\t\t\txmlReader.setContentHandler( handler );\n\t\t\t\txmlReader.parse( source );\n\t\t\t} catch (ParserConfigurationException e) {\n\t\t\t\tLog.e( getClass().getCanonicalName(), \"Problem creating parser\", e);\n\t\t\t} catch (SAXException e) {\n\t\t\t\tLog.e( getClass().getCanonicalName(), \"Problem parsing Sites from input\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e( getClass().getCanonicalName(), \"Problem parsing Sites from input\", e);\n\t\t\t}\n\t\t\tsiteList = handler.getSiteList();\n\t\t} else {\n\t\t\tLog.e( getClass().getCanonicalName(), \"inputStream was null\");\n\t\t}\n\n\t\treturn siteList;\n\t}", "public void getData() {\n String museums = \"museums\";\n categoriesArrayList = new KategorieDao().KategorieList(databaseHelper, museums);\n MuseumsAdapter adapter = new MuseumsAdapter(categoriesArrayList, getApplicationContext());\n ;\n museum_rv.setAdapter(adapter);\n }", "@Override\r\n public void read() {\n System.out.println('\\n' + \"DB repo: \");\r\n //Idk, probably search for a person and read data??\r\n\r\n }", "private void downloadRtData(){\n\t\ttry {\n\t\t\tif (socket != null) {\n\t\t\t\tInputStream inStream = socket.getInputStream();\n\t\t\t\tParser.readRtData(inStream, \"MainActivity\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"IOException\", \"Exception downloading real time data\");\n\t\t}\n\t}", "private void querys() {\n\t try {\r\n\t\tBoxYieldRptFactory.getRemoteInstance().SteDate();\r\n\t } catch (EASBizException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t } catch (BOSException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}", "@Override\n public void prepareHtmlDataList() {\n makeGCDataInfoOutputData();\n makeLaunchDataInfoOutputData();\n }", "private void fetchData() {\n mNest.addGlobalListener(new NestListener.GlobalListener() {\n @Override\n public void onUpdate(@NonNull GlobalUpdate update) {\n mThermostat = update.getThermostats().get(0);\n mStructure = update.getStructures().get(0);\n if(!Auth.isSignedIn){\n Log.d(TAG, \"GlobalListener: onUpdate: User is not signed in, signing in\");\n Auth.signIn(mThermostat,mStructure);\n }\n updateViews();\n }\n });\n }", "public void getRemoteCategories() {\n //check for connection if true go to apihelper and get model else check if these model cached so get it\n url = getAllCategoriesWithoutItems;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getCategories(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "public String readDataSourcePreferences(){\n\n String dataSourceURL = \"\";\n\n // Get the preferences\n final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences( context );\n\n Boolean dataSourceEnabled = sharedPreferences.getBoolean(\"data_source_check\", false);\n String dataSourcePreference = sharedPreferences.getString( \"data_source\", \"\" );\n\n if ( dataSourceEnabled ) {\n Log.d(\"DATA SOURCE\", sharedPreferences.getString(\"data_source\", \"\"));\n if ( dataSourcePreference.equals( \"Ninguna\" ) ) {\n dataSourceURL = \"http://opendata.caceres.es/sparql\"; // default value\n }\n else {\n dataSourceURL = dataSourcePreference;\n }\n }\n else {\n dataSourceURL = \"http://opendata.caceres.es/sparql\"; // default value\n }\n\n return dataSourceURL;\n }", "private List<Woacrawledurl> readCrawledUrls()\n\t{\n\t\tString hql = \"from Woacrawledurl where instanceId=\"\n\t\t\t\t+ this.param.instance.getTaskinstanceId() + \"order by id\";\n\t\tSessionFactory sessionFactory = TaskFactory.getSessionFactory(this.param.dbid);\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tTransaction t = session.beginTransaction();\n\t\tQuery q = session.createQuery(hql);\n\t\tList<Woacrawledurl> list = q.list();\n\t\tt.commit();\n\t\treturn list;\n\t}", "public void startRetriveDataInfo() {\n\t\t\tif (isLog4jEnabled) {\n\t\t\t\n stringBuffer.append(TEXT_2);\n stringBuffer.append(label);\n stringBuffer.append(TEXT_3);\n \n\t\t\t}\n\t\t}", "private void getData() {\r\n Properties config = new Properties();\r\n\tFileInputStream input = null;\r\n\ttry {\r\n input = new FileInputStream(\"src/signupsigninserver/config/connection.properties\");\r\n config.load(input);\r\n port=Integer.parseInt(config.getProperty(\"port\"));\r\n maxThreads=Integer.parseInt(config.getProperty(\"max_threads\"));\r\n \r\n } catch (FileNotFoundException ex) {\r\n LOGGER.info(\"No encuentra archivo\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ILogicImplementation.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (input != null)\r\n\t\ttry {\r\n input.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ILogicImplementation.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n\t}\r\n }", "public FetchingAllDataModel() {\n\n context = AppController.getInstance().getApplicationContext();\n }", "private void remplirUtiliseData() {\n\t}", "private void loadData() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n String fromSymbols = sharedPreferences.getString(getString(R.string.cryto_key), getString(R.string.cryto_value));\n String toSymbols = sharedPreferences.getString(getString(R.string.currencies_key), getString(R.string.currencies_value));\n new FetchUrlTask().execute(fromSymbols, toSymbols);\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "public void refreshDb() {\n Ion.with(mContext)\n .load(mGetUrl)\n .asJsonObject()\n .setCallback(new FutureCallback<JsonObject>() {\n @Override\n public void onCompleted(Exception e, JsonObject result) {\n try {\n // do stuff with the result or error\n DatabaseClient databaseClient = new DatabaseClient(mContext);\n /**\n * if the return jsonObject is null, then don't clear the table\n * */\n if (result != null) {\n databaseClient.clearTablePage(\"bookpage\");\n }\n\n JsonArray array = result.getAsJsonArray(\"books\");\n /**\n * put data into db\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n for (int i = 0; i < array.size(); i++) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"name\", array.get(i).getAsJsonObject().get(\"name\").getAsString());\n contentValues.put(\"detail_info\", array.get(i).getAsJsonObject().get(\"detail_info\").getAsString());\n contentValues.put(\"author_info\", array.get(i).getAsJsonObject().get(\"author_info\").getAsString());\n contentValues.put(\"unique_id\", array.get(i).getAsJsonObject().get(\"id\").getAsString());\n contentValues.put(\"catalog_info\", array.get(i).getAsJsonObject().get(\"catalog_info\").getAsString());\n contentValues.put(\"timestamp\", array.get(i).getAsJsonObject().get(\"timestamp\").getAsString());\n Uri tmp = contentResolver.insert(uri, contentValues);\n }\n initData(mView);\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n });\n }", "DataHandler getDataHandler();", "Object getDB();", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "protected void readData(DataTable[] tables) throws Exception {\n try {\n for (int i=0; i<tables.length; i++) {\n InputStream is = url.openStream();\n readXml(new InputStreamReader(is), tables[i]);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@GetMapping(path = \"${pathInitDatabase}\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic Object feedDatabase() {\r\n\t\tlivreDAO.feed();\r\n\t\tMap<String, String> r = new HashMap<String, String>();\r\n\t\tr.put(databaseReset, \"\" + true);\r\n\t\tr.put(databaseFeed, \"\" + true);\r\n\t\tr.put(databaseNumberBooks, \"\" + livreDAO.getAllLivres().size());\r\n\r\n\t\treturn r;\r\n\t}", "@Override\n public void run() {\n HttpsURLConnection httpConn = null;\n\n // Read text input stream.\n InputStreamReader isReader = null;\n\n // Read text into buffer.\n BufferedReader bufReader = null;\n\n // Save server response text.\n StringBuffer readTextBuf = new StringBuffer();\n\n try {\n // Create a URL object use page url.\n URL url = new URL(reqUrl + \"?\" + reqParams);\n\n // Open http connection to web server.\n httpConn = (HttpsURLConnection) url.openConnection();\n\n // Set http request method to get.\n httpConn.setRequestMethod(\"GET\");\n httpConn.setRequestProperty(\"User-Agent\", \"\");\n httpConn.setRequestProperty(\"Content-Type\", \"application/json\");\n httpConn.setRequestProperty(\"Accept\", \"application/json\");\n\n httpConn.setDoInput(true);\n\n // Set connection timeout and read timeout value.\n httpConn.setConnectTimeout(10000);\n httpConn.setReadTimeout(10000);\n int statusCode = httpConn.getResponseCode();\n\n InputStream is = httpConn.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n\n String inputLine;\n StringBuilder sb = new StringBuilder();\n\n while ((inputLine = br.readLine()) != null) {\n sb.append(inputLine);\n }\n String result = sb.toString();\n DailyWeather dailyWeather = DailyWeather.getObjectFromString(result);\n if (dailyWeather != null) {\n listDaily[index] =dailyWeather;\n }\n\n br.close();\n httpConn.disconnect();\n\n } catch (MalformedURLException ex) {\n Log.e(LOG_TAG, ex.getMessage(), ex);\n } catch (Exception ex) {\n Log.e(LOG_TAG, ex.getMessage(), ex);\n ex.printStackTrace();\n\n } finally {\n try {\n if (getCount.incrementAndGet()==8){\n if (subscribe != null) {\n subscribe.onGetComplete();\n getCount.set(0);\n }\n }\n if (bufReader != null) {\n bufReader.close();\n bufReader = null;\n }\n if (isReader != null) {\n isReader.close();\n isReader = null;\n }\n if (httpConn != null) {\n httpConn.disconnect();\n httpConn = null;\n }\n } catch (IOException ex) {\n }\n\n }\n }", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "protected static String fetchDataFromServer(String fullUrl)\r\n \t\t\tthrows Exception {\r\n \t\tBufferedReader reader = null;\r\n \t\tString result = null;\r\n \t\ttry {\r\n \t\t\tURL url = new URL(fullUrl);\r\n \t\t\tSystem.out.println(\"Calling: \" + url.toString());\r\n \t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n \t\t\tconn.setRequestMethod(\"GET\");\r\n \t\t\tconn.setDoOutput(true);\r\n \r\n \t\t\treader = new BufferedReader(new InputStreamReader(conn\r\n \t\t\t\t\t.getInputStream()));\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \r\n \t\t\twhile ((line = reader.readLine()) != null) {\r\n \t\t\t\tsb.append(line + \"\\n\");\r\n \t\t\t}\r\n \t\t\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}", "public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}", "private void GetData(){\n try {\n Connection conn =(Connection)app.pegawai.Database.koneksiDB();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from user\");\n data.setModel(DbUtils.resultSetToTableModel(sql));\n\n }\n catch (SQLException | HeadlessException e) {\n }\n}", "public void GetDataBaseData() {\n }", "private void getData() {\n showDialog();\n Call<InfoMcWkMoldRes> call = apiInterface.getCompositeMaster(idActual);\n call.enqueue(new Callback<InfoMcWkMoldRes>() {\n @Override\n public void onResponse(Call<InfoMcWkMoldRes> call, Response<InfoMcWkMoldRes> response) {\n if(response.isSuccessful()){\n compositeMasterArrayList = new ArrayList<>();\n InfoMcWkMoldRes res = response.body();\n if (res!=null){\n compositeMasterArrayList = res.getCompositeMasterList();\n if (compositeMasterArrayList.isEmpty()) {\n dialog.dismiss();\n nodata.setVisibility(View.VISIBLE);\n mapping.setVisibility(View.GONE);\n return;\n }\n dialog.dismiss();\n buildRecycleView();\n }\n\n }else {\n nodata.setVisibility(View.VISIBLE);\n mapping.setVisibility(View.GONE);\n AlertError.alertError(\"The server response error\", CompositeActivity.this);\n dialog.dismiss();\n }\n }\n\n @Override\n public void onFailure(Call<InfoMcWkMoldRes> call, Throwable t) {\n call.cancel();\n nodata.setVisibility(View.VISIBLE);\n mapping.setVisibility(View.GONE);\n AlertError.alertError(t.getMessage(), CompositeActivity.this);\n dialog.dismiss();\n\n }\n });\n\n Log.e(\"getData\", webUrl + \"ActualWO/Getinfo_mc_wk_mold?id_actual=\" + idActual);\n }", "public ResultSet ServerData() {\n\t\tResultSet rs = null; //new resultset of default value null\r\n\t\ttry {\r\n\r\n\r\n\t\t\tString query = \"SELECT * FROM TBLSERVERS\"; //get all data in the TBLSERVERS table\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(query); //prepare a new statement\r\n\t\t\trs = pst.executeQuery(); //execute statement and store result in a resultset \r\n\t\t} catch (SQLException ex) { //catches SQL exception to prevent an application crash in this case\r\n\t\t\tLogger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\r\n\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "private void getDatabase(){\n\n }", "void loadData();", "void loadData();", "public List<Data> getAllDataFromService() {\n\t\t\n\t\tList<Data> data = new ArrayList<>();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t// get first page data\n\t\tResponse response = restTemplate.getForObject(\n\t\t\t\t\"https://jsonmock.hackerrank.com/api/article_users/search?page=1\",\n\t\t\t\tResponse.class);\n\t\tdata.addAll(response.getData());\n\t\t\n\t\t// get second page data\n\t\tResponse response2 = restTemplate.getForObject(\n\t\t\t\t\"https://jsonmock.hackerrank.com/api/article_users/search?page=2\",\n\t\t\t\tResponse.class);\n\t\tdata.addAll(response2.getData());\n\t\t\n\t\treturn data;\t\n\t}", "WebCrawlerData retrieve(String url);", "private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }" ]
[ "0.66228175", "0.65894085", "0.6546605", "0.64797485", "0.64317656", "0.6403308", "0.63986975", "0.6288887", "0.6268781", "0.6247454", "0.6207099", "0.61815643", "0.61796844", "0.6141805", "0.6091664", "0.608322", "0.60576254", "0.6033122", "0.60010505", "0.59962237", "0.5992691", "0.5989671", "0.596517", "0.5942973", "0.5941377", "0.5940757", "0.5924712", "0.59101063", "0.5882771", "0.5864724", "0.5852165", "0.583575", "0.5833808", "0.5832012", "0.5823555", "0.57635736", "0.5760357", "0.57297045", "0.57241654", "0.57131445", "0.57091004", "0.5692937", "0.5682494", "0.56697583", "0.5668634", "0.5662077", "0.5643673", "0.56309086", "0.562826", "0.5623292", "0.56216854", "0.562151", "0.5617163", "0.56097", "0.5605138", "0.5599414", "0.5597192", "0.55967444", "0.5595498", "0.55862284", "0.55832237", "0.55796975", "0.55752707", "0.5570648", "0.55673915", "0.55610764", "0.5548227", "0.55474067", "0.5547055", "0.5545236", "0.5539291", "0.5531872", "0.55311173", "0.55190194", "0.55140126", "0.55075866", "0.55065036", "0.5492217", "0.54917467", "0.54884726", "0.54837096", "0.5479654", "0.54739153", "0.5473756", "0.5473496", "0.5471446", "0.5465287", "0.5460118", "0.54577696", "0.54575574", "0.54561985", "0.5449769", "0.5448538", "0.5446628", "0.544521", "0.5444948", "0.54424727", "0.54424727", "0.54423386", "0.54391754", "0.54330504" ]
0.0
-1
Constructs a FreeCellModel with default values: the game has not started, and all the piles are initialized but empty.
public FreeCellModel() { gameStarted = false; foundationPiles = new ArrayList<IPile>(); cascadePiles = new ArrayList<IPile>(); openPiles = new ArrayList<IPile>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FreecellMultiMoveModel() {\n this.cascadePiles = null;\n this.foundationPiles = null;\n this.openPiles = null;\n this.numCascadePiles = 0;\n this.numOpenPiles = 0;\n this.gameStarted = false;\n }", "@Test\n\tpublic void freeCellInitiallyHoldTest() {\n\t\tFreeCell obj = new FreeCell();\n\t\t// Assert homeCell pile1 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(1).getSize());\n\t\t// Assert homeCell pile2 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(2).getSize());\n\t\t// Assert homeCell pile3 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(3).getSize());\n\t\t\n\t}", "GameModel() {\n mState = GAME_BEFORE_START;\n mFixCount = 30;\n mReasonable = false;\n mBoard = new BlockState[BOARD_ROWS][BOARD_COLS];\n for (int r = 0; r < BOARD_ROWS; ++r) {\n for (int c = 0; c < BOARD_COLS; ++c) {\n mBoard[r][c] = new BlockState();\n }\n }\n reInit();\n }", "public FuelCell() {\n fuelCellMot = new VictorSPX(fuelCellConstants.fuelCellMot);\n raiseHopper = new Solenoid(driveConstants.PCM, fuelCellConstants.raiseHopper);\n lowerHopper = new Solenoid(driveConstants.PCM, fuelCellConstants.lowerHopper);\n }", "public Model() {\n\t\tboolean debug = Constants.getDebugFlag();\n\t\tgameMode = Constants.getGameMode();\n\t\twhitePieces = new PieceArray();\n\t\tblackPieces = new PieceArray();\n\t\tcapturedPieces = new ArrayList<Piece>();\n\t\tmoveList = new ArrayList<Move>();\n\t\tgameTree = new GameTree();\n\n\t\tboard = new Piece[8][8];\n\n\t\t\n\t\t// Easy way to set up nonstandard positions for testing.\n\t\tif(debug)\n\t\t\tinitializeDebugBoard();\n\t\telse\n\t\t\tinitializeBoard();\n\t\t\n\t\tpopulateLists();\n\t}", "public MazeModel() {\n\n mazeGeneration = new LinkedList<>();\n\n cells = new Cell[MAX_ROWS][MAX_COLUMNS];\n\n for (int r = 0; r < MAX_ROWS; r++) {\n for (int c = 0; c < MAX_COLUMNS; c++) {\n cells[r][c] = new Cell();\n cells[r][c].setR(r);\n cells[r][c].setC(c);\n }\n }\n }", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}", "public Board2048model() {\r\n\t\tsuper(4, 4);\r\n\t\tgame = new Cell2048[this.rows_size][this.columns_size];\r\n\t\tscore = 0;\r\n\t\t\r\n\t\tfor(int i = 0 ; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\tgame[i][j] = new Cell2048();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\tint value1 = rand.nextInt(this.columns_size);\r\n\t\tint value2 = rand.nextInt(this.rows_size);\r\n\t\tint value3 = rand.nextInt(this.columns_size);\r\n\t\tint value4=rand.nextInt(this.rows_size); \r\n\t\t\r\n\t\twhile ( (value1 == value3) && (value2 == value4) ) {\r\n\t\t\tvalue3 = rand.nextInt(this.columns_size);\r\n\t\t\tvalue4=rand.nextInt(this.rows_size); \r\n\t\t}\r\n\t\tthis.game[value1][value2].setValue(randomValue());\r\n\t\tthis.game[value3][value4].setValue(randomValue());\r\n\t\tscore = 0;\r\n\t\tfreeCells -= 2;\r\n\t\ttakenCells += 2;\r\n\t\t\r\n\t}", "public void initialize() {\n\t\t// set seed, if defined\n\t\tif (randomSeed > Integer.MIN_VALUE) {\n\t\t\tapp.randomSeed(randomSeed);\n\t\t}\n\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 = new Cell(\n\t\t\t\t\tapp,\n\t\t\t\t\tcellSize,\n\t\t\t\t\tcolors[(int)app.random(colors.length)],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tc.position = PVector.add(offset, new PVector(x * cellSize, y * cellSize));\n\t\t\t\tcells[x + (y * gridX)] = c;\n\t\t\t\tnewCells[x + (y * gridX)] = c;\n\t\t\t}\n\t\t}\n\t}", "public void initialize() {\n\t\tnumRows = gridConfig.getNumRows();\n\t\tnumCols = gridConfig.getNumCols();\n\t\tgridCellCount = numRows * numCols;\n\t\tcreateMaps();\n\t\tsetCurrSimulationMap();\n\t\tcellWidth = SIZE / numCols;\n\t\tcellHeight = SIZE / numRows;\n\t\tcurrentGrid = new Cell[numRows][numCols];\n\t\tnewGrid = new Cell[numRows][numCols];\n\t\tempty(currentGrid);\n\t\tempty(newGrid);\n\t\tsetShapes();\n\t\tsetInitialStates();\n\t}", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "public void defaultGame() {\n //CREATE A BOARD\n Board board = new Board(10, 10, 0);\n ArrayList<Boat> boats = createDefaultBoatArray();\n //CREATE A GAME\n GameData game = new GameData(board, boats, false);\n //POSITION BOATS\n randomPosBoats(game);\n\n //!!tile matrix is empty\n Game.getInstance().setGameData(game);\n Game.getInstance().setEnded(false);\n }", "public static void initialize()\n {\n\n for(int i = 0; i < cellViewList.size(); i++)\n cellList.add(new Cell(cellViewList.get(i).getId()));\n for (int i = 76; i < 92; i++)\n {\n if (i < 80)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(0).getChess(i-76));\n }\n else if (i < 84)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(1).getChess(i-80));\n }\n else if (i < 88)\n {\n cellList.get(i).setChess(PlayerController.getPlayer(2).getChess(i-84));\n }\n else\n {\n cellList.get(i).setChess(PlayerController.getPlayer(3).getChess(i-88));\n }\n }\n }", "FreecellModelAbstraction(Map<Integer, List<Cards>> cascadePile, Map<Integer,\n List<Cards>> foundationPile, Map<Integer, List<Cards>> openPile) {\n currentState = new GameState();\n this.currentState.setOpenPile(openPile);\n this.currentState.setCascadePile(cascadePile);\n this.currentState.setFoundationPile(foundationPile);\n }", "public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }", "public Cell()\n\t{\n\t}", "public Cell() {\r\n\t\tthis.mineCount = 0;\r\n\t\tthis.isFlagged = false;\r\n\t\tthis.isExposed = false;\r\n\t\tthis.isMine = false;\r\n\t}", "private static void initField() {\n\t\tfield = new Field(nRows, nColumns);\n\t\tfor (int i = 0; i < field.getNRows(); i++)\n\t\t\tfor (int j = 0; j < field.getNColumns(); j++) {\n\t\t\t\tfield.place(i, j, new Cell(i, j, cellSize, 0));\n\t\t\t}\n\t\t/* Sets some of the cells to be mine randomly */\n\t\tfor (int i = 0; i < nMines; i++) {\n\t\t\tint x = rand.nextInt(nRows);\n\t\t\tint y = rand.nextInt(nColumns);\n\t\t\tif (!field.getCellAt(x, y).hasMine()) // If the cell at (x,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// y)is not a mine\n\t\t\t\tfield.getCellAt(x, y).setToHasMine();// Sets it to be a mine\n\t\t\telse\n\t\t\t\ti--;\n\t\t}\n\t\t/* Calculates the flag of other cells */\n\t\tfor (int i = 0; i < nRows; i++)\n\t\t\tfor (int j = 0; j < nColumns; j++) {\n\t\t\t\tif (field.getCellAt(i, j).hasMine()) // If this cell has a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// mine\n\t\t\t\t\tcontinue;\n\t\t\t\tCell[] cellsAround = field.getCellsAround(i, j);\n\t\t\t\tint count = 0;\n\t\t\t\tfor (Cell cell : cellsAround) // cells around\n\t\t\t\t\tif (cell.hasMine())\n\t\t\t\t\t\tcount++;\n\t\t\t\tfield.getCellAt(i, j).setFlag(count);\n\t\t\t}\n\t}", "public Cell()\n\t{\n\t\tthis.alive = 0;\n\t\tthis.neighbors = 0;\n\t}", "public FoodModel()\n\t{\n\t\tgenerateRandomPosition();\n\t}", "private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -1;\n stateOfMovement = 0;\n for(int i = 0; i < 3; i++){\n this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));\n }\n this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));\n currentWeapon = this.weapons.get(0);\n bulletsFired = new ArrayList<>();\n shootingDirection = 1;\n energy = 0;\n sprint = false;\n score = 0;\n roundsWon = 0;\n ready = false;\n audioHandler = new AudioHandler();\n }", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "private void init() {\n \t\t// Initialise border cells as already visited\n \t\tfor (int x = 0; x < size + 2; x++) {\n \t\t\tvisited[x][0] = true;\n \t\t\tvisited[x][size + 1] = true;\n \t\t}\n \t\tfor (int y = 0; y < size + 2; y++) {\n \t\t\tvisited[0][y] = true;\n \t\t\tvisited[size + 1][y] = true;\n \t\t}\n \t\t\n \t\t\n \t\t// Initialise all walls as present\n \t\tfor (int x = 0; x < size + 2; x++) {\n \t\t\tfor (int y = 0; y < size + 2; y++) {\n \t\t\t\tnorth[x][y] = true;\n \t\t\t\teast[x][y] = true;\n \t\t\t\tsouth[x][y] = true;\n \t\t\t\twest[x][y] = true;\n \t\t\t}\n \t\t}\n \t}", "public Cell(){\n this.ship = null;\n this.hasBeenShot = false;\n }", "private Cell()\n\t{\n\t\tsupplied = false;\n\t\tconnections = new boolean[4];\n\t\t\n\t\tfor(int i = 0; i < 4; ++i)\n\t\t\tconnections[i] = false;\n\t}", "private static void init() {\n\t\t// TODO Auto-generated method stub\n\t\tviewHeight = VIEW_HEIGHT;\n\t\tviewWidth = VIEW_WIDTH;\n\t\tfwidth = FRAME_WIDTH;\n\t\tfheight = FRAME_HEIGHT;\n\t\tnMines = N_MINES;\n\t\tcellSize = MINE_SIZE;\n\t\tnRows = N_MINE_ROW;\n\t\tnColumns = N_MINE_COLUMN;\n\t\tgameOver = win = lost = false;\n\t}", "public Layer() {\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tfor (int j = 0; j < 16; j++) {\n\t\t\t\tgrid[i][j] = false;\n\t\t\t}\n\t\t}\n\t}", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public PlayField() {\n cells = new Block[24][10];\n }", "public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }", "private void initialise() {\r\n\t\tfor(int i = 0; i < board.getWidth(); i++) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), i, j);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}", "protected void initModel() throws CommandLineFormatException, NullCoordinateException\n\t{\n\t\t\n\t\tfinal Var vdt = command.get(CNFTCommandLine.DT); //default dt\n\t\t\n\t\tcortical = new NeighborhoodMap(CORTICAL, \n\t\t\t\tnew SomUM(inputSpace, vdt, extendedFramedSpace)){\n\t\t\tpublic void compute() throws NullCoordinateException{\n\t\t\t\tsuper.compute();\n\t\t\t\tpotential.resetState();\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\tpotential = getPotential(vdt);\n\t\t\n\t\t\n\t\tcortical.addParameters(input,potential,command.get(CNFTCommandLine.LEARNING_RATE));\n\t\tNeighborhood neigh = new V4Neighborhood2D( extendedFramedSpace, new UnitLeaf((UnitParameter) cortical));\n\t\tneigh.setNullUnit(new ConstantUnit(new Var(0)));\n\t\t((NeighborhoodMap)cortical).addNeighboors(neigh);\n\t\t\n\t\t\n\t\tthis.root = cortical;\n\t\t\n\t\tcorticalPot = new Map(CORTICAL_POT, new Sum(vdt, extendedFramedSpace, new Leaf(cortical)));\n\t\tthis.addParameters(corticalPot);\n\t\t\n\t\t\n\n\t}", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "public Player(){\n\t\tthis.cell = 0;\n\t}", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "public GameBoard(){\r\n boardCells = new GameCell[NUMBER_OF_CELLS];\r\n for( int i= 0; i< NUMBER_OF_CELLS; i++ ){\r\n boardCells[i] = new GameCell(i);//\r\n }\r\n }", "public GameController() {\n \t\t// Fill the table empty positions.\n \t\tfor (int i = 0; i < MAX_NUMBER_OF_PILES; i++) {\n \t\t\tmTable.add(i, null);\n \t\t}\n \t\tcreateDeck();\n \t\tgs = new GameState(mTable, pileNames, pileNo);\n \t\tnew Listener(this);\n \t}", "public void init_cells()\n\t{\n\t\tint i, j;\n\n\t\t// create a maze of cells\n\t\tMaze = new int[ROWS][COLS];\n//\t\tfor (i = 0; i < ROWS; i++)\n//\t\t\tMaze[i] = new Array(COLS);\n\n\t\t// set all walls of each cell in maze by setting bits : N E S W\n\t\tfor (i = 0; i < ROWS; i++)\n\t\t\tfor (j = 0; j < COLS; j++)\n\t\t\t\tMaze[i][j] = (N + E + S + W);\n\t\t\n\t\t// create stack for storing previously visited locations\n\t\tstack = new Vector<int[]>(ROWS*COLS);\n\t\tfor (i = 0; i < ROWS*COLS; i++)\n\t\t\tstack.add(i, new int[2]);\n\n\t\t// initialize stack\n\t\tfor (i = 0; i < ROWS*COLS; i++)\n\t\t\tfor (j = 0; j < 2; j++)\n\t\t\t\tstack.elementAt(i)[j] = 0;\n\t}", "public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }", "public GeneralModel() {\n initThemes();\n initProperties();\n }", "private TETile[][] initialize() {\n int width = size.width;\n int height = size.height;\n world = new TETile[width][height];\n for (int w = 0; w < width; w++) {\n for (int h = 0; h < height; h++) {\n world[w][h] = Tileset.NOTHING;\n }\n }\n return world;\n }", "public Cell(){}", "public Board()\r\n\t{\r\n\t\tthis.grid = new CellState[GRID_SIZE][GRID_SIZE];\r\n\t\tthis.whiteMarblesCount = MARBLES_COUNT;\r\n\t\tthis.blackMarblesCount = MARBLES_COUNT;\r\n\t\t\r\n\t\t/**\r\n\t\t * Initializes the board with empty value\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < GRID_SIZE; indexcol++)\r\n\t\t{\r\n\t\t\tfor (int indexrow = 0; indexrow < GRID_SIZE; indexrow++)\r\n\t\t\t{\r\n\t\t\t\tthis.grid[indexrow][indexcol] = CellState.EMPTY;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Sets marbles on the board with default style\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[0][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[8][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 0; indexcol < 6; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[1][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[7][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 2; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[2][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[6][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tthis.grid[3][8] = CellState.INVALID;\r\n\t\tthis.grid[2][7] = CellState.INVALID;\r\n\t\tthis.grid[1][6] = CellState.INVALID;\r\n\t\tthis.grid[0][5] = CellState.INVALID;\r\n\t\tthis.grid[5][0] = CellState.INVALID;\r\n\t\tthis.grid[6][1] = CellState.INVALID;\r\n\t\tthis.grid[7][2] = CellState.INVALID;\r\n\t\tthis.grid[8][3] = CellState.INVALID;\r\n\t}", "protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}", "public Cell() {\n\t\tthis.alive = false; // Initially dead\n\t\tthis.age = 0; // Initially age of 0\n\t}", "public Model() {\n\t\tbucket = new bucket[14];\n\t\tlisteners = new ArrayList<ChangeListener>();\n\n\t\ta = new player(true, 1);\n\t\tb = new player(false, 2);\n\n\t\tfor (int x = 0; x < 14; x++) {\n\t\t\tif (x == 0 || x == 7) {\n\t\t\t\tbucket[x] = new bucket(x, 0);\n\t\t\t} else {\n\t\t\t\tbucket[x] = new bucket(x, 0);\n\t\t\t}\n\t\t}\n\t}", "public Board() {\r\n\t\tthis.size = 4;\r\n\t\tthis.gameBoard = createBoard(4);\r\n\t\tthis.openTiles = 16;\r\n\t\tthis.moves = 0;\r\n\t\tthis.xValues = new boolean[4][4];\r\n\t\tthis.yValues = new boolean[4][4];\r\n\t\tthis.complete = false;\r\n\t}", "public static SimpleFreecellModel create(GameType type) {\r\n switch (type) {\r\n case SINGLEMOVE:\r\n return new SimpleFreecellModel();\r\n case MULTIMOVE:\r\n return new MultiFreecellModel();\r\n default:\r\n throw new IllegalArgumentException(\"Not a valid game type.\");\r\n }\r\n }", "public Grid() { //Constructs a new grid and fills it with Blank game objects.\r\n\t\tthis.grid = new GameObject[10][10];\r\n\t\tthis.aliveShips = new Ships[4];\r\n\t\tfor (int i = 0; i < this.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.grid[i].length; j++) {\r\n\t\t\t\tthis.grid[i][j] = new Blank(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void buildModel() {\n space = new RabbitsGrassSimulationSpace(gridSize);\n space.setModel(this);\n space.spreadGrass(numInitGrass);\n\n for (int i = 0; i < numInitRabbits; i++) {\n addNewRandomRabbit();\n }\n }", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "public Tile() {\n this(-1, false);\n for (int i = 1; i <= 9; i++) {\n possibleValues.add(i);\n }\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public Stage() {\n\n for (int i = 0; i < 20; i++) { // Generate the basic grid array\n ArrayList<Cell> cellList = new ArrayList<Cell>();\n cells.add(cellList);\n for (int j = 0; j < 20; j++) {\n cells.get(i).add(new Cell(10 + 35 * i, 10 + 35 * j));\n }\n }\n\n for (int i = 0; i < cells.size(); i++) { // Generate the list of environment blocks\n ArrayList<Environment> envList = new ArrayList<Environment>();\n environment.add(envList);\n for (int j = 0; j < cells.size(); j++) {\n int cellGenerator = (int) (Math.random() * 100) + 1;\n environment.get(i).add(generateCell(cellGenerator, cells.get(i).get(j)));\n }\n }\n\n grid = new Grid(cells, environment); // Initialise the grid with the generated cells array\n }", "public Blank()\n {\n // Here you set up your interface. You can look at other patch editors\n // to see how they were done. At the very end you typically would say something like:\n \n \n model.set(\"name\", \"InitName\"); // or whatever, to set the initial name of your patch (assuming you use \"name\" as the key for the patch name)\n loadDefaults(); // this tells Edisyn to load the \".init\" sysex file you created. If you haven't set that up, it won't bother\n }", "@Test\n\tpublic void freeCellCorrectlyReturnsTest() {\n\t\tFreeCell obj = new FreeCell();\n\t\tCard obj1 = new Card(1, 0);\n\t\t// Assert that cards can't be removed from a empty homecell pile\n\t\tassertFalse((obj.getHomeCellPile(1)).removeCard());\n\t\t// Add an ace to the empty homecell\n\t\tobj.getHomeCellPile(1).addCard(obj1);\n\t\t// Assert that cards can't be removed from a homecell pile\n\t\tassertFalse((obj.getHomeCellPile(1)).removeCard());\n\t}", "void init() {\r\n\r\n map = new HashMap<Square, Piece>();\r\n for (Square sq: INITIAL_ATTACKERS) {\r\n map.put(sq, BLACK);\r\n }\r\n for (Square sq: INITIAL_DEFENDERS) {\r\n map.put(sq, WHITE);\r\n }\r\n king = sq(4, 4);\r\n map.put(king, KING);\r\n for (int i = 0; i <= 8; i++) {\r\n for (int j = 0; j <= 8; j++) {\r\n if (!map.containsKey(sq(i, j))) {\r\n map.put(sq(i, j), EMPTY);\r\n }\r\n }\r\n }\r\n\r\n board = new Piece[9][9];\r\n\r\n for (Square keys : map.keySet()) {\r\n board[keys.col()][keys.row()] = map.get(keys);\r\n }\r\n }", "public void blank() {\r\n\t\trunning = false;// sets the simulation to stopped\r\n\t\tfor (int i = 0; i < TOTAL_TILES; i++)// loops through all tiles\r\n\t\t\tnodes[i] = new Node(new Point(i / WIDTH_TILES * SIZE_TILES, i % HEIGHT_TILES * SIZE_TILES), new ImageIcon(\"empty.png\").getImage(), false, \"empty\");// sets empty tile\r\n\t}", "public Grid()\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tgrid[x]=0;\n }", "public MahjongSolitaireDataModel(MiniGame initMiniGame)\n {\n // KEEP THE GAME FOR LATER\n miniGame = initMiniGame;\n \n // INIT THESE FOR HOLDING MATCHED AND MOVING TILES\n stackTiles = new ArrayList();\n movingTiles = new ArrayList();\n }", "public Board() {\n initialize(3, null);\n }", "private static void InitializeCells()\n {\n cells = new Cell[Size][Size];\n\n for (int i = 0; i < Size; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n cells[i][j] = new Cell(i, j);\n }\n }\n }", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "public BossRoom() {\n\t\ttiles = new WorldTiles(width, height, width);\n\t\tbackground = new Sprite(SpriteList.BOSS_ROOM_BACKGROUND);\n\t}", "private void InitializeApp() {\n\n for (int y = 0; y < 11; y++) {\n for (int x = 0; x < 11; x++) {\n defendingGrid[x][y] = new GameCell();\n attackingGrid[x][y] = new GameCell();\n }\n }\n\n// attackingGrid[5][5].setMiss(true);\n// attackingGrid[5][6].setHit(true);\n// attackingGrid[5][7].setWaiting(true);\n// attackingGrid[5][7].setHasShip(true);\n\n }", "private void initializeGameBoard()\n\t{\n\t\tboard = new State[3][3];\n\t\tfor (int r = 0; r < 3; r++)\n\t\t\tfor (int c = 0; c < 3; c++)\n\t\t\t\tboard[r][c] = State.EMPTY;\n\t}", "public Game() {\n \tthis.height = 0;\n \tthis.width = 0;\n \tthis.map=\"\";\n \tthis.table=null;\n \tthis.fileName=\"\";\n }", "public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void setEmpty() {\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++)\n\t\t\t\tboard[r][c] = new Cell(false, false,\n\t\t\t\t\t\tfalse, false); // totally clear.\n\t}", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public BluePrintModel(String title, String description, String uiImagePath, String spritePath, float spriteOriginX, float spriteOriginY,\n float price, EnumSet<FloorModel.FloorType> canBuildOn, FloorModel.FloorType[][] tiles,\n Builder builder, boolean buildOnAllFloors, Demolisher demolisher, int... allowedAngles) {\n\n this.title = title;\n this.description = description;\n this.uiImagePath = uiImagePath;\n this.spritePath = spritePath;\n this.spriteOriginX = spriteOriginX;\n this.spriteOriginY = spriteOriginY;\n this.price = price;\n this.canBuildOn = canBuildOn;\n this.tiles = tiles;\n this.builder = builder;\n this.buildOnAllFloors = buildOnAllFloors;\n this.allowedAngles = allowedAngles.length == 0 ? new int[] {0, 1, 2, 3} : allowedAngles;\n this.demolisher = demolisher;\n angle = this.allowedAngles[0];\n }", "public Grid ()\n {\n mGrid = new Move[3][3];\n for (int row = 0; row < 3; row++)\n for (int column = 0; column < 3; column++)\n mGrid[row][column] = new Move(Player.NONE, row, column);\n }", "public Cell ()\n {\n cellStatus = false;\n xCoordinate = 0;\n yCoordinate = 0;\n button = new JButton();\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public Model() {\r\n// waiting_games = new ArrayList<>();\r\n// full_games = new ArrayList<>();\r\n games = new ArrayList<>();\r\n }", "public void initialize() {\n for (Location apu : this.locations) {\n Node next = new Node(apu.toString());\n this.cells.add(next);\n }\n \n for (Node helper : this.cells) {\n Location next = (Location)this.locations.searchWithString(helper.toString()).getOlio();\n LinkedList<Target> targets = next.getTargets();\n for (Target finder : targets) {\n Node added = this.path.search(finder.getName());\n added.setCoords(finder.getX(), finder.getY());\n helper.addEdge(new Edge(added, finder.getDistance()));\n }\n }\n \n this.startCell = this.path.search(this.source);\n this.goalCell = this.path.search(this.destination);\n \n /**\n * Kun lähtö ja maali on asetettu, voidaan laskea jokaiselle solmulle arvio etäisyydestä maaliin.\n */\n this.setHeuristics();\n }", "public SBlock() {\n // todo\n cells = new boolean[rows][columns];\n cells[0][0] = false;\n cells[0][1] = true;\n cells[0][2] = true;\n cells[1][0] = true;\n cells[1][1] = true;\n cells[1][2] = false;\n cells[2][0] = false;\n cells[2][1] = false;\n cells[2][2] = false;\n }", "public Sudoku() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tthis.initialState[i][j] = this.currentState[i][j] = 0;\n\t\t\t}\n\t\t}\n\t}", "public ZonaFasciculataCells() {\r\n\r\n\t}", "private static void mineInitialization(){\n\t\tfor (int m = 0; m < BOARD_SIZE; m++)\n\t\t{\n\t\t\tmX = RNG.nextInt(BOARD_SIZE);\n\t\t\tmY = RNG.nextInt(BOARD_SIZE);\n\t\t\tif(gameBoard[mX][mY].equals(Spaces.Empty))\n\t\t\t{\n\t\t\t\tgameBoard[mX][mY] = Spaces.Mine;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm--;\n\t\t\t}\n\t\t}\n\t}", "public CellList() {\n head = null;\n size = 0;\n }", "public Grid()\n {\n dest = new GridReference[2];\n dest[0] = new GridReference(Game.GRID_WIDTH-(int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.2));\n dest[1] = new GridReference(Game.GRID_WIDTH-(int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.8));\n //dest[2] = new GridReference(5,50);\n defaultStart = new GridReference((int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.5));\n defaultWalker = Walkers.WEIGHTED2;\n \n createField();\n \n walkers = new ArrayList<>();\n //addUnits(randDest(), randDest());\n /*for (int i = 0; i < grassPatches.length; i++)\n {\n System.out.println(i + \":\" + grassPatches[i]);\n }*/\n }", "private void initializeGameModel() {\n mGameModel = new GameModel();\n mGameModel.setId(mGameWaitModel.getId());\n mGameModel.setGameMaster(getPlayerModel(true));\n mGameModel.setGameSlave(getPlayerModel(false));\n mGameModel.setGenerateNewQuestion(true);\n mGameModel.setDidGameEnd(false);\n LOGD(TAG, \"Game Model initialized\");\n }", "private Board()\r\n {\r\n this.grid = new Box[Config.GRID_SIZE][Config.GRID_SIZE];\r\n \r\n for(int i = 0; i < Config.NB_WALLS; i++)\r\n {\r\n this.initBoxes(Wall.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_CHAIR; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_PLAYER; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n }", "public RegularGrid() {\r\n }", "public Board() {\n this.actionField = new ActionField();\n this.buyField = new BuyField();\n }", "public void resetModel() {\n\t\twhitePieces.removeAll();\n\t\tblackPieces.removeAll();\n\t\tcapturedPieces.removeAll(capturedPieces);\n\t\tmoveList.removeAll(moveList);\n\n\t\tinitializeBoard();\n\t\tpopulateLists();\n\t}", "public GameBoard(){\r\n\t\tboard = new Box[boardSize];\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tboard[i] = Box.EMPTY;\r\n\t\t}\r\n\t}", "public void init(CellImpl cell);", "public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}", "private void initAndSaveGrid(GridGame game) {\n\t\tgame.modeler = createDumbInitModeler(trainingData );\n\t\tint i = 0;\n\t\tfor (TransitionMemory tm : trainingData) {\n\t\t\tif (i++ > 10) break; // just a few to learn the\n\t\t\tgame.modeler.saveMemory(tm);\n\t\t}\n\t\tgame.modeler.learnFromMemory(0, 0, 0, false, 1, 10000); // just to get node dimensions\n\t\tUtils.saveObjectToFile(GRID_FILE, SerializableGridGame.create(game));\n\t\tif (Utils.loadObjectFromFile(GRID_FILE) == null) System.out.println(\"Problem saving grid\");\n\t}", "public MancalaModel() \n\t{\n\t\tplayerApits[] = new Pit[6];//going to switch to contain specific pits\n\t\tplayerBpits[] = new Pit[6];//\"\"\n\t\tcurrent = playerA;\n\t}", "private void setDefaults() {\n\t\tequipActions = new String[] { \"Remove\", null, \"Operate\", null, null };\n\t\tmodelId = 0;\n\t\tname = null;\n\t\tdescription = null;\n\t\tmodifiedModelColors = null;\n\t\toriginalModelColors = null;\n\t\tmodifiedTextureColors = null;\n\t\toriginalTextureColors = null;\n\t\tmodelZoom = 2000;\n\t\tmodelRotation1 = 0;\n\t\tmodelRotation2 = 0;\n\t\tmodelRotationY = 0;\n\t\tmodelOffset1 = 0;\n\t\tmodelOffset2 = 0;\n\t\tstackable = false;\n\t\tvalue = 1;\n\t\tmembersObject = false;\n\t\tgroundOptions = new String[5];\n\t\tinventoryOptions = new String[5];\n\t\tmaleModel = -1;\n\t\tanInt188 = -1;\n\t\tmaleOffset = 0;\n\t\tfemaleModel = -1;\n\t\tanInt164 = -1;\n\t\tfemaleOffset = 0;\n\t\tanInt185 = -1;\n\t\tanInt162 = -1;\n\t\tanInt175 = -1;\n\t\tanInt166 = -1;\n\t\tanInt197 = -1;\n\t\tanInt173 = -1;\n\t\tstackIDs = null;\n\t\tstackAmounts = null;\n\t\tcertID = -1;\n\t\tcertTemplateID = -1;\n\t\tanInt167 = 128;\n\t\tanInt192 = 128;\n\t\tanInt191 = 128;\n\t\tanInt196 = 0;\n\t\tanInt184 = 0;\n\t\tteam = 0;\n\n\t\topcode140 = -1;\n\t\topcode139 = -1;\n\t\topcode148 = -1;\n\t\topcode149 = -1;\n\n\t\tsearchableItem = false;\n\t}", "@Override\r\n\tpublic void init() \r\n\t{\r\n\t\tthis.board = new GameBoard();\r\n\t}", "public SudokuModel() {\n board = new Board();\n\t\tisEditing = false;\n\t\teditIndex = new int[2];\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "private void initialize() {\n this.board.addBoardChangeListener(this);\n\n this.layers = new ArrayList();\n this.bounds = new Rectangle();\n\n this.zoom = 1.0;\n this.zoomLevel = ZOOM_NORMALSIZE;\n this.affineTransform = new AffineTransform();\n\n this.loadTiles(board);\n this.setPreferredSize(new Dimension((board.getWidth() * 32),\n (board.getHeight() * 32)));\n\n bufferedImage = new BufferedImage((board.getWidth() * 32),\n (board.getHeight() * 32), BufferedImage.TYPE_INT_ARGB);\n\n this.antialiasGrid = true;\n this.gridColor = DEFAULT_GRID_COLOR;\n this.gridOpacity = 100;\n\n if (!this.layers.isEmpty()) {\n this.currentSelectedLayer = this.layers.get(0);\n }\n }" ]
[ "0.71057177", "0.64176804", "0.63930935", "0.63460004", "0.6262049", "0.6159058", "0.6126597", "0.60244924", "0.60068405", "0.6006527", "0.5961431", "0.5947298", "0.5888792", "0.5870908", "0.58632255", "0.5820185", "0.580873", "0.58055365", "0.5803963", "0.5798912", "0.57970005", "0.5788567", "0.5775407", "0.57737434", "0.5723981", "0.5722966", "0.5722791", "0.57149756", "0.57098776", "0.5689501", "0.5683019", "0.567874", "0.5678622", "0.5666163", "0.5663794", "0.5654998", "0.5653581", "0.56305325", "0.56290907", "0.56199205", "0.56184655", "0.5602796", "0.5591489", "0.5591086", "0.55883104", "0.5578861", "0.55759925", "0.5573709", "0.55713534", "0.55698204", "0.5556441", "0.55409914", "0.5537994", "0.55335444", "0.55318904", "0.55280584", "0.54982245", "0.54933566", "0.54908407", "0.5484696", "0.5463976", "0.5456487", "0.54548675", "0.5446342", "0.5442429", "0.54329306", "0.54279375", "0.5416543", "0.54037905", "0.53993505", "0.5397463", "0.539077", "0.5389832", "0.5389706", "0.5385158", "0.5374205", "0.53737867", "0.5372252", "0.5371694", "0.53694654", "0.53656244", "0.53621507", "0.5360405", "0.53587914", "0.5346743", "0.5333542", "0.53280526", "0.532581", "0.53240407", "0.5321359", "0.5319202", "0.53174525", "0.5314746", "0.53117865", "0.5309824", "0.53085274", "0.5307233", "0.5306031", "0.5303506", "0.5297823" ]
0.85875165
0
CHANGED for HW 4: Now checking pile type input for null. Also changed the check for if a card could be removed from the source pile. Instead of relying on a method canRemoveCard(int cardIdx) in the pile classes that took a card index and determined if the card at that index could be removed, now the check just determines 2 things: 1. if the pile has a card at that index and 2. if there is no card at the next highest index (because in that case, cardIndex would be idx of last card) This is because canRemoveCard was putting too much of the FreeCellModel implementation responsibility into the pile classes. Only the model should determine if a card at a certain point in the pile can be removed.
@Override public void move(PileType sourceType, int sourcePileNumber, int cardIndex, PileType destType, int destPileNumber) throws IllegalArgumentException { if (!gameStarted) { throw new IllegalStateException("Cannot make move, game has not started"); } if (sourcePileNumber < 0 || destPileNumber < 0) { throw new IllegalArgumentException("Invalid pile number"); } if (Objects.isNull(sourceType) || Objects.isNull(destType)) { throw new IllegalArgumentException("Null pile type"); } IPile sourcePile = this.getPile(sourceType, sourcePileNumber); IPile destPile = this.getPile(destType, destPileNumber); // If the card index refers to the last card in the source pile, try the move. if (sourcePile.hasCardAt(cardIndex) && !sourcePile.hasCardAt(cardIndex + 1)) { // If the card is to be moved from and to the same pile, // allow this if the card is the last card in the pile. // Otherwise, it implies that user is trying to move card from inside pile, // which is still illegal. if ((sourceType == destType) && (sourcePileNumber == destPileNumber)) { // In this case, nothing should be moved. return; } // Try to do the move normally if the source and destination piles are not the same. Card temp = sourcePile.getCard(cardIndex); if (destPile.canAddCard(temp)) { destPile.addCard(temp); sourcePile.removeCard(cardIndex); } else { throw new IllegalArgumentException("Cannot add card to pile"); } } else { throw new IllegalArgumentException("Cannot remove card from pile"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public interface IPile<ICard> {\n\n /**\n * Adds an ICard to the top of the pile.\n *\n * @param card represnts the ICard to be added to the pile.\n */\n void pushCard(ICard card);\n\n /**\n * Removes an ICard from the top of the pile.\n *\n * @throws IllegalStateException when there are no cards to remove.\n */\n void popCard() throws IllegalStateException;\n\n /**\n * Moves a card from 'this' pile onto the 'other' pile.\n *\n * @param other represents the pile to be added to.\n * @throws IllegalArgumentException when 'this' card cannot be added to 'other' pile.\n */\n void move(IPile<ICard> other) throws IllegalArgumentException;\n\n /**\n * Returns an ICard at a specific index within the pile.\n *\n * @param cardIndex the index at which the card exists within the pile.\n * @return the ICard at the index specified.\n * @throws IllegalArgumentException when the index of the card is invalid.\n */\n ICard getCard(int cardIndex) throws IllegalArgumentException;\n\n /**\n * Returns an ICard from the top of the pile.\n *\n * @return the ICard that exists at the top of the pile.\n * @throws IllegalArgumentException when there are no cards to get from the pile (i.e. the pile is\n * empty).\n */\n ICard getTopCard() throws IllegalArgumentException;\n\n /**\n * Determines if the passed-in ICard can be added to 'this' pile.\n *\n * @param toBeAddedCard is the ICard to be added to 'this' pile.\n * @return true if the ICard parameter can be added to 'this' pile and false otherwise.\n */\n boolean canBeAdded(ICard toBeAddedCard);\n\n /**\n * Determines if the ICard at the specified index can be removed.\n *\n * @param cardIndex is the index of the ICard to be removed from the pile.\n * @return true if the ICard at the specified index may be removed and false otherwise.\n */\n boolean canBeRemoved(int cardIndex);\n\n /**\n * Gets the number of ICards within the pile.\n *\n * @return the integer value of the number of ICards in the pile.\n */\n int getNumCards();\n\n /**\n * Determines if the pile full of ICards is full or not.\n *\n * @return true if the pile cannot accept any more ICards\n */\n boolean isFull();\n\n /**\n * Checks the sequence of cards obeys the rules set for each pile.\n *\n * @return true if all the rules were followed and false otherwise.\n */\n boolean isPileValid();\n\n}", "public boolean removeCard(HomeCellSpider x, Card top) {\n \tpiles= x.piles;\n \tif(piles.get(piles.size()-1) == top) {//check to see if top is really the top card of the homecellpile\n \t\tpiles.remove(piles.size()-1);//if so remove it and decrease the overall cardCounter\n \tcardCounter--;\n \treturn true;\n \t}else {\n \t\treturn false; // only top card can be removed\n \t}\n }", "public static void main(String[] args) throws StackFullException, StackEmptyException {\n\t try {\n\t DiscardPile<Card> discardPile1 = null; \n\t\tdiscardPile1 = new DiscardPile<Card>(52, 0);// max is 52\n\t\tdiscardPile1.push(new Card(8));\n\t\tdiscardPile1.push(new Card(32));\n\t\tdiscardPile1.push(new Card(48));\t\t\n\t\tdiscardPile1.push(new Card(2));\n\t\tdiscardPile1.push(new Card(17));\n\t\tdiscardPile1.push(new Card(20)); //removeTopCard should remove all that's above\n\t\tdiscardPile1.push(new Card(25));\n\t\tdiscardPile1.push(new Card(50));\n\t\tdiscardPile1.push(new Card(19));\n\t\tdiscardPile1.push(new Card(41)); //10 Cards that must be popped\n\t\tSystem.out.println(\"*********************************************************************************\"); \n\t\tCollections.reverse(discardPile1);\n\t\tfor(Card comi : discardPile1) { //for loop for objects\n\t\t\tSystem.out.println(comi);\n\t\t\t}\t\t\t\n\t }\n\t catch (StackFullException SFE) {\n\t System.out.println(\"StackFullException: \" + SFE.getMessage());\n}\n\t try {\n\t\t\tDiscardPile<Card> discardPile = null; \n\t\t\tdiscardPile = new DiscardPile<Card>(52, 0);\n\t\t\tdiscardPile.push(new Card(8));\n\t\t\tdiscardPile.push(new Card(32));\n\t\t\tdiscardPile.push(new Card(48));\t\t\n\t\t\tdiscardPile.push(new Card(2));\n\t\t\tdiscardPile.push(new Card(17));\n\t\t\tdiscardPile.push(new Card(20)); //removeTopCard should remove all that's above\n\t\t\tdiscardPile.push(new Card(25));\n\t\t\tdiscardPile.push(new Card(50));\n\t\t\tdiscardPile.push(new Card(19));\n\t\t\tdiscardPile.push(new Card(41)); //10 Cards that must be popped\n\t\t\t \n\t\t\tSystem.out.println(\"*********************************************************************************\"); \n\t\t\t\n\t\t\tCard[] cardArr = discardPile.removeTopCard(new Card(20));\n\t\t\tfor(Card co : cardArr) { //for loop for objects\n\t\t\t\tSystem.out.println(co);\n\t\t\t\t}\t\t\n\t\t\tSystem.out.println(\"*********************************************************************************\"); \n\n\t\t }\n\t\t catch (StackFullException SFE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SFE.getMessage());\n\t\t }\n\t\t catch (StackEmptyException SEE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SEE.getMessage());\n\t\t }\n\t try {\n\t\t\tDiscardPile<Card> discardPile = null; \n\t\t\tdiscardPile = new DiscardPile<Card>(52, 0);\n\t\t\tdiscardPile.push(new Card(8));\n\t\t\tdiscardPile.push(new Card(32));\n\t\t\tdiscardPile.push(new Card(48));\t\t\n\t\t\tdiscardPile.push(new Card(2));\n\t\t\tdiscardPile.push(new Card(17));\n\t\t\tdiscardPile.push(new Card(20)); //removeTopCard should remove all that's above\n\t\t\tdiscardPile.push(new Card(25));\n\t\t\tdiscardPile.push(new Card(50));\n\t\t\tdiscardPile.push(new Card(19));\n\t\t\tdiscardPile.push(new Card(41)); //10 Cards that must be popped\n\t\t\t \n\t\t\t\n\t\t\tCard[] cardArr = discardPile.removeTopCard(new Card(50));\n\t\t\tfor(Card co : cardArr) { //for loop for objects\n\t\t\t\tSystem.out.println(co);\n\t\t\t\t}\t\t\n\t\t\tSystem.out.println(\"*********************************************************************************\"); \n\n\t\t }\n\t\t catch (StackFullException SFE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SFE.getMessage());\n\t\t }\n\t\t catch (StackEmptyException SEE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SEE.getMessage());\n\t\t }\n\n}", "private List<ICard> removeFromSource(List<IPile<ICard>> sourcePileList, int pileNumber,\n int cardIndex) throws IllegalArgumentException, IllegalStateException {\n // validate the given pile number and card index\n this.isValidPileIndex(sourcePileList, pileNumber);\n IPile<ICard> pile = sourcePileList.get(pileNumber);\n this.isValidCardIndex(pile, cardIndex);\n List<ICard> cards = pile.getPile();\n List<ICard> build = new ArrayList<>(cards.subList(cardIndex, cards.size()));\n this.isValidBuild(build);\n\n // remove the build from the source pile\n int size = cards.size();\n for (int i = cardIndex; i < size; i++) {\n pile.remove();\n }\n return build;\n }", "@Override\n public boolean canGetCardsFromThePile(int cardIndex, List<Card> sourcePile) {\n if (cardIndex < 0 || cardIndex >= sourcePile.size()) {\n return false;\n }\n\n if (!ifEnoughCascadeAndOpenPilesAreEmpty(sourcePile.size() - cardIndex)) {\n return false;\n }\n return doSourcePileCardsFormValidBuild(Utils.sliceList(sourcePile, cardIndex));\n }", "boolean canBeRemoved(int cardIndex);", "public interface CardPile {\n\n /**\n * Add the cards to the pile.\n *\n * @param cards the cards to add\n */\n void add(Set<Card> cards);\n\n /**\n * Removes, and returns, all the cards in the pile.\n *\n * @return the cards from the pile\n */\n Set<Card> remove();\n\n}", "@Test\r\n public void testRemove() {\n Game g = new Game();\r\n g.customDeal(0, 3, 6, 9);\r\n g.remove(2);\r\n assertEquals(0, g.columns.get(2).cards.size());\r\n }", "public boolean play(DiscardPile discardPile, \n\t Stack<Card> drawPile, \n\t\t\t\t\t\t\t\t\t\t\tArrayList<Player> players)\n\t{\t\n\t\n\t\n\tSystem.out.println(\"Before playing: \" + this.hand.toString());\n\t\tboolean temp = false;\n\t\tString suitEight = \"xyz\";\n\t\n\t\tif ((discardPile.top()).getRank() == 4 && super.checker_4 == true){\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"\\t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \");\n\t\t\tSystem.out.println(\"\\t | skipping the turn.. :( |\");\n\t\t\tSystem.out.println(\"\\t -----------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tsuper.checker_4 = false;\n\t\t\treturn false;\n\t\t\t\n\t\t\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t/* adding two cards */\n\t\t if ((discardPile.top()).getRank() == 2 && super.checker_2 == true){\n\t\t\t \n\t\t\t System.out.println();\n\t\t\t System.out.println(\"\\t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \");\n\t\t\t System.out.println(\"\\t | twice the value added! |\");\n\t\t\t System.out.println(\"\\t -----------------------------\");\n\t\t\t System.out.println();\n\t\t\t System.out.println();\n\t\t\t \n\t\t\t \n\t\t\tthis.hand.add(drawPile.pop());\n\t\t\t this.hand.add(drawPile.pop());\n\t\t\ttemp = false;\n\t\t\tsuper.checker_2 = false;\n\t\t }\n\t\t\n\t\t\n\t\t \n\t\t\n\t\telse{\n\t\t\tint i = location_1(discardPile);\n\t\t\t\n\t\t\t\n\t\t\tif(i == -1){\n\t\t\t\tthis.hand.add(drawPile.pop());\n\t\t\t\tif( i == location_2(discardPile)){ \n\t\t\t\t\t//System.out.println(\"value is added!\");\n\t\t\t\t\t//System.out.println();\n\t\t\t\t\t//System.out.println();\n\t\t\t\t\n\t\t\t\t} else{\n\t\t\t\t\ti = location_2(discardPile);\n\t\t\t\t\t//System.out.println(\"HAHA! got it!\");\n\t\t\t\t\tdiscardPile.add(this.hand.remove(i));\n\t\t\t\t\ttemp = false;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ((discardPile.top()).getRank() == 2 && super.checker_2 == false){\n\t\t\t\t\t\tsuper.checker_2 = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(discardPile.top().getRank() == 4 && super.checker_4 == false){\n\t\t\t\t\t\tsuper.checker_4 = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((discardPile.top()).getRank() == 8 && temp == false){\n\t\t\t\t\t\tsuitEight = this.wildEight(discardPile, drawPile, players);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t Changing the suit to: \" + suitEight);\n\t\t\t\t\t\tSystem.out.print(\"\\t \\t \\t Processing....\");\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\tSystem.out.println();\n\t\t\t\t\t\t(discardPile.top()).setSuit(suitEight);\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t draw pile : \" + drawPile.peek() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t discard pile : \" + discardPile.top() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println();\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\t\n\t\t\t\t\t\n\t\t\t\t\tif( this.hand.size() == 0 ){\n\t\t\t\t\ttemp = true;\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}\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else{\n\t\t\t\tdiscardPile.add(this.hand.remove(i));\n\t\t\t\ttemp = false;\n\t\t\t\t\n\t\t\t\tif ((discardPile.top()).getRank() == 2 && super.checker_2 == false){\n\t\t\t\t\t\tsuper.checker_2 = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(discardPile.top().getRank() == 4 && super.checker_4 == false){\n\t\t\t\t\tsuper.checker_4 = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((discardPile.top()).getRank() == 8 && temp == false){\n\t\t\t\t\t\tsuitEight = this.wildEight(discardPile, drawPile, players);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t Changing the suit to: \" + suitEight);\n\t\t\t\t\t\tSystem.out.print(\"\\t \\t \\t Processing....\");\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\tSystem.out.println();\n\t\t\t\t\t\t(discardPile.top()).setSuit(suitEight);\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t draw pile : \" + drawPile.peek() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t discard pile : \" + discardPile.top() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println();\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( this.hand.size() == 0 ){\n\t\t\t\t\ttemp = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\n\t\t\n\t\t\n\t\n\t\tSystem.out.println(\"After Playing: \" + this.hand.toString());\n\t\tSystem.out.println();\n\t\treturn temp;\n\t\t\n\t\n\t}", "@Test\r\n public void testRemoveFromHand() {\r\n Player player = new Player();\r\n boolean expResult = false;\r\n boolean result = player.removeFromHand(0);\r\n assertEquals(expResult, result);\r\n \r\n Stack stack=new Stack(false);\r\n player.setHand(stack.drawTiles(2));\r\n player.removeFromHand(0);\r\n ArrayList <Tile> temp=player.getHand();\r\n Tile tile=new Tile(0,1);\r\n \r\n boolean expResult2=true;\r\n boolean result2=(player.getHand().get(0).getHead()==0 && player.getHand().get(0).getTail()==1);\r\n assertEquals(expResult2, result2);\r\n \r\n \r\n \r\n \r\n }", "public void removePresentCard() {\n storageCards.remove();\n }", "public void addCardsToDiscardPile(List<Card> cards) {\r\n discardPile.addAll(cards); // TODO: this triggers a nullpointerexception ( ava.lang.NullPointerException: Attempt to invoke interface method 'int java.util.Collection.size()' on a null object reference\r\n // at java.util.LinkedList.addAll(LinkedList.java:386)\r\n // at ch.ethz.inf.vs.a4.minker.einz.model.GlobalState.addCardsToDiscardPile(GlobalState.java:158) )\r\n discardPile.subList(Math.max(0, discardPile.size() - maxDiscardPileSize), discardPile.size());\r\n }", "public void setPlayerDeckByCardType(List<CardModel> cards, EnumHandler.CardType cardType, int numbeOfUnits) {\n ArrayList<CardModel> playerCards=playerModel.getDeck();\n ArrayList<CardModel> playerCardsToRemove=new ArrayList<CardModel>();\n int cardCounter=0;\n if(cards!=null){\n\n for (int i = 0; i < playerCards.size(); i++){\n if(playerCards.get(i).getCardType() == cardType && cardCounter<numbeOfUnits){\n playerCardsToRemove.add(playerCards.get(i));\n cardCounter=cardCounter+1;\n }\n }\n if(playerCardsToRemove.size() > 0) {\n playerCards.removeAll(playerCardsToRemove);\n }\n cardCounter=0;\n }\n\n\n /// CardModel card = cards.stream().filter(x -> x.getCardType().equals(cardType)).findFirst().get();\n// if (card != null) {\n// //card.setNumberOfCards(card.getNumberOfCards() - numbeOfUnits);\n// }\n\n }", "public void dealCardsToPile()\n {\n // Set the first initial computer card to display\n computerCard = highCardGame.getCardFromDeck();\n\n // Sets the first initial player card\n playerCard = highCardGame.getCardFromDeck();\n }", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "@Test\n public void testRemoveCard() {\n d_gameData.getD_playerList().get(1).addCard(GameCard.BOMB);\n d_gameData.getD_playerList().get(1).removeCard(GameCard.BOMB);\n assertEquals(false, d_gameData.getD_playerList().get(1).getD_cards().contains(GameCard.BOMB));\n }", "@Test\n\tpublic void homeCellCorrectlyReturns() {\n\t\tPile Test = new Pile(\"BDH\");\n\t\tassertFalse(Test.removeCard());\n\t\tTest.addCard(new Card(5, 3));\n\t\tassertFalse(Test.removeCard());\n\t}", "@Override\n public boolean remove() {\n if(this.getSize() == 0){\n return false;\n } else{\n bankArrays[this.numBanks-1] = null;\n numBanks--;\n return true;\n }\n\n }", "protected boolean canRemove(int row, int card) {\r\n return super.canRemove(row, card);\r\n }", "public void applyCard(Card card, String user){\n if (user.equals(\"player\")){\n if (card == null){\n //System.out.println(\"No card in this slot\");\n //System.out.println(\"Size of tempDeck: \" + playerTempDeck.size());\n } else{\n if(playerMana >= card.getManaCost()){\n updateMana(\"player\", -card.getManaCost());\n //Check if has enough gold, too. Make free cards have a worth of gold = 0.\n //playerGoldAmount -= card.getGoldCost(); //------------------------------------------------Implement this once it can be tested.\n\n if(card.getEffect().contains(\"A\")){ //attack\n //looks long, but it finds the index of the Attack symbol (\"A\") and adds one to it, so it'll find the value 5 if the input is \"A5\", anywhere on the string.\n //Allows for things such as \"A4D1\" in theory.\n updateHealth(\"enemy\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) { //Defend\n updateDefence(\"player\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n\n //Discard the card just used, put into discarded pile.\n Integer index = playerHand.indexOf(card);\n discardedCards.add(card);\n //System.out.println(\"Current index is: \" + index);\n //System.out.println(\"At that index was: \" + playerHand.get(index));\n playerHand.set(index, null);\n\n\n //System.out.println(\"The deck is currently: \" + playerHand.toString());\n //playerHand.remove(card); //Doesn't work, shortens the size all together.\n drawCard(index);\n }\n }\n }\n\n else if (user.equals(\"enemy\")){\n if(enemyMana >= card.getManaCost()){\n updateMana(\"enemy\", -card.getManaCost());\n if(card.getEffect().contains(\"A\")){\n updateHealth(\"player\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) {\n updateDefence(\"enemy\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n }\n }\n }", "public void discard(Card card) {\n discardPile.add(card);\n }", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public void addCardToDiscardPile(Card card) {\r\n discardPile.add(card);\r\n if (discardPile.size() > maxDiscardPileSize) {\r\n discardPile = discardPile.subList(1, discardPile.size());\r\n }\r\n }", "@Test\n\tpublic void freeCellCorrectlyReturnsTest() {\n\t\tFreeCell obj = new FreeCell();\n\t\tCard obj1 = new Card(1, 0);\n\t\t// Assert that cards can't be removed from a empty homecell pile\n\t\tassertFalse((obj.getHomeCellPile(1)).removeCard());\n\t\t// Add an ace to the empty homecell\n\t\tobj.getHomeCellPile(1).addCard(obj1);\n\t\t// Assert that cards can't be removed from a homecell pile\n\t\tassertFalse((obj.getHomeCellPile(1)).removeCard());\n\t}", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "private boolean checkformultiFaceUp(Card card) {\n if (!canAddToPile(card.getValue())) {\n return false;\n }\n\n // checking how many card of the same value as card played are in players hand\n int amountinhand = 0;\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null)\n if (hand.getFaceUp(n).getValue() == card.getValue()) amountinhand++;\n }\n if (amountinhand <= 1) return false;\n MultiCardD dialog = new MultiCardD(sh, amountinhand);\n int numbertoplay = dialog.getChoice();\n if (numbertoplay <= 1) return false;\n String command = \"turn:faceup:multi:\" + numbertoplay + \":\" + card.getNumber() + \":\";\n pile.add(card);\n numbertoplay--;\n int toberemovedcount = 0;\n int toberemoved[] = new int[3];\n for (int n = 0; n < 3; n++) toberemoved[n] = -1;\n for (int n = 0; n < 3; n++)\n if (hand.getFaceUp(n) != null) {\n if (numbertoplay <= 0) break;\n if (card.getValue() == hand.getFaceUp(n).getValue()\n && card.getNumber() != hand.getFaceUp(n).getNumber()) {\n command = command.concat(hand.getFaceUp(n).getNumber() + \":\");\n pile.add(hand.getFaceUp(n));\n // storing which card are to be removed\n toberemoved[toberemovedcount] = hand.getFaceUp(n).getNumber();\n toberemovedcount++;\n numbertoplay--;\n }\n }\n // removing card from hand\n for (int n = 0; n < 3; n++) {\n if (toberemoved[n] == -1) break;\n for (int i = 0; i < 3; i++)\n if (hand.getFaceUp(i) != null)\n if (hand.getFaceUp(i).getNumber() == toberemoved[n]) {\n hand.removeFaceUp(i);\n break;\n }\n }\n // sending command\n sendCommand(command);\n // checking for 4 of a kind\n if (pile.isFourOfAKind() || pile.topValue() == 10) {\n burnPile();\n sh.addMsg(\"You burn the pile is your turn again\");\n } else {\n sh.setmyTurn(false);\n nextTurn();\n }\n return true;\n }", "void dropcard3()\n{\nfor (int i=0;i<numberofhc()-1;i++)\n\t{\n\tint judgeA = (getcard(i)-3)/4;\n\t\n\tif(judgeA==12)\n\t\t{\n\t\tif(getcard(i)==54 && getcard(i+1)==54) //if the player has 2 SA, he/she can drop both\n\t\t\t{\n\t\t\tremove(i);\n\t\t\tremove(i);\n\t\t\ti--;\n\t\t\t}\n\t\telse if(getcard(i)==51 && getcard(i+1)==52) //if the player has CA and DA, he/she can drop both\n\t\t\t{\n\t\t\tremove(i);\n\t\t\tremove(i);\n\t\t\ti--;\n\t\t\t}\n\t\telse if(getcard(i)==51 && getcard(i+1)==53) //if the player has CA and HA, he/she can drop both\n\t\t\t{\n\t\t\tremove(i);\n\t\t\tremove(i);\n\t\t\ti--;\n\t\t\t}\n\t\telse if(getcard(i)==52 && getcard(i+1)==53) //if the player has DA and HA, he/she can drop both\n\t\t\t{\n\t\t\tremove(i);\n\t\t\tremove(i);\n\t\t\ti--;\n\t\t\t}\n\t\t}\n\telse\n\t\t{if((((getcard(i))-3)/4)==(((getcard(i+1))-3)/4))\n\t\t\t{remove(i);\n\t\t\tremove(i);\n\t\t\ti--;}}\n\t}\n\t}", "private void removeCards(int pileNumber, List<Card> build) {\n List<Card> pile = cascadePiles.get(pileNumber);\n for (Card c : build) {\n pile.remove(c);\n }\n }", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "public boolean remove(Card x) {\n if (head == null)\n return false;\n \n // Remove the first element, if necessary.\n if (head.data.ValueIn == x.ValueIn && !(head.data.suit.compareTo(\"x.suit\") == 0)) {\n head = head.next;\n return true;\n }\n\n // Set up helper reference to refer to the Node right before the Node\n // to be deleted would be stored.\n Node helper = head; \n while ((helper.next != null) && (helper.next.data.ValueIn < x.ValueIn)) \n helper = helper.next;\n\n // If x was too big to be on the list, simply return false.\n if (helper.next == null)\n return false;\n\n // Only if the appropriate Node stores x should it be deleted.\n if (helper.next.data.ValueIn == x.ValueIn) {\n helper.next = helper.next.next;\n return true;\n } \n\n return false; // Case where x is not found.\n }", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "@Test\n\tpublic void freeCellCorrectlyAddingTest(){\n\t\tFreeCell obj = new FreeCell();\n\t\t// Creates a queen of hearts card object\n\t\tCard obj1 = new Card(12, 2);\n\t\t// Creates a ace of spades card object\n\t\tCard obj2 = new Card(1, 3);\n\t\t// Creates a 2 of spades card object\n\t\tCard obj3 = new Card(2, 3);\n\t\t// Creates a 3 of hearts card object\n\t\tCard obj4 = new Card(3, 2);\n\t\t// Creates a 4 of spades card object\n\t\tCard obj5 = new Card(4, 3);\n\t\t// Creates a 3 of spades card object\n\t\tCard obj6 = new Card(3, 3);\n\t\t// Assert it's illegal to add a queen of hearts because the pile is empty \n\t\tassertFalse(obj.getHomeCellPile(1).addCard(obj1));\n\t\t// Assert it's legal to add an ace of spades\n\t\tassertTrue(obj.getHomeCellPile(1).addCard(obj2));\n\t\t// Assert it's legal to add a value one more than homecell's top card\n\t\tassertTrue(obj.getHomeCellPile(1).addCard(obj3));\n\t\t// Assert it's illegal to add card without the identical suit \n\t\tassertFalse(obj.getHomeCellPile(1).addCard(obj4));\n\t\t/* Assert it's illegal to add card with identical suit, \n\t\t * but not a value one more than the homecell's top card\n\t\t */\n\t\tassertFalse(obj.getHomeCellPile(1).addCard(obj5));\n\t\t/* Assert it's legal to add card with identical suit\n\t\t * and a value one more than the homecell's top card \n\t\t */\n\t\tassertTrue(obj.getHomeCellPile(1).addCard(obj6));\n\t\t\n\t}", "private void removeCard() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC ID number you'd like to remove:\");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input sic_idHolder\n\t\tscan.nextLine();\n\t\t\n\t\tinventoryObject.removeStockIndexCard(sic_idHolder); //calls removeStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t}", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "public List<Blockade> move(PlayingPiece playingPiece, List<Card> cards, HexSpace moveTo) {\n System.out.println(\"Executing move\");\n System.out.println(myTurn());\n\n // is it the players turn\n if (!myTurn()) {\n return new ArrayList<>();\n }\n // are the cards in the hand\n for (Card card : cards) {\n if (!this.handPile.contains(card)) {\n System.out.println(\"hand wrong\");\n return new ArrayList<>();\n }\n }\n // does the player own this playingpiece\n if (!this.playingPieces.contains(playingPiece)) {\n return new ArrayList<>();\n }\n this.removableBlockades = new ArrayList<>(); // parentblockadesID the player can remove in this turn\n Memento memento = board.getMemento();\n // validates if cards and playingpieces are the same for wich the pathfinder was exectued, if not redo pathfinder\n if (!(playingPiece == memento.getPlayingPiece() && cards.equals(memento.getSelectedCards()))) {\n Pathfinder.getWay(board, cards, playingPiece);\n }\n Set<HexSpace> reachables = new HashSet<>(memento.getReachables());\n System.out.println(reachables);\n if (reachables.contains(moveTo)) {\n System.out.println(\"reachables Contains moveto\");\n HexSpace oldPosition = playingPiece.getStandsOn();\n playingPiece.setStandsOn(moveTo);\n for (Card card : cards) {\n card.moveAction(this, moveTo); // for history\n }\n for (HexSpace hexSpace : moveTo.getPrevious()) {\n if (hexSpace.getClass() == BlockadeSpace.class && hexSpace.getStrength() != 0) {\n // if you directly move over blockade\n autoRemoveBlockade(((BlockadeSpace) hexSpace).getParentBlockade());\n }\n }\n searchForRemovableBlockades(playingPiece, cards, moveTo, oldPosition);\n this.board.getMemento().reset(this.board); // reset memento after moving\n }\n if (playingPiece.getStandsOn().getColor() == COLOR.ENDFIELDJUNGLE ||\n playingPiece.getStandsOn().getColor() == COLOR.ENDFIELDRIVER) {\n if (board.getElDoradoSpaces().size() > 0) {\n playingPiece.setStandsOn(board.getElDoradoSpaces().get(0));\n board.getElDoradoSpaces().remove(board.getElDoradoSpaces().get(0));\n //List<HexSpace> newEldoradoSpaces = board.getElDoradoSpaces().subList(0,Math.max(board.getElDoradoSpaces().size()-2,0));\n //board.setElDoradoSpaces(newEldoradoSpaces);\n }\n boolean won = true;\n for (PlayingPiece piece : this.playingPieces) {\n won = won && (piece.getStandsOn().getColor() == COLOR.ELDORADO || piece == playingPiece);\n }\n if (won) {\n this.board.getWinners().add(this);\n }\n }\n return new ArrayList<>(blockadeIdsToBlockades(this.removableBlockades));\n }", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "@Override\n void pickCard() {\n\n boolean suitFound = false; // true if player has the suit\n Card cardToBeat; // strongest card on pile\n Card pickedCard = null; // card to throw\n ArrayList<Card> cardsToChooseFrom = new ArrayList<Card>();\n char trump = pitchTable.getTrump();\n\n // find the strongest card on pile\n cardToBeat = pitchTable.getCardToBeat();\n\n // if pile is empty\n if (cardToBeat == null){\n // pick the strongest non trump card\n for (Card card : hand)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n\n // if non trump card not found (means all cards are trump)\n // then pick the strongest card\n if (pickedCard == null)\n for (Card card : hand)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n }\n else { // means leading suit is set already\n // check if player has suit\n for (Card card : hand) {\n if (card.suit == pitchTable.getLeadingSuit())\n suitFound = true;\n }\n\n // if player does not have suit he can play any card\n if (!suitFound)\n cardsToChooseFrom = hand;\n else // if player has suit then cardsToChooseFrom = allowed cards\n for (Card card : hand)\n if ((card.suit == pitchTable.getLeadingSuit()) ||\n card.suit == pitchTable.getTrump())\n cardsToChooseFrom.add(card);\n }\n\n // try to take the trick with the lowest winning card\n // if no winning card then throw the lowest you have\n\n // (trying to take the trick)\n // if card not picked yet\n // then find the lowest card that has the suit and is higher than cardToBeat\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((cardToBeat.suit == card.suit) && (cardToBeat.rank < card.rank))\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to take the trick)\n // if card not picked yet and cardToBeat is not trump\n // then find the lowest trump\n if ((pickedCard == null) && (cardToBeat.suit != trump))\n for (Card card : cardsToChooseFrom)\n if (card.suit == trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means player cannot take the trick)\n // then throw the lowest non trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means all allowed cards are trump)\n // then throw the lowest trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n if (pickedCard == null)\n System.out.println(\"Error: picked card still null\");\n\n pitchTable.putOnPile(pickedCard);\n hand.remove(pickedCard);\n\n }", "@Override\n public void playGame(List<Card> deck, FreecellOperations<Card> model, int numCascades,\n int numOpens, boolean shuffle) throws IllegalArgumentException, IOException {\n if (deck == null || model == null) {\n throw new IllegalArgumentException(\"Cannot start game with empty model or deck\");\n }\n // Scanner to read input.\n Scanner sc = new Scanner(this.rd);\n // Start the game with the given parameters, return if the parameters are bad.\n try {\n model.startGame(deck, numCascades, numOpens, shuffle);\n } catch (IllegalArgumentException e) {\n ap.append(\"Could not start game.\");\n return;\n }\n while (!model.isGameOver()) {\n // initialize variables for move\n PileType source;\n int sourcePileNumber;\n int cardIndex;\n PileType destination;\n int destPileNumber;\n\n // Print the current game state\n ap.append(model.getGameState());\n ap.append(\"\\n\");\n\n // get the source pile as a string\n String sourceString = sc.next();\n\n // Check if the source pile given is valid. If not, keep re-prompting until a valid one is\n // entered\n while (!isValidPile(sourceString)) {\n ap.append(\"\\nInvalid source. Please input again.\");\n sourceString = sc.next();\n }\n\n // Quit the game if the value is Q\n if (isPileStringQuitSignal(sourceString)) {\n ap.append(\"\\nGame quit prematurely.\");\n return;\n }\n\n // Set the piletype and pilenumber variables\n source = getPileType(sourceString);\n sourcePileNumber = getPileNumber(sourceString) - 1;\n\n // Similar logic for card index\n String cardIndexString = sc.next();\n\n while (!isValidCardIndex(cardIndexString)) {\n ap.append(\"\\nInvalid card index. Please input again.\");\n cardIndexString = sc.next();\n }\n\n if (cardIndexString.equals(\"q\") || cardIndexString.equals(\"Q\")) {\n ap.append(\"\\nGame quit prematurely.\");\n return;\n }\n\n cardIndex = Integer.valueOf(cardIndexString) - 1;\n\n // Similar logic for destination pile\n String destString = sc.next();\n\n while (!isValidPile(destString)) {\n ap.append(\"\\nInvalid destination. Please input again.\");\n destString = sc.next();\n }\n\n if (isPileStringQuitSignal(destString)) {\n ap.append(\"\\nGame quit prematurely.\");\n return;\n }\n\n destination = getPileType(destString);\n destPileNumber = getPileNumber(destString) - 1;\n\n // Try to make the move with the given parameters. If not possible, prompt user to try again\n try {\n model.move(source, sourcePileNumber, cardIndex, destination, destPileNumber);\n } catch (Exception e) {\n ap.append(\"\\nInvalid move. Try again. \" + e.getMessage());\n }\n }\n\n // If game is over, print game state and message and return\n ap.append(model.getGameState());\n ap.append(\"\\nGame over.\");\n }", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "Set<Card> remove();", "void dropcard()\n{\nfor (int i=0;i<hc.size()-1;i++)\n\t{\n\tif(hc.get(i)==1||hc.get(i)==2)\n\t\tcontinue;\n\telse if((((hc.get(i))-3)/4)==(((hc.get(i+1))-3)/4))\n\t\t{hc.remove(i);\n\t\thc.remove(i);\n\t\ti--;}\t\n\t}\n}", "public static boolean validateItemCardUsage(Model model, ItemCard card) {\n\n if (model.getCurrentPlayerReference().getCharacter() instanceof Alien) {\n return false;\n }\n\n Human player = (Human) model.getCurrentPlayerReference().getCharacter();\n if (card instanceof AdrenalineCard\n && player.getMaxAllowedMovement() == 2) {\n return false;\n }\n if (card instanceof AttackCard && player.isAttackAllowed()) {\n return false;\n }\n if (card instanceof SedativesCard && !player.hasToDrawSectorCard()) {\n return false;\n }\n Sector playerPosition = model.getMap().getSectors()\n .get(model.getCurrentPlayerReference().getLastPosition());\n if (card instanceof TeleportCard\n && playerPosition instanceof SpawnSector) {\n return false;\n }\n\n List<ItemCard> heldCards = model.getCurrentPlayerReference().getHand()\n .getHeldCards();\n for (ItemCard i : heldCards) {\n if ((card.getClass()).equals(i.getClass())) {\n heldCards.remove(i);\n return true;\n }\n }\n return false;\n\n }", "protected void removeItem(Item item, boolean moving) {\n/* 2393 */ if (this.vitems != null)\n/* */ {\n/* 2395 */ if (!this.vitems.isEmpty()) {\n/* */ \n/* 2397 */ if (item.getTemplateId() == 726)\n/* 2398 */ Zones.removeDuelRing(item); \n/* 2399 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* 2400 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2402 */ this.vitems.removePileItem(item.getFloorLevel());\n/* 2403 */ if (this.vitems.isEmpty())\n/* */ {\n/* */ \n/* 2406 */ this.vitems.destroy(this);\n/* 2407 */ this.vitems = null;\n/* */ }\n/* */ \n/* 2410 */ } else if (this.vitems.removeItem(item)) {\n/* */ \n/* */ \n/* 2413 */ this.vitems.destroy(this);\n/* */ \n/* 2415 */ this.vitems = null;\n/* 2416 */ if (pileItem != null)\n/* */ {\n/* 2418 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* */ }\n/* 2421 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(pileItem.getFloorLevel())) {\n/* */ \n/* 2423 */ if (!moving) {\n/* 2424 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* 2426 */ } else if (!item.isDecoration() && pileItem != null) {\n/* */ \n/* 2428 */ checkIfRenamePileItem(pileItem);\n/* */ } \n/* 2430 */ if (item.isDomainItem())\n/* 2431 */ Zones.removeAltar(item, moving); \n/* 2432 */ if (item.getTemplateId() == 1175 || item.getTemplateId() == 1239)\n/* 2433 */ Zones.removeHive(item, moving); \n/* 2434 */ if (item.getTemplateId() == 939 || item.isEnchantedTurret())\n/* 2435 */ Zones.removeTurret(item, moving); \n/* 2436 */ if (item.isEpicTargetItem())\n/* 2437 */ EpicTargetItems.removeRitualTargetItem(item); \n/* 2438 */ if (item.isKingdomMarker())\n/* */ {\n/* 2440 */ if (item.getTemplateId() != 328)\n/* 2441 */ Kingdoms.destroyTower(item); \n/* */ }\n/* 2443 */ if (item.getTemplateId() == 521) {\n/* */ \n/* 2445 */ this.zone.creatureSpawn = null;\n/* 2446 */ Zone.spawnPoints--;\n/* */ } \n/* 2448 */ if (this.village != null && item.getTemplateId() == 757)\n/* */ {\n/* 2450 */ this.village.removeBarrel(item);\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 2455 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* */ \n/* 2457 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2459 */ this.vitems.removePileItem(item.getFloorLevel());\n/* */ }\n/* 2461 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(item.getFloorLevel())) {\n/* */ \n/* 2463 */ destroyPileItem(item.getFloorLevel());\n/* */ } \n/* */ } \n/* */ }\n/* 2467 */ if (item.isFence()) {\n/* */ \n/* 2469 */ int offz = 0;\n/* */ \n/* */ try {\n/* 2472 */ offz = (int)((item.getPosZ() - Zones.calculateHeight(item.getPosX(), item.getPosY(), item\n/* 2473 */ .isOnSurface())) / 10.0F);\n/* */ }\n/* 2475 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 2477 */ logger.log(Level.WARNING, \"Dropping fence item outside zones.\");\n/* */ } \n/* 2479 */ float rot = Creature.normalizeAngle(item.getRotation());\n/* 2480 */ if (rot >= 45.0F && rot < 135.0F) {\n/* */ \n/* 2482 */ VolaTile next = Zones.getOrCreateTile(this.tilex + 1, this.tiley, (item\n/* 2483 */ .isOnSurface() || this.isTransition));\n/* 2484 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex + 1, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, next\n/* 2485 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2487 */ else if (rot >= 135.0F && rot < 225.0F) {\n/* */ \n/* 2489 */ VolaTile next = Zones.getOrCreateTile(this.tilex, this.tiley + 1, (item\n/* 2490 */ .isOnSurface() || this.isTransition));\n/* 2491 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley + 1, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, next\n/* 2492 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2494 */ else if (rot >= 225.0F && rot < 315.0F) {\n/* */ \n/* 2496 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, \n/* 2497 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ }\n/* */ else {\n/* */ \n/* 2501 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, \n/* 2502 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ } \n/* */ } \n/* */ \n/* 2506 */ sendRemoveItem(item, moving);\n/* 2507 */ if (!moving) {\n/* 2508 */ item.setZoneId(-10, this.surfaced);\n/* */ }\n/* */ }", "public void removeCard(Player player, AbstractCard card) { //throws exception\n\n for (Hand hand : hands)\n if (hand.getHandOwner().equals(player))\n hand.removeCard(card);\n\n }", "public void playRound() {\n int count = 0;\n boolean hasZeros = false;\n \n //remove one card from every pile\n for (int i = 0; i < numPiles; i++){\n count++;\n piles[i] -= 1;\n \n //checks the array for any zeros beforehand\n if (piles[i] == 0 && !hasZeros){\n hasZeros = true;\n }\n }\n \n // shift piles over if there is a zero in the pile and decreases the\n // amount of elements in the array\n if (hasZeros){\n for (int i = 0; i < numPiles; i++){\n while (piles[i] == 0 && i < numPiles){\n for (int a = i; a < numPiles - 1; a++){\n piles[a] = piles[a+1];\n }\n numPiles --;\n }\n }\n }\n \n // add the number of cards removed into the last pile in the array and\n // increase the number of elements in the array\n piles[numPiles] = count;\n numPiles++;\n \n //check if board is valid\n assert isValidSolitaireBoard();\n }", "public CardPile() {\n \n this.pila = new Stack<ICard>();\n this.tamano = 0;\n }", "public Card play7(){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which card ? (it should be 7 )\");\n cardIndex = scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex<=0 || cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(\"7\")))){\n System.out.println(\"! it is not a seven card !\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n\n\n }", "private boolean removeHead(){\n if(cellSize == 1){\n Head = null;\n }else{\n Head = Head.getNext();\n }\n cellSize--;\n return true;\n }", "public Pile getDiscardPile(){\n return piles.getDiscardPile();\n }", "public synchronized void collectCard(Card card){\n try{\r\n List<Player> pList = Arrays.asList(players);\r\n \r\n Iterator<Player> pIter = pList.iterator();\r\n while(pIter.hasNext()){\r\n //for(Player player: players){\r\n Player player = pIter.next();\r\n \r\n \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"Collect\");\r\n \r\n if(player.removeCard(card)){\r\n player.getRemoved().clear();\r\n \r\n getCardsPlayed().add(card);\r\n getCardsInPlay().remove(card);\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Collect ex: \" + ex);\r\n }\r\n \r\n }", "private boolean checkDeletion() {\n/* 4471 */ if (this.creatures == null || this.creatures.size() == 0)\n/* */ {\n/* 4473 */ if (this.vitems == null || this.vitems.isEmpty())\n/* */ {\n/* 4475 */ if (this.walls == null || this.walls.size() == 0)\n/* */ {\n/* 4477 */ if (this.structure == null)\n/* */ {\n/* 4479 */ if (this.fences == null)\n/* */ {\n/* 4481 */ if (this.doors == null || this.doors.size() == 0)\n/* */ {\n/* 4483 */ if (this.effects == null || this.effects.size() == 0)\n/* */ {\n/* 4485 */ if (this.floors == null || this.floors.size() == 0)\n/* */ {\n/* 4487 */ if (this.mineDoors == null || this.mineDoors.size() == 0) {\n/* */ \n/* 4489 */ this.zone.removeTile(this);\n/* 4490 */ return true;\n/* */ } \n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 4500 */ return false;\n/* */ }", "boolean isPileValid();", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.remove(piece);\n\n assertFalse(instance.getBagContent().contains(piece));\n\n }", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public void addToDiscardPile(Card card) {\n CardSprite sprite = card.getSprite();\n discardPile.add(sprite);\n gameDrawer.removeFromDrawList(sprite);\n gameDrawer.addToDrawList(sprite);\n }", "public V remove(K k) {\n int i = h(k);\r\n int z = i;\r\n int j = 0;\r\n while ((K)htable[i].key() != k) {\r\n i = (z + p(k, ++j)) % htable.length;\r\n if (j == htable.length) {\r\n return null;\r\n }\r\n while (htable[i] == null) {\r\n i = (z + p(k, ++j)) % htable.length;\r\n if (j == htable.length) {\r\n return null;\r\n }\r\n }\r\n }\r\n KVPair remove = htable[i];\r\n htable[i] = TOMBSTONE;\r\n size--;\r\n //resize table\r\n if (loadFactor() < 0.25 && (htable.length / 2) >= initCap) {\r\n KVPair[] temp = new KVPair[htable.length / 2];\r\n for (int y = 0; y < htable.length; y++) {\r\n if (htable[y] == null || htable[y] == TOMBSTONE) {\r\n continue;\r\n }\r\n i = (htable[y].key().hashCode() + temp.length) % temp.length;\r\n z = i;\r\n j = 0;\r\n while (temp[i] != null && temp[i] != TOMBSTONE) {\r\n i = (z + p(k, ++j)) % temp.length;\r\n if (j == temp.length) {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n temp[i] = htable[y];\r\n }\r\n htable = temp.clone();\r\n }\r\n return (V)remove.value();\r\n }", "private void setPlayerDeckByCardType(List<CardModel> cards, EnumHandler.CardType cardType) {\n ArrayList<CardModel> playerCards=playerModel.getDeck();\n ArrayList<CardModel> playerCardsToRemove=new ArrayList<CardModel>();\n int cardCounter=0;\n int cardsLimit=(3 * (cards.size()/ 3));\n if(cards!=null){\n\n for (int i = 0; i < playerCards.size(); i++){\n if(playerCards.get(i).getCardType() == cardType && cardCounter<cardsLimit){\n playerCardsToRemove.add(playerCards.get(i));\n cardCounter=cardCounter+1;\n }\n }\n if(playerCardsToRemove.size() >0) {\n playerCards.removeAll(playerCardsToRemove);\n }\n cardCounter=0;\n }\n }", "@Test\n public void testBombCard() {\n Player l_player = d_gameData.getD_playerList().get(0);\n l_player.getD_cards().add(GameCard.BOMB);\n l_player.getD_cards().add(GameCard.BOMB);\n// assertEquals(get.getD_cards().size(), 2);\n l_player.getD_cards().remove(GameCard.BOMB);\n boolean l_removed = l_player.getD_cards().remove(GameCard.AIRLIFT);\n assertEquals(l_removed, false);\n }", "public void removePrevCardList(){\n for (int i = 0; i < playerCardList.getPlayerCardListSize(); i++){\n playerCardPuzzle.getChildren().remove(playerCardList.getPlayerCardByNo(i));\n }\n }", "public abstract boolean play(DiscardPile discardPile, Stack<Card> drawPile, ArrayList<Player> players);", "public boolean moveCard(Card card, Pile pile)\n {\n if(!pile.isAllowed(card))\n return false;\n pile.push(card);\n return true;\n }", "public ArrayList<Player> checkToEliminate() {\n ArrayList<Player> eliminated = new ArrayList<Player>();\n\n // Check which players are to be eliminated\n for (Player player : playersInGame) {\n if (player.peekCard() == null) {\n eliminated.add(player);\n }\n }\n\n // Eliminate players from model\n for (Player eliminatedPlayer : eliminated) {\n playersInGame.remove(eliminatedPlayer);\n }\n\n return eliminated;\n }", "@Override\n public void removeCard(int i) {\n this.cards.remove(i);\n }", "public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}", "void check_missile_collisions() {\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n for (int j = aliens.size()-1; j >= 0; j --) {\n Alien alien = aliens.get(j);\n boolean hit = alien.checkMissileCollisions(missile);\n if (hit) {\n alien_destroyed_audio.play();\n\n // Move the missile off-screen to be deleted by delete_missiles()\n missile.moveOffScreen();\n\n // Update the score, speed up remaining aliens, remove the alien\n update_score(alien.points);\n Alien.speed_up();\n alien_audio_intervals = (long) (500000000 - (100000000 * Alien.alien_speed));\n ImageView alien_image_view = alien_image_views.get(j);\n game_pane.getChildren().remove(alien_image_view);\n alien_image_views.remove(j);\n aliens.remove(alien);\n break;\n }\n }\n }\n\n // Check if any alien missiles hit the ship\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n // Only check missiles that have reached the y-coordinate of the player\n if (missile.y_position+missile.missile_height >= ship.y_position) {\n boolean hit = ship.checkMissileCollisions(missile);\n if (hit) {\n ship_destroyed_clip.play();\n\n // Player loses a life\n lives -= 1;\n lives_text.setText(\"Lives: \" + lives);\n\n // Ship and missiles not respawn/removed for last life so that player can see how they died\n if (lives > 0){\n // Move the missile off-screen, deleted by delete_missiles()\n missile.moveOffScreen();\n ship_respawn();\n }\n break;\n }\n }\n }\n }", "public void remove( int position )\n {\n caller = \"remove\";\n byte byteSize = memoryPool[position];\n Integer size = (int)byteSize;\n // remove the record starting at the given position\n for ( int i = 0; i < size; i++ )\n {\n memoryPool[position + i] = 0;\n }\n\n findBlock( position );\n freeBlock = new HashMap<Integer, Integer>( 1 );\n freeBlock.put( position, size );\n freeBlockList.add( freeBlock );\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n int key = (Integer)keyArray[0];\n\n caller = \"check\";\n int currentValue = freeBlockList.getCurrentElement().get( key );\n int mergePoint1 = position + currentValue;\n int rightKeyMatch = findBlock( mergePoint1 );\n\n int mergePoint2 = position;\n int leftKeyMatch = -1;\n int priorValue = -1;\n int key2 = -1;\n if ( 1==1)\n {\n findBlock(mergePoint2);\n freeBlockList.previous();\n if ( !( freeBlockList.getCurrent().equals( freeBlockList.getHead() ) )\n && !( freeBlockList.getCurrent().equals( freeBlockList.getTail() ) ) &&\n !( freeBlockList.getCurrent().equals( null )))\n {\n Object[] keyArray2 =\n freeBlockList.getCurrentElement().keySet().toArray();\n key2 = (Integer)keyArray2[0];\n priorValue = freeBlockList.getCurrentElement().get( key2 );\n leftKeyMatch = key2 + priorValue;\n }\n\n }\n\n if ( rightKeyMatch == mergePoint1 )\n {\n findBlock(mergePoint1);\n freeBlockList.previous();\n freeBlockList.removeCurrent();\n int rightValue =\n freeBlockList.getCurrentElement().get( rightKeyMatch );\n\n freeBlockList.getCurrentElement().clear();\n freeBlockList.getCurrentElement().put(\n position,\n currentValue + rightValue );\n //if()\n }\n if(leftKeyMatch == mergePoint2) {\n findBlock(mergePoint2);\n freeBlockList.previous();\n freeBlockList.removeCurrent();\n int rightValue =\n freeBlockList.getCurrentElement().get(leftKeyMatch);\n\n freeBlockList.getCurrentElement().clear();\n freeBlockList.getCurrentElement().put(\n key2,\n priorValue + rightValue );\n }\n\n }", "public void removePapalCard(int i){\n this.gameboardPanel.removePapalCard(i);\n }", "public void RemoveCardFromComputer(int value){\n handComputer.remove(value);\n }", "public Team remove(){\r\n if(array[1] == null){\r\n return null;\r\n }\r\n Team r = array[1].value;\r\n nextAvail--;\r\n if(nextAvail == 1){\r\n array[nextAvail] = null;\r\n }\r\n else {\r\n array[1].value = array[nextAvail].value;\r\n array[nextAvail] = null;\r\n fixHeap();\r\n }\r\n return r;\r\n }", "@Override\n public boolean shouldDrawCard(Card topPileCard, Card.Suit changedSuit) {\n topCard = topPileCard;\n boolean drawCard = true;\n for (Card card : cardsInHand) {\n if (card.getSuit().equals(changedSuit) || card.getRank().equals(topPileCard.getRank())) {\n drawCard = false;\n break;\n }\n }\n return drawCard;\n }", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "private boolean removePieceFromBoardTile(Piece piece) {\n\n\t\tif(piece == null) return false; \n\t\tLocation pieceLoc = piece.getLocation();\n\n\t\tTile tile=null;\n\t\ttry {\n\t\t\ttile = getTileInLocation(pieceLoc);\n\t\t\ttile.setPiece(null);\n\t\t\tthis.replaceTileInSameTileLocation(tile);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public Optional<Card> dealOneCard() {\n if (cards.size() > 0) {\n return Optional.of(cards.remove(0));\n } else {\n return Optional.empty();\n }\n }", "private void discardRestrictedCards()\n\t{\n\t\tif (playerList.size() == 2)\n\t\t{\n\t\t\tfor(Card card : restrictedCard2PlayerList)\n\t\t\t{\n\t\t\t\tswitch (card.getType())\n\t\t\t\t{\n\t\t\t\t\tcase GreenPlayerCard:\n\t\t\t\t\tcase BrownPlayerCard:\n\t\t\t\t\t\tCard playerCardMatch = board.getPlayerCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (playerCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(playerCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase CityAreaCard:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PersonalityCard:\n\t\t\t\t\t\tCard personalityCardMatch = board.getPersonalityCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (personalityCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(personalityCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RandomEventCard:\n\t\t\t\t\t\tCard randomEventCardMatch = board.getRandomEventCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (randomEventCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(randomEventCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void visit(PlayCardMove move) {\n ICard cardToPlay = move.getCard();\n\n if (!isValidPlay(cardToPlay)) {\n return;\n }\n\n ArrayList<ICard> hand = hands.get(currentTurn);\n\n hand.remove(cardToPlay);\n discardPile.push(cardToPlay);\n\n // detect game over\n if (hand.size() == 0) {\n isGameOver = true;\n winner = currentTurn;\n }\n\n if (!isGameOver) {\n cardToPlay.onPlay(this);\n }\n }", "public void removeTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){\n playerHand.remove(i);\n break;\n }\n }\n }", "public void PSShot()\n\t{\n\t\t//collision can only occur if an enemy missile and a PlayerShip are spawned\n\t\tif(gameObj[1].size() > 0 && gameObj[3].size() > 0)\n\t\t{\n\t\t\tint mis = new Random().nextInt(gameObj[3].size());\n\t\t\tgameObj[1].remove(0);\n\t\t\tgameObj[3].remove(mis);\n\t\t\tlives--;\n\t\t\tSystem.out.println(\"An enemy missile has struck a PS -1 life\");\n\t\t\tif(lives >0) \n\t\t\t\tSystem.out.println(\"you have \" + lives + \" left\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Game over\");\n\t\t\t\tgameOver();\n\t\t\t}\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship and an enemy missile are not spawned\");\t\t\n\t}", "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 Piece remove (int x, int y){\n\t\tif (x < 0 || x > N || y < 0 || y > N){\n\t\t\tSystem.out.println(\"Off the board! (Out of Bounds)\");\n\t\t\treturn null;\n\t\t}\n\t\telse if (pieceAt(x,y) == null) {\n\t\t\tSystem.out.println(\"There isn't a piece here! (Null)\");\n\t\t\treturn null;\n\t\t}\t\n\t\telse{\n\t\t\tPiece temp = pieceArray[x][y];\n\t\t\tpieceArray[x][y] = null;\n\t\t\t\n\t\t\treturn temp;\n\t\t}\n\t}", "public List<Card> getDiscardPile() {\r\n return discardPile;\r\n }", "public void processMove(MahjongSolitaireMove move)\n {\n // REMOVE THE MOVE TILES FROM THE GRID\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[move.col1][move.row1];\n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[move.col2][move.row2]; \n MahjongSolitaireTile tile1 = stack1.remove(stack1.size()-1);\n MahjongSolitaireTile tile2 = stack2.remove(stack2.size()-1);\n \n // MAKE SURE BOTH ARE UNSELECTED\n tile1.setState(VISIBLE_STATE);\n tile2.setState(VISIBLE_STATE);\n \n // SEND THEM TO THE STACK\n tile1.setTarget(TILE_STACK_X + TILE_STACK_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile1.startMovingToTarget(MAX_TILE_VELOCITY);\n tile2.setTarget(TILE_STACK_X + TILE_STACK_2_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile2.startMovingToTarget(MAX_TILE_VELOCITY);\n stackTiles.add(tile1);\n stackTiles.add(tile2); \n \n // MAKE SURE THEY MOVE\n movingTiles.add(tile1);\n movingTiles.add(tile2);\n \n // AND MAKE SURE NEW TILES CAN BE SELECTED\n selectedTile = null;\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.MATCH_AUDIO_CUE.toString(), false);\n \n // NOW CHECK TO SEE IF THE GAME HAS EITHER BEEN WON OR LOST\n \n // HAS THE PLAYER WON?\n if (stackTiles.size() == NUM_TILES)\n {\n // YUP UPDATE EVERYTHING ACCORDINGLY\n endGameAsWin();\n }\n else\n {\n // SEE IF THERE ARE ANY MOVES LEFT\n MahjongSolitaireMove possibleMove = this.findMove();\n if (possibleMove == null)\n {\n // NOPE, WITH NO MOVES LEFT BUT TILES LEFT ON\n // THE GRID, THE PLAYER HAS LOST\n endGameAsLoss();\n }\n }\n }", "private boolean canRemoveTiles() {\n return this.mCurrentSpecs.size() > 8;\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public void removeCardAndAddToHand(int location,ArrayList<Card> hand) {\n// if(cards.get(location).equals()){\n hand.add(cards.get(location));\n cards.remove(location);\n// }\n //add to player\n }", "public void removePapalCard(int i) {\n faithPathPane.removePapalCard(i);\n }", "@Test\n public void multiplePiles() {\n Pile p1 = new Pile();\n Pile p2 = new Pile();\n\n Card c1 = new Card(0, 0);\n Card c2 = new Card(1, 1);\n Card c3 = new Card(2, 2);\n\n p1.addCard(c1);\n p2.addCard(c2);\n p1.addCard(c3);\n\n assertEquals(p1.size(), 2);\n\n p2.addCard(p1.pop());\n\n assertEquals(p2.size(), 2);\n assertEquals(p2.pop(), c3);\n }", "public void fakeCards(){\n this.drawPile = new ArrayList<>();\n drawPile.add(new RemoveActionCard(\"Fernsprechgerät\", (float) 0.5, 4, new SpecialActions(0,0,1) ));\n drawPile.add(new MovingCard(\"Millionärin\", 4, 5, 4, 99, new COLOR[]{COLOR.SAND}));\n drawPile.add(new RemoveMoveSellCard(\"Propellerflugzeug\", 4, 4, 4, 99, new COLOR[]{COLOR.SAND, COLOR.RIVER, COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new MovingCard(\"Ureinwohner\", (float) 0.5, 5, 99, 1, new COLOR[]{COLOR.BASECAMP, COLOR.RUBBLE, COLOR.JUNGLE, COLOR.SAND, COLOR.RIVER,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new ActionCard(\"Wissenschaftlerin\", (float) 0.5, 4, new SpecialActions(1,1,0)));\n drawPile.add(new MovingCard(\"Pionier\", (float) 0.5, 5, 5, 99, new COLOR[]{COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE}));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n Collections.shuffle(drawPile);\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_null() {\n player2 = new Player(\"\", true);\r\n Hand hand = new Hand();\r\n player2.setHand(hand.getAllCards());\r\n assertEquals(player2.getDumbStrategyCard(yellowOne, yellowOne.getColor()), null);\r\n }", "@Override\n public Game apply(AMove move, Game game) throws ApplyMoveException {\n PlayCardMove newMove = (PlayCardMove) move;\n\n // Retrieving the Player\n Player player = game.getPlayerByPlayerNr(game.getCurrentPlayer());\n // removing the current Player from the List of all Players\n game.getPlayers().remove(player);\n\n // Removing the marketCard from the players deck of cards\n player.getHandCards().remove(player.getMarketCardById(newMove.getCardId()));\n\n /* PART ONE: GET STONES */\n\n // Retrieving the SupplySled and the StoneQuarry of the current Player\n SupplySled supplySled = player.getSupplySled();\n StoneQuarry stoneQuarry = game.getStoneQuarry();\n\n // Calculating the number of Stones from the StoneQuarry to be moved to the SupplySled\n int stonesOnSupplySled = player.getSupplySled().getStones().size();\n int nrOfNewStones = GameConstants.MAX_STONES_SUPPLY_SLED - stonesOnSupplySled;\n\n // The current Stones on the SupplySled\n List<Stone> updatedStones = supplySled.getStones ();\n\n // Adding at most 3 stones to the SupplySled\n for (int i = 0; i < nrOfNewStones && i != GameConstants.MAX_STONES_ADDED_PER_MOVE; i++) {\n Stone stone = stoneQuarry.getStonesByPlayerNr(player.getPlayerNumber()).remove(0);\n updatedStones.add(stone);\n }\n\n // Adding the updated StoneQuarry to the Game\n game.setStoneQuarry(stoneQuarry);\n\n\n /* PART TWO: PLACE STONE */\n\n // removing one stone from players' sled\n Stone stone = updatedStones.remove(0);\n\n // Adding the position to selected stone\n stone.setPlaceOnShip(newMove.getPlaceOnShip());\n\n // Find the assigned ship\n Ship assignedShip = game.getRoundByRoundCounter().getShipById(newMove.getShipId());\n\n // Remove the assigned ship\n game.getRoundByRoundCounter().getShips().remove(assignedShip);\n\n // Adding stone on ship\n assignedShip.getStones().add(stone);\n\n // Adding the updated sled to the game\n supplySled.setStones(updatedStones);\n\n // Adding the updated ship back to the game\n game.getRoundByRoundCounter().getShips().add(assignedShip);\n\n // Adding the updated SupplySled to the Player\n player.setSupplySled(supplySled);\n\n // Adding the updated Player back to the Game\n game.getPlayers().add(player);\n\n return game;\n }", "public SafetyPile(){\r\n this.cards = new ArrayList<Card>();\r\n }", "@Override\n\tpublic ServerResponse movesDiscardCards(DiscardedCards cards) {\n\t\treturn null;\n\t}", "void move(IPile<ICard> other) throws IllegalArgumentException;", "public void removeCardToSplit() {\n if (cards.size() == 2) {\n cards.remove(1);\n super.setSize(1);\n }\n }", "public boolean isValidMove(Card card)\n {\n return false;\n }", "public void remove(Card card)\n {\n deck.remove(card);\n //Add listener to check if the deck is empty (then refill it) or not\n }", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "public void removeCard(UnoCard cardToRemove){\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardToRemove.getName())){\n Log.d(\"Removed Card:\", c.getName());\n this.cards.remove(c);\n break;\n }\n }\n }" ]
[ "0.69373804", "0.6517377", "0.6209599", "0.61826855", "0.6098067", "0.6078915", "0.60703695", "0.5954266", "0.59516823", "0.59511775", "0.58468324", "0.58099055", "0.57946396", "0.5752963", "0.57219064", "0.5686364", "0.56644", "0.5646424", "0.56331235", "0.5632542", "0.557315", "0.55528545", "0.5549419", "0.5532774", "0.55159247", "0.55124503", "0.55103207", "0.5499716", "0.5488645", "0.548306", "0.547297", "0.54640305", "0.54570967", "0.545333", "0.5447073", "0.5422297", "0.5413618", "0.54049903", "0.5383704", "0.53834957", "0.5358546", "0.53568983", "0.53561646", "0.53513193", "0.5324961", "0.532466", "0.53230673", "0.5317092", "0.5298992", "0.5297126", "0.52632016", "0.52620846", "0.526099", "0.5260851", "0.52570325", "0.5247775", "0.52459884", "0.52442604", "0.52428246", "0.52252626", "0.5219754", "0.52112705", "0.5205875", "0.52046114", "0.52035904", "0.51758987", "0.51723725", "0.51710707", "0.51659614", "0.5155017", "0.5145054", "0.5144036", "0.5139609", "0.513631", "0.51347095", "0.51276404", "0.51242113", "0.51185465", "0.5103585", "0.5103062", "0.5092415", "0.5091443", "0.5090992", "0.5088237", "0.50836784", "0.5080944", "0.50797296", "0.5077312", "0.5072885", "0.5072597", "0.50672174", "0.50651366", "0.50639653", "0.5063597", "0.506258", "0.5060705", "0.5057384", "0.5056873", "0.5050684", "0.50472593" ]
0.51482797
70
Randomizes the order of the cards in the given deck. CHANGED FOR HW 4: to use Collections.shuffle() for simplicity. This method may now seem redundant, but I kept it in because shuffling is a standard deck operation that should persist no matter what the data type used to represent a deck is, so here there is a deckspecific shuffling method.
protected void shuffle(List<Card> deck) { Collections.shuffle(deck); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(deck);\n\t}", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "public void shuffleDeck() {\n\t\tCollections.shuffle(this.deck);\n\t}", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public void shuffleDeck() {\n\t\tint numberOfShuffles = (int) ( Math.random() * 4 + 1 ) ;\n\t\tCard temp;\n\t\t\n\t\tfor( int j = 0; j < numberOfShuffles; j++ ) {\n\t\t\tfor( int i = 0; i < deck.length; i++ ) {\n\t\t\t\tint randSwitchNum = (int) (Math.random() * 52);\n\t\t\t\ttemp = deck[i];\n\t\t\t\tdeck[i] = deck[randSwitchNum];\n\t\t\t\tdeck[randSwitchNum] = temp;\n\t\t\t}\n\t\t}\t\n\t}", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void shuffle() {\n deck.clear();\n deck.addAll(allCards);\n Collections.shuffle(deck, new Random(System.nanoTime()));\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "public static int[] shuffle(int[] deck){\n\t\tRandom rnd = new Random();\n\t for (int i = deck.length - 1; i > 0; i--)\n\t {\n\t int index = rnd.nextInt(i + 1);\n\t int a = deck[index];\n\t deck[index] = deck[i];\n\t deck[i] = a;\n\t }\n\t return deck;\n\t}", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public static void shuffle(int[] deck){\n //temporary variable for swapping the values\n int storage = 0;\n //random integer\n int randomInt;\n for(int i = 0; i < deck.length; i++){\n //set the variable equal to a random integer every time\n randomInt = (int) (Math.random() * (deck.length));\n //store the original deck[i] in storage\n //swap deck[i] and deck[randomInt]\n storage = deck[i];\n deck[i] = deck[randomInt];\n deck[randomInt] = storage;\n }\n }", "public void shuffleCards() {\n Collections.shuffle(suspectCards);\n Collections.shuffle(weaponCards);\n Collections.shuffle(roomCards);\n\n }", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "void shuffle() {\r\n cards.addAll(dealtCards);\r\n dealtCards.removeAll(dealtCards);\r\n Collections.shuffle(cards);\r\n System.out.println(\"Shuffled cards\" + cards);\r\n }", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "public void shuffle() {\n //Beginning with the top card, decrement i until i is 0.\n for (int i = this.topCard - 1; i >= 0; i--) {\n Card tmpCard = this.cards[i]; //Store the card at i, since it will be overwritten.\n //Choose a random card position from within the deck.\n int randomPosition = (int) (Math.random() * (this.topCard - 1));\n //Take the card from the random position and store it in the ith position.\n this.cards[i] = this.cards[randomPosition];\n //Take the card from the ith position, and put it into the randomly chosen position.\n this.cards[randomPosition] = tmpCard;\n //The cards have now been swapped.\n }\n }", "public void shuffle()\r\n {\r\n Collections.shuffle(cards);\r\n top = NUMCARDS - 1;\r\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public Card[] shuffleDeck(Card[] deck, int decks) {\n Random rnd = new Random();\n Card temp;\n\n int numCards = 52 * decks;\n\n if (decks < 1)\n numCards = 52;\n\n //Iterate through the deck\n for (int i = 0; i < numCards; i++) {\n //Get a random index\n int random = rnd.nextInt(52);\n\n //Swap the current card with the random index\n temp = deck[random];\n deck[random] = deck[i];\n deck[i] = temp;\n }\n\n //Return the shuffled deck\n return deck;\n }", "Vector<Card> shuffleDeck(Vector<Card> cards)\n\t{\n\t Collections.shuffle(cards);\n\t return cards;\n\t}", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "private void shuffleOnceRandom(){\n\t\t//You need to have a copy of the deck before you shuffled it so you can reference\n\t\t//It when you are trying to replace the new values\n\t\tList<Card> beforeShuffle = ourDeck.makeCopy().getCurrentDeck();\n\t\t//The topIndex tells us where we are in reference to the top half of the deck\n\t\t//Same with bottom this helps us reference the original deck to get whatever\n\t\t//Card we need and the deckIndex helps us put it in the correct spot\n\t\tint topIndex = 0, bottomIndex = ourDeck.getSize() / 2, deckIndex = 0;\n\t\t//These ints help us keep track of how many cards are left in each half\n\t\tint remainingTop = ourDeck.getSize() / 2, remainingBot = ourDeck.getSize() / 2;\n\t\tboolean shouldLoop = true;\n\t\t//This is the shuffling loop\n\t\twhile(shouldLoop){\n\t\t\t//This means the number coming from the specific deck which in this method is random\n\t\t\tint numTop = generator.nextInt(RAND_BOUND), numBot = generator.nextInt(RAND_BOUND);\n\t\t\t//After we determine the random number of cards we're using we have to do some checks\n\t\t\t//This means we wanted more than there was less therefore the stack is out\n\t\t\t//This is the stopping condition for the loop\n\t\t\tif(numTop >= remainingTop){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(numBot >= remainingBot){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t//This is where I replace the newCard into ourDeck\n\t\t\t//I iterate for the number of times we take from the top or bottom\n\t\t\tfor(int i = 1; i <= numTop; i++){\t\n\t\t\t\tCard newCard = beforeShuffle.get(topIndex);\t//I get the card we want to move\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\t\t//Then I move it to the new deckIndex\n\t\t\t\ttopIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tfor(int i = 1; i <= numBot; i++){\n\t\t\t\tCard newCard = beforeShuffle.get(bottomIndex);\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\n\t\t\t\tbottomIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tremainingTop = remainingTop - numTop;\n\t\t\tremainingBot = remainingBot - numBot;\n\t\t}\n\t}", "private void shuffleCards(final ICard[] myCards) {\r\n ICard tmp;\r\n int rand;\r\n for (int i = ZERO; i < myCards.length; i++) {\r\n rand = rmd.nextInt(myCards.length);\r\n tmp = myCards[i];\r\n myCards[i] = myCards[rand];\r\n myCards[rand] = tmp;\r\n }\r\n }", "public static Deck shuffleDeck(final Deck deck) {\n final List<Card> cards = deck.getCards();\n Collections.shuffle(cards);\n return new Deck(cards);\n }", "public static void shuffleCards(List<Cards> cardsList){\n\t\tCollections.shuffle(cardsList);\n\t}", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "@Override\n public void shuffle() {\n System.out.println(\"shuffling the shoe...\");\n Collections.shuffle(this.cards);\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "public void shuffle(int numShuffles)\n { \n Card tempCard;\n int switchOne, switchTwo;\n\n for (int i=0; i<numCards; i++){\n switchOne = rand.nextInt(numCards);\n switchTwo = rand.nextInt(numCards);\n\n tempCard = cardAry[switchOne];\n cardAry[switchOne] = cardAry[switchTwo];\n cardAry[switchTwo] = tempCard; \n }\n\n if(cardAry.length > 1 && cardAry.length <=5 && isSorted()==true)\n shuffle(2);\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "public CardStack shuffle() {\n Card[] arr = new Card[cards.size()];\n List<Card> cardsList = Arrays.asList(cards.toArray(arr));\n Collections.shuffle(cardsList);\n cards.removeAllElements();\n cards.addAll(cardsList);\n return this;\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "public static void shuffle(Card[] cards) {\n for (int i = 0; i < cards.length - 1; i++) {\n int j = i + (int)((cards.length - i) * Math.random());\n swap(i, j, cards);\n }\n }", "public void shuffle()\r\n {\r\n // We will start from the last element and swap the cards one by one. We actually\r\n // don't need to swap the last element.\r\n for (int i = valid - 1; i > 0; i --) { \r\n \r\n // By using Math.random, we will get a random integer from 0 to i\r\n int j = (int) ( (i+1) * Math.random()); \r\n \r\n // Swapping with the help of temp instance of Card Class.\r\n Card temp = cards[i]; \r\n cards[i] = cards[j]; \r\n cards[j] = temp; \r\n } \r\n // Prints the random array \r\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "public void shuffle();", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public static int[] createShuffledDeck(){\n //create a deck\n int[] deck = new int[52];\n //make each item their respective index + 1 to avoid repetition\n for(int i = 0; i < deck.length; i++){\n deck[i] = i+1;\n }\n //shuffle deck\n shuffle(deck);\n return deck;\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 Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public void RefillDeck(boolean shuffle)\n\t{\n\t\tDeck newDeck = ((shuffle) ? new Deck(true) : new Deck(false));\n\t\t\n\t\tfor(int x=cardNumber; x < 52; x++)\n\t\t{\n\t\t\tthis.card[cardNumber] = newDeck.nextCard();\n\t\t\tthis.cardNumber++;\n\t\t}\n\t}", "public void reset(){\n\n deck = new PlayingCard[52];\n String[] cardTypes = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\n\n // initialise Aces separately for a cleaner loop later\n deck[0] = new PlayingCard(\"A\", PlayingCard.HEARTS, 1, 14);\n deck[1] = new PlayingCard(\"A\", PlayingCard.DIAMONDS, 1, 14);\n deck[2] = new PlayingCard(\"A\", PlayingCard.CLUBS, 1, 14);\n deck[3] = new PlayingCard(\"A\", PlayingCard.SPADES, 1, 14);\n\n int j = 0;\n\n for(int i = 0; i < Constants.SUIT_SIZE-1; ++i) {\n\n j = (i+1) * 4; // used to be able to declare 4 cards at once without overwriting\n deck[j] = new PlayingCard(cardTypes[i], PlayingCard.HEARTS, i + 2, i + 2);\n deck[j+1] = (new PlayingCard(cardTypes[i], PlayingCard.CLUBS, i + 2, i + 2));\n deck[j+2] = new PlayingCard(cardTypes[i], PlayingCard.DIAMONDS, i + 2, i + 2);\n deck[j+3] = new PlayingCard(cardTypes[i], PlayingCard.SPADES, i + 2, i + 2);\n }\n\n this.shuffle();\n }", "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n String[] suits = { \"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\" };\n String[] ranks = { \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"Jack\", \"Queen\", \"King\", \"Ace\" };\n int i = (int) (Math.random() * ranks.length);\n int j = (int) (Math.random() * suits.length);\n System.out.println(ranks[i] + \" of \" + suits[j]);\n\n // initialize array values at run-time\n String[] deckOfCards = new String[ranks.length * suits.length];\n for (int k = 0; k < ranks.length; k++) {\n for (int l = 0; l < suits.length; l++) {\n deckOfCards[suits.length * k + l] = ranks[k] + \" of \" + suits[l];\n }\n }\n System.out.print(\"deckOfCards = [ \");\n for (int m = 0; m < deckOfCards.length; m++) {\n System.out.println(deckOfCards[m] + \" \");\n }\n System.out.println(\"]\");\n\n // shuffling an array\n int n = deckOfCards.length;\n for (int o = 0; o < n; o++) {\n int r = o + (int) (Math.random() * (n - o));\n String temp = deckOfCards[o];\n deckOfCards[o] = deckOfCards[r];\n deckOfCards[r] = temp;\n }\n System.out.print(\"deckOfCards = [ \");\n for (int m = 0; m < deckOfCards.length; m++) {\n System.out.println(deckOfCards[m] + \" \");\n }\n System.out.println(\"]\");\n\n }", "public void randomize(){\r\n\t\tfor(int i = 0;i<this.myQuestions.size();i++){\r\n\t\t\tthis.myQuestions.get(i).randomize();\r\n\t\t}\r\n\t\tCollections.shuffle(this.myQuestions);\r\n\t}", "void shuffle();", "void shuffle();", "public void shuffle() {\n Collections.shuffle((List<Nummer>) this.albumNummers);\n }", "private void reshuffleDiscardPile() {\n ICard topCard = discardPile.pop();\n\n drawPile.addAll(discardPile);\n Collections.shuffle(drawPile, rng);\n\n discardPile.clear();\n discardPile.add(topCard);\n }", "void makeDeck() {\n\t\t// start with an array of 1..28 for easy shuffling\n\t\tint[] cardValues = new int[28];\n\t\t// assign values from 1 to 28\n\t\tfor (int i=0; i < cardValues.length; i++) {\n\t\t\tcardValues[i] = i+1;\n\t\t}\n\n\t\t// shuffle the cards\n\t\tRandom randgen = new Random();\n\t\tfor (int i = 0; i < cardValues.length; i++) {\n\t\t\tint other = randgen.nextInt(28);\n\t\t\tint temp = cardValues[i];\n\t\t\tcardValues[i] = cardValues[other];\n\t\t\tcardValues[other] = temp;\n\t\t}\n\n\t\t// create a circular linked list from this deck and make deckRear point to its last node\n\t\tCardNode cn = new CardNode();\n\t\tcn.cardValue = cardValues[0];\n\t\tcn.next = cn;\n\t\tdeckRear = cn;\n\t\tfor (int i=1; i < cardValues.length; i++) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = cardValues[i];\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public void shuffle() {\n Collections.shuffle(this);\n }", "public void initialDeck()\t{\n\t\tdeck1 = new Deck();\n\t\tdeck2 = new Deck();\n\t\tdeck1.shuffle();\n\t\tdeck2.shuffle();\n\t\tdeck1 = deck1.combine(deck2);\n\t\tdeck1.shuffle();\n\t}", "private void mixDeck() {\n Random rnd = new Random();\n ArrayList<UnoCard> mixed = new ArrayList<UnoCard>();\n\n // mix it!\n for(int i = cards.size()-1; i>0;i--) {\n int index = rnd.nextInt(i+1);\n UnoCard helper = cards.get(index);\n cards.remove(index);\n mixed.add(helper);\n }\n\n // delete current arrayList\n cards = null;\n // set mixed cards to original carddeck\n cards = mixed;\n\n // paint cards again because order has changed\n for(UnoCard c : cards) {\n c.setContainer(deckPos);\n }\n\n }", "public void setChanceCardShuffle() {\n ChanceCardShuffle = true;\n }", "public void initChanceDeck() {\n\t\tchanceDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchanceDeck.addCard(new Card(i));\n\t\t}\n\t\t//shuffled to make the order random\n\t\tchanceDeck.shuffle();\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "public Deck(boolean shuffle) {\n\t\t//52 cards\n\t\tthis.cardNumber = 52;\n\t\t//Total slots of 52 ARRAY\n\t\tthis.card = new Card[this.cardNumber];\n\t\t\n\t\t//location of the card\n\t\tint cardLocation= 0;\n\t\t\n\t\t// each suit\n\t\tfor(int suit = 0; suit < 4; suit++)\n\t\t{\n\t\t\t//each number in the deck\n\t\t\tfor(int num = 1; num <=13; num++)\n\t\t\t{\n\t\t\t\t// add a new card to the deck \n\t\t\t\tthis.card[cardLocation] = new Card(Suit.values()[suit],num);\n\t\t\t\tcardLocation++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Shuffling done\n\t\tif(shuffle == true)\n\t\t{\n\t\t\tthis.shuffle();\n\t\t}\n\t}", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "public void shuffle() {\n Collections.shuffle(this.plateau);\n }", "public void shuffle()\n {\n Collections.shuffle(artefacts);\n }", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public void zipShuffle() {\r\n List<Card> half = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n int h = cards.size()/2;\r\n for (int i = 0; i < h; i++) {\r\n half.add(draw());\r\n }\r\n int j = 0;\r\n while ((half.size() + cards.size()) > 0) {\r\n if (half.size() > 0 && cards.size() > 0) {\r\n if (j % 2 == 0) {\r\n shuffledDeck.add(half.remove(0));\r\n } else {\r\n shuffledDeck.add(draw());\r\n }\r\n } else if (half.size() > 0) {\r\n shuffledDeck.add(half.remove(0));\r\n } else if (cards.size() > 0) {\r\n shuffledDeck.add(draw());\r\n }\r\n j++;\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n half.clear();\r\n shuffledDeck = tempDeck;\r\n shuffledDeck.clear();\r\n }\r\n }", "public abstract void shuffled();", "public static void main(String[] args){ // main method\n String[] suitNames={\"C\",\"H\",\"S\",\"D\"}; // create a string array for suitnames\n String[] rankNames={\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"J\",\"Q\",\"K\",\"A\"}; // create a string array for ranknames\n String[] cards=new String[52]; // create a string for combining both suitnames array and ranknames array\n for(int i=0;i<52;i++){ // print out the first ordered 52 deck cards\n cards[i]=rankNames[i%13]+suitNames[i/13];\n System.out.print(cards[i]+\" \");\n }\n System.out.println(\"\\n\"+\"\\n\"+\"Shuffled: \");\n shuffle(cards); // call shuffle method\n printArray(cards); // call printArray method\n System.out.println(\"\\n\"+\"\\n\"+\"Randomized Hand!\");\n // call randonmizeHand method and store the returned array into a new declared array\n String[] fiveRandom=randomizeHand(cards); \n printArray(fiveRandom); // call printArray method\n }", "@Test\n public void testShuffleGood() {\n System.out.println(\"shuffleGood\");\n Deck deck = new Deck();\n boolean shuffled = false;\n deck.shuffle();\n //we take out one card from the deck\n Card lastCard = deck.nextCard();\n //we take out 58 more cards\n for (int i =0 ; i<57;i++)\n {\n deck.nextCard();\n }\n //we take out the last card from the deck\n Card firstCard = deck.nextCard();\n \n //if both cards = the same value they were before being shuffled, then test will fail.\n if (lastCard.getValue() != CardType.WILDCARD )\n shuffled = true;\n else if (firstCard.getValue()!=CardType.ZERO)\n shuffled = true;\n \n //if either of the cards are different, that means the deck was shuffled and the test will pass\n assertEquals(true, shuffled);\n }", "public void cards() {\n\t\t\n\n\t\tboolean[] randomCards = new boolean[52];\n\n\t\t// choose 4 random distinct cards from the deck\n\t\tint count = 0;\n\t\tint card1 = 0;\n\t\tint card2 = 0;\n\t\tint card3 = 0;\n\t\tint card4 = 0;\n\n\t\twhile (count < 4) {// Display only four cards\n\n\t\t\tcard1 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard2 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard3 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard4 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\n\t\t\tif ((randomCards[card1] = !randomCards[card2]) && (randomCards[card1] = !randomCards[card3])\n\t\t\t\t\t&& (randomCards[card1] = !randomCards[card4]) && (randomCards[card2] = !randomCards[card3])\n\t\t\t\t\t&& (randomCards[card2] = !randomCards[card4]) && (randomCards[card3] = !randomCards[card4])) {\n\n\t\t\t\tString[] cards = { \"clubs\", \"diamonds\", \"hearts\", \"spades\" };\n\n\t\t\t\tString name1 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name2 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name3 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name4 = cards[(int) (Math.random() * cards.length)];\n\n\t\t\t\tImage image1 = new Image(\"png/\" + (card1) + \"_of_\" + name1 + \".png\");\n\t\t\t\tImage image2 = new Image(\"png/\" + (card2) + \"_of_\" + name2 + \".png\");\n\t\t\t\tImage image3 = new Image(\"png/\" + (card3) + \"_of_\" + name3 + \".png\");\n\t\t\t\tImage image4 = new Image(\"png/\" + (card4) + \"_of_\" + name4 + \".png\");\n\n\t\t\t\timgCard1.setImage(image1);\n\t\t\t\timgCard2.setImage(image2);\n\t\t\t\timgCard3.setImage(image3);\n\t\t\t\timgCard4.setImage(image4);\n\n\t\t\t\tcount++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tString cardOneValue = Integer.toString(card1);\n\t\tString cardTwoValue = Integer.toString(card2);\n\t\tString cardThreeValue = Integer.toString(card3);\n\t\tString cardFourValue = Integer.toString(card4);\n\t\tSystem.out.println(cardOneValue + \" - \" + cardTwoValue + \" - \" + cardThreeValue + \" - \" + cardFourValue);\n\t\tsetText.setText(cardOneValue +\" \"+ cardTwoValue +\" \"+ cardThreeValue +\" \"+ cardFourValue);\n\t\t\n\t\tint solution = 0; \n\t\tif(solution!=24) {\n\t\tfor(int limit = 0; limit < 25; limit++) {\n\t\t\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(solution);\n\t\t\n\t}", "public static void shuffle(java.util.List arg0, java.util.Random arg1)\n { return; }" ]
[ "0.7932015", "0.7826226", "0.7776936", "0.7774891", "0.7724323", "0.7720342", "0.7687571", "0.76299876", "0.76261485", "0.76261485", "0.76041067", "0.7518609", "0.74957216", "0.7455464", "0.7424305", "0.7418922", "0.74031085", "0.73712623", "0.7356472", "0.734157", "0.7334934", "0.73097026", "0.72929704", "0.72630394", "0.7262619", "0.7257104", "0.7241358", "0.723822", "0.7222139", "0.7207065", "0.7204107", "0.7141415", "0.7100692", "0.7083307", "0.7034553", "0.70225203", "0.69789034", "0.6975788", "0.6974947", "0.6934386", "0.691853", "0.6894376", "0.6846555", "0.68354404", "0.6753086", "0.6752329", "0.6695586", "0.66914016", "0.66694564", "0.6633204", "0.6627248", "0.6598359", "0.6594907", "0.6575389", "0.647982", "0.64736944", "0.6449133", "0.64383376", "0.64337826", "0.6412826", "0.6405697", "0.6402469", "0.63716906", "0.63578916", "0.6219795", "0.6219478", "0.62124294", "0.62074006", "0.62072545", "0.6189265", "0.6168568", "0.6142864", "0.6123577", "0.61021554", "0.60827404", "0.60750985", "0.60750985", "0.60603297", "0.6036283", "0.60283774", "0.6019072", "0.6010717", "0.5998444", "0.59976363", "0.5980508", "0.59758604", "0.5946905", "0.5934465", "0.59018064", "0.589684", "0.58931017", "0.5781177", "0.5781065", "0.5757401", "0.5748844", "0.57488436", "0.57412004", "0.5739287", "0.5723304", "0.572136" ]
0.77015233
6
Finds the pile of the given number and type from among this game's piles.
protected IPile getPile(PileType type, int pileNum) throws IllegalArgumentException { switch (type) { case FOUNDATION: if ((pileNum >= 0) && (this.foundationPiles.size() > pileNum)) { return this.foundationPiles.get(pileNum); } break; case OPEN: if ((pileNum >= 0) && (this.openPiles.size() > pileNum)) { return this.openPiles.get(pileNum); } break; case CASCADE: if ((pileNum >= 0) && (this.cascadePiles.size() > pileNum)) { return this.cascadePiles.get(pileNum); } break; default: throw new IllegalArgumentException("Invalid pile type"); } throw new IllegalArgumentException("Invalid pile number"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Tile getTileAt(Position p);", "SoccerPlayer find(Integer number);", "private int getPileNumber(String sourceString) {\n String pileNumberString = sourceString.substring(1);\n return Integer.valueOf(pileNumberString);\n }", "@Test\n public void multiplePiles() {\n Pile p1 = new Pile();\n Pile p2 = new Pile();\n\n Card c1 = new Card(0, 0);\n Card c2 = new Card(1, 1);\n Card c3 = new Card(2, 2);\n\n p1.addCard(c1);\n p2.addCard(c2);\n p1.addCard(c3);\n\n assertEquals(p1.size(), 2);\n\n p2.addCard(p1.pop());\n\n assertEquals(p2.size(), 2);\n assertEquals(p2.pop(), c3);\n }", "public OthelloTile getTile(Point p) {\n if(p == null) {\n return null;\n }\n int x = (p.x-35)/grid[0][0].getPreferredSize().width;\n int y = (p.y-35)/grid[0][0].getPreferredSize().height;\n if(x<0 || x>=grid.length || y<0 || y>=grid[0].length) {\n return null;\n }\n return grid[y][x];\n }", "public Pile getDrawPile(){\n return piles.getDrawPile();\n }", "private Tile getTileAt(Position p) {\n return getTileAt(p.getRow(), p.getCol());\n }", "public static int[] findTile(int number, PuzzleState state) {\r\n\t\tint[] location = new int[2];\r\n\t\t\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tfor (int j = 0; j < 4; j++)\r\n\t\t\t\tif (state.tiles[i][j] == number) {\r\n\t\t\t\t\tlocation[0] = i;\r\n\t\t\t\t\tlocation[1] = j;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn location;\r\n\t}", "void spawnItem(@NotNull Point point) {\n int anInt = r.nextInt(100) + 1;\n if (anInt <= 10)\n objectsInMap.add(new AmmoItem(point));\n else if (anInt <= 20)\n objectsInMap.add(new HealthItem(point));\n else if (anInt <= 30)\n objectsInMap.add(new ShieldItem(point));\n else if (anInt <= 40)\n objectsInMap.add(new StarItem(point));\n else if (anInt <= 45)\n objectsInMap.add(new LivesItem(point));\n }", "private Tile getTileByValue(int value) {\n\t\tfor (int i = 0; i < gameSize; i++)\n\t\t\tfor (int j = 0; j < gameSize; j++)\n\t\t\t\tif (gameTiles.getTile(i, j).getValue() == value)\n\t\t\t\t\treturn gameTiles.getTile(i, j);\n\n\t\treturn null;\n\t}", "public Player getPlayer(String name, Integer number, String type){\n if(type.equalsIgnoreCase(\"SOCCER\")) {\n return new SoccerPlayer(name, number);\n }\n else if(type.equalsIgnoreCase(\"TENNIS\")){\n return new TennisPlayer(name, number);\n }\n // Type doesn't exist, TODO Throw exception?\n return null;\n }", "public SuitPile(int x, int y, int s)\r\n {\r\n pile = new Stack<>();\r\n suit = s;\r\n xLoc = x;\r\n yLoc = y;\r\n }", "public boolean pile(String s){\n int i = getNumber(s);\n if(stack.isEmpty()){\n System.out.println(\"the stack is empty\");\n return false;\n }\n Stack <Object> acc = new Stack<>();\n int target; // la position a laquelle s'arreter\n if(Math.abs(i) > stack.size()){\n System.out.println(\"index out of bounds, please select an other number\");\n return false;\n }\n if(i < 0) target = stack.size() + i;\n else target = i;\n while (stack.size() != target + 1) acc.push(stack.pop());\n Object d = stack.peek();\n while (!acc.isEmpty()) stack.push(acc.pop());\n stack.push(d);\n return true;\n }", "public List<Upfile> findLinerPic(Long itickettypeid);", "public static ImageUse getByNum(int i) {\n\t\tswitch (i) {\n\t\t\tcase Boardx.BOULDER:\n\t\t\t\treturn BOULDER;\n\t\t\tcase Boardx.CAVEMAN:\n\t\t\t\treturn PLAYER;\n\t\t\tcase Boardx.EMPTY:\n\t\t\t\treturn EMPTY;\n\t\t\tcase Boardx.EXIT:\n\t\t\t\treturn EXIT;\n\t\t\tcase Boardx.HOLE:\n\t\t\t\treturn HOLE;\n\t\t\tcase Boardx.WALL:\n\t\t\t\treturn WALL;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}", "public PlanNode findAtOrBelow( Type typeToFind ) {\n return findAtOrBelow(EnumSet.of(typeToFind));\n }", "private int findIndexContainingType(TileType type) {\n for (int x = 0; x < getWidth(); x++) {\n for (int y = 0; y < getHeight(); y++) {\n if (getTileType(x, y) == type) {\n return twoDimIndexToOneDimIndex(x, y);\n }\n }\n }\n return NO_INDEX;\n }", "public Pile getHandPile(){\n return piles.getHandPile();\n }", "public int getTile(int t) {\n switch (t) {\n case HARDFLOOR: return hardfloors[type];\n case HARDWALL: return hardwalls[type];\n case SOFTFLOOR: return softfloors[type];\n case SOFTWALL: return softwalls[type];\n case STREAM: return streams[type];\n case RIVER: return rivers[type];\n } \n return Tile.WALL;\n }", "public static Piece findPiece(Icon tempImg) {\n\t\tPiece foundPiece = null;\n\t\tfor (int i=0; i<5; i++) {\n\t\t\t if(tempImg==Player1.PieceImages[i]) {\n\t\t\t\t foundPiece=Player1.playersTeam.teamPieces[i];\n\t\t\t }\n\t\t\t if(tempImg==Player2.PieceImages[i]) {\n\t\t\t\t foundPiece=Player2.playersTeam.teamPieces[i];\n\t\t\t }\n\t\t\t if(tempImg==Player3.PieceImages[i]) {\n\t\t\t\t foundPiece=Player3.playersTeam.teamPieces[i];\n\t\t\t }\n\t\t\t if(tempImg==Player4.PieceImages[i]) {\n\t\t\t\t foundPiece=Player4.playersTeam.teamPieces[i];\n\t\t\t }\n\t\t }\n\t\treturn foundPiece;\n\t}", "private void obsluga_pilek()\n {\n if (liczba_pilek > 0)\n {\n i++;\n if (i%50==0)\n {\n p.add(new Pilka(w.getPolozenie_x(), w.getPolozenie_y(), getWidth(), getHeight(), rozmiar_pilki));\n liczba_pilek--;\n }\n }\n }", "public Pile getExhaustPile(){\n return piles.getExhaustPile();\n }", "public void setPileId(String pileId) {\n this.pileId = pileId;\n }", "public Pile getDiscardPile(){\n return piles.getDiscardPile();\n }", "int move(int pileSize) ;", "public abstract Tile getTileAt(int x, int y);", "public void createPile(int id, String name) {\n\t\tif (mTable.get(id) != null) {\n\t\t\treturn; // There was already a pile there\n\t\t}\n\t\t// Check that the name is unique and that it\n\t\tif (pileNames.contains(name)) {\n\t\t\treturn;\n\t\t} else if (name.equals(\"Pile \" + pileNo)) {\n \t\t\tpileNo++;\n \t\t\tgs.setDefaultPileNo(pileNo);\n \t\t}\n\t\t// Make a new Pile object and set() it in the list\n \t\tmTable.set(id, new Pile(name));\n \t\tpileNames.add(name);\n \t\tsendUpdatedState();\n \t}", "public int numberOfBoxesInPile()\n {\n if (aboveBox != null)\n {\n return 1 + aboveBox.numberOfBoxesInPile();\n }\n else\n {\n return 1;\n }\n }", "public Piece getPiece(int num)\n {\n\treturn unused[num];\n }", "public Tile getTileAt(Point position) {\n\t\treturn getTileAt(position.x, position.y);\n\t}", "public List<Map<String, String>> searchByNumber(String number) throws IOException {\n\t\tString queryString = \n\t\t\t\"PREFIX pkm: <http://pokedex.dataincubator.org/pkm/> \" +\n\t\t\t\"SELECT \" +\n\t\t\t\" ?number\" +\t\t\n\t\t\t\" ?name\" +\n\t\t\t\" ?numberAndName\" + \n\t\t\t\" (GROUP_CONCAT(?typeName;separator=\\\"|\\\") as ?types)\" + // aggregate types (seperated by semicolon) since each Pokemon can have 1-2 types\n\t\t\t\" ?color\" +\n\t\t\t\" ?height\" +\n\t\t\t\" ?weight\" +\n\t\t\t\" (str(?image) as ?imageUrl)\" + // get url string from image RDF node\n\t\t\t\" ?attack\" +\n\t\t\t\" ?defense\" +\n\t\t\t\" ?spAttack\" +\n\t\t\t\" ?spDefense\" +\n\t\t\t\" ?speed\" +\n\t\t\t\" ?hp\" +\n\t\t\t\" ?description \" +\n\t\t\t\"WHERE {\" +\n\t\t\t\" ?pokemon pkm:nationalNumber ?number. \" + \t// find Pokemon with number\n\t\t\t\" ?pokemon <http://www.w3.org/2000/01/rdf-schema#label> ?name. \" +\n\t\t\t\" BIND(CONCAT(?name, \\\" #\\\", str(?number)) as ?numberAndName) \" + // used for UI search\n\t\t\t\" ?pokemon pkm:type ?type. \" +\n\t\t\t\" ?type <http://www.w3.org/2000/01/rdf-schema#label> ?typeDescription. \" +\n\t\t\t\"\t BIND(REPLACE(?typeDescription, \\\" Type\\\", \\\"\\\") AS ?typeName). \" +\n\t\t\t\" ?pokemon pkm:colour ?color. \" +\n\t\t\t\" ?pokemon pkm:description ?description. \" +\n\t\t\t\" ?pokemon pkm:length ?height. \" +\n\t\t\t\" ?pokemon pkm:weight ?weight. \" +\n\t\t\t\" ?pokemon <http://xmlns.com/foaf/0.1/depiction> ?image. \" + // image of Pokemon\n\t\t\t\" ?pokemon pkm:baseAttack ?attack. \" +\n\t\t\t\" ?pokemon pkm:baseDefense ?defense. \" +\n\t\t\t\" ?pokemon pkm:baseSpAtk ?spAttack. \" +\n\t\t\t\" ?pokemon pkm:baseSpDef ?spDefense. \" +\n\t\t\t\" ?pokemon pkm:baseSpeed ?speed. \" +\n\t\t\t\" ?pokemon pkm:baseHP ?hp. \" +\n\t\t\t\" FILTER strStarts(str(?number), \\\"\" + number + \"\\\" ) \" +\n\t\t\t\"\t FILTER (langMatches(lang(?description), \\\"EN\\\")) \" +\t// only return English description\n\t\t\t\"\t FILTER contains(str(?image), \\\"legendarypokemon.net\\\") \" + // only return url of image from legendarypokemon.net\n\t\t\t\"}\" +\n\t\t\t\"GROUP BY ?number ?name ?numberAndName ?color ?description ?height ?weight ?image ?attack ?defense ?spAttack ?spDefense ?speed ?hp \" +\n\t\t\t\"ORDER BY ?number LIMIT 10\"; // return 10 results ordered by number\n\t\treturn runQuery(queryString);\n\t}", "public final Card dealCard(int number, int type) {\n for (Card card : cards) {\n if (card.getCardNumber() == number && card.getCardType() == type) {\n return card;\n }\n }\n return null;\n }", "private static TETile getRandomTile() {\n Random r = new Random();\n int tileNum = r.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.FLOWER;\n case 1: return Tileset.MOUNTAIN;\n case 2: return Tileset.TREE;\n case 3: return Tileset.GRASS;\n case 4: return Tileset.SAND;\n default: return Tileset.SAND;\n }\n }", "public Tile(int number) {\n this.number = number;\n }", "public Piece getPiece(int i) { /* ... code ... */ }", "public int tileType(){\n\t\treturn this.type;\n\t}", "public int getSize()\r\n {\r\n return pile.size();\r\n }", "public final Item getOnePerTileItem(int floorLevel) {\n/* 4872 */ if (this.vitems == null)\n/* 4873 */ return null; \n/* 4874 */ return this.vitems.getOnePerTileItem(floorLevel);\n/* */ }", "ResultSet searchNumber(int num) {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \tString query = \"SELECT * FROM Pokemon WHERE ID = \" + num;\n \t\n \treturn search.executeQuery(query);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }", "@Override\r\n\tpublic List<Pilot> findPilotsByTypeRating(String typeCode) {\r\n\t\tList<Pilot> pilotsByTypeRating = new ArrayList<>();\r\n\t\tfor (Pilot p : pilots) {\r\n\t\t\tif (p.isQualifiedFor(typeCode)) {\r\n\t\t\t\tpilotsByTypeRating.add(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pilotsByTypeRating;\r\n\t}", "public Pokemon retrievePokemon(String pokemonName, int boxNum) {\r\n\t\tif(pokemonBoxes.get(boxNum).isInTheBox(pokemonName)) {\r\n\t\t\treturn pokemonBoxes.get(boxNum).getPokemon(pokemonName);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(pokemonName + \" is not inside box \" + boxNum);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Tile getTile(int x, int y) {\r\n assert (tiles != null);\r\n \r\n if (x < 0 || y < 0 || x >= width || y >= height) {\r\n return Tile.floorTile;\r\n }\r\n \r\n Tile t = Tile.tiles[tiles[x][y]];\r\n if (t == null) {\r\n return Tile.floorTile;\r\n }\r\n return t;\r\n }", "public Piece getPiece(int xgrid, int ygrid) {\n\t\tfor (int i = 0; i < pieces.size(); i++) {\n\t\t\tif (pieces.get(i).getX() == xgrid && pieces.get(i).getY() == ygrid) {\n\t\t\t\treturn pieces.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public ArrayList<Pile> getPiles() {\n \t\treturn mTable;\n \n \t}", "@Override\r\n\tpublic List<Pilot> findPilotsByHomeBaseAndTypeRating(String typeCode, String airportCode) {\r\n\t\tList<Pilot> pilotsByHomeBaseAndTypeRating = new ArrayList<>();\r\n\t\tfor (Pilot p : pilots) {\r\n\t\t\tif (p.getHomeBase().equals(airportCode)) {\r\n\t\t\t\tfor (String s : p.getTypeRatings()) {\r\n\t\t\t\t\tif (s.equals(typeCode)) {\r\n\t\t\t\t\t\tpilotsByHomeBaseAndTypeRating.add(p);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pilotsByHomeBaseAndTypeRating;\r\n\t}", "private PileType getPileType(String sourceString) {\n String pileTyprString = sourceString.substring(0, 1);\n switch (pileTyprString) {\n case \"O\":\n return PileType.OPEN;\n case \"F\":\n return PileType.FOUNDATION;\n case \"C\":\n return PileType.CASCADE;\n default:\n // Should never return null - only called with valid strings\n return null;\n }\n }", "public void renderProjectile(int xp, int yp, Projectile p) { //since the constructor is Tile but not Sprite, we are able to change the type of sprite it is. i.e. grass to rock\n\t\txp -= xOffset; //subtracting the Offset accounts for player movement. This also somehow reverses the inversion of the controls. Understand why we are subtracting as opposed to adding.\n\t\typ -= yOffset;\n\t\tfor (int y = 0; y < p.getSpriteSize(); y++) {\n\t\t\tint ya = y + yp; // ya refers to absolute position. y is the rendering thing moving from left to right. yp is the offset. The reason for needing an absolute position is that this method only renders a single tile\n\t\t\tfor (int x = 0; x < p.getSpriteSize(); x++) {\n\t\t\t\tint xa = x + xp;\n\t\t\t\tif (xa < -p.getSpriteSize() || xa >= width || ya < 0 || ya >= height) break; //width and height refer to the screen width and height. this if statement insures that only tiles on the screen are rendered! There are 4 bounds representing top, bottom, left and right. the far left bound isn't zero because...see andrew ton.\n\t\t\t\tif (xa < 0) xa = 0;\n\t\t\t\t\n\t\t\t\tint col = p.getSprite().pixels[x + y * p.sprite.SIZE];\n\t\t\t\tif (col != 0xffffffff)\n\t\t\t\tpixels[xa + ya * width] = col;\n\t\t\t}\n\t\t}\n\t}", "public boolean tileOccupied(int x, int y, int pno){\n\t\tfor (int key : playerPosition.keySet()){\n\t\t\tif (key != pno){\n\t\t\t\tint a = playerPosition.get(key)[0];\n\t\t\t\tint b = playerPosition.get(key)[1];\n\t\t\t\tif (a == x && b == y){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void pileShuffle(int numPiles)\r\n {\r\n List<List<Card>> piles = new ArrayList<List<Card>>(numPiles);\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n for (int i = 0; i < numPiles; i++) {\r\n piles.add( new ArrayList<Card>() );\r\n }\r\n int j = 0;\r\n while (cards.size() > 0) {\r\n piles.get(j).add(draw());\r\n j = (j + 1) % numPiles;\r\n }\r\n for (int i = 0; i < numPiles; i++) {\r\n while (piles.get(i).size() > 0) {\r\n shuffledDeck.add(piles.get(i).remove(0));\r\n }\r\n }\r\n cards = shuffledDeck;\r\n for (int i = 0; i < numPiles; i++) {\r\n piles.get(i).clear();\r\n }\r\n }\r\n }", "private static TETile randomTile() {\n int tileNum = RANDOM.nextInt(5);\n switch (tileNum) {\n case 0: return Tileset.TREE;\n case 1: return Tileset.FLOWER;\n case 2: return Tileset.GRASS;\n case 3: return Tileset.SAND;\n case 4: return Tileset.MOUNTAIN;\n default: return Tileset.NOTHING;\n }\n }", "public int pileSize()\n {\n return warPile.getSize();\n }", "public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\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 static MineType getMine(String type)\n\t{\n\t\tif (mineTable.containsKey(type)) {\n\t\t\treturn mineTable.get(type);\n\t\t} else {\n\t\t\tLogger.getLogger(LonelehMining.class.getName()).severe(\"Invalid MineType type: \" + type);\n\t\t}\n\t\treturn MineType.values()[0];\n\t}", "public static void main(String[] args) {\n HashMap<String, Integer> piles = new HashMap<>();\n piles.put(\"A\", 3);\n piles.put(\"B\", 3);\n piles.put(\"C\", 3);\n String pilesString = \"\";\n for (String key : piles.keySet()) {\n pilesString += key + \", \";\n }\n pilesString = pilesString.substring(0, pilesString.length() - 2);\n\n Scanner scanner = new Scanner(System.in);\n String pile = \"\";\n int amount = 0;\n int notEmpty = piles.size();\n\n while (notEmpty > 0) {\n while (!pile.equals(\"A\") && !pile.equals(\"B\") && !pile.equals(\"C\")) {\n System.out.print(\"Pick a pile from (\" + pilesString + \"): \");\n pile = scanner.next();\n pile = pile.toUpperCase();\n }\n System.out.print(\"Pick a number of counters: \");\n amount = scanner.nextInt();\n\n piles.put(pile, piles.get(pile) - amount);\n pile = \"\";\n\n notEmpty = 0;\n for (String key : piles.keySet()) {\n System.out.print(key + \" : \" + piles.get(key) + \" \".repeat(8));\n if (piles.get(key) > 0)\n notEmpty++;\n }\n System.out.println();\n }\n System.out.println(\"All piles are empty. Good job!\");\n }", "List<Building> findBuildingCoordinatesByType(String type);", "public void findShipPiece() {\r\n\t\tshipPiecesFound += 1;\r\n\t}", "public List<Map<String, String>> findSimilar(String number) throws IOException {\n\t\tString queryString = \n\t\t\t\"PREFIX pkm: <http://pokedex.dataincubator.org/pkm/> \" +\n\t\t\t\"SELECT DISTINCT \" +\n\t\t\t\" ?number ?name \" +\n\t\t\t\"WHERE {\" +\n\t\t\t\" ?pokemon1 pkm:nationalNumber \" + number + \". \" + \t// find first Pokemon with number\n\t\t\t\" ?pokemon1 pkm:type ?type1. \" +\n\t\t\t\" ?pokemon1 pkm:colour ?color1. \" +\n\t\t\t\" ?pokemon1 pkm:length ?height1. \" +\n\t\t\t\" ?pokemon1 pkm:weight ?weight1. \" +\n\t\t\t\" ?pokemon2 pkm:type ?type2. \" +\n\t\t\t\" ?pokemon2 pkm:colour ?color2. \" +\n\t\t\t\" ?pokemon2 pkm:length ?height2. \" +\n\t\t\t\" ?pokemon2 pkm:weight ?weight2. \" +\n\t\t\t\" ?pokemon2 pkm:nationalNumber ?number. \" +\n\t\t\t\" ?pokemon2 <http://www.w3.org/2000/01/rdf-schema#label> ?name. \" +\n\t\t\t\" FILTER (?pokemon2 != ?pokemon1) \" + // pokemon2 is different than pokemon 1\n\t\t\t\" FILTER (?weight2 < ?weight1 * 1.5) \" +\n\t\t\t\" FILTER (?weight2 > ?weight1 / 1.5) \" +\n\t\t\t\" FILTER (?height2 < ?height1 * 1.5) \" +\n\t\t\t\" FILTER (?height2 > ?height1 / 1.5) \" +\n\t\t\t\" FILTER (?color2 = ?color1 || ?type2 = ?type1) \" + // either color or type matches\n\t\t\t\"} \" +\n\t\t\t\"ORDER BY RAND() LIMIT 1\"; // return a random result\n\t\treturn runQuery(queryString);\n\t}", "@Override\r\n\tpublic Projectile getProjectile(int yield) {\r\n\t\treturn new BazookaProjectile(getWorm(), yield);\r\n\t}", "public Tile getTile(int pos) {\n\t\tObject t = tileList.get(pos);\n\t\tif(t instanceof Property){\n\t\t\treturn (Property) t;\n\t\t} else if(t instanceof TaxTile){\n\t\t\treturn (TaxTile) t;\n\t\t} else { // Should not happen\n\t\t\treturn (Tile) t;\n\t\t}\n\t}", "private void yourturn() {\n if (whosturn != 3) {\n whosturn = 3;\n displayTable();\n }\n\n // TODO mega duplication\n int top = 0;\n // testing is player has a card they can play\n if (pile.notEmpty()) {\n boolean canplay = false;\n if (hand.getCard(0) == null) { // if player only has card on the table\n if (hand.isFaceUp()) // if player has faceup card on the table\n {\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null) {\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (seven\n && pile.get(top).getValue() == 7\n && hand.getFaceUp(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (hand.getFaceUp(n).getValue() == 2\n || hand.getFaceUp(n).getValue() == 10) {\n canplay = true;\n break;\n } else if (nine && hand.getFaceUp(n).getValue() == 9) {\n canplay = true;\n break;\n } else if (!seven || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getFaceUp(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n } else // if player only has facedown cards\n canplay = true;\n } else {\n for (int n = 0; n < hand.length() - 1; n++) {\n if (hand.getCard(n) == null) break;\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (hand.getCard(n).getValue() == 2 || hand.getCard(n).getValue() == 10) {\n canplay = true;\n break;\n }\n if (nine && hand.getCard(n).getValue() == 9) {\n canplay = true;\n break;\n }\n if (seven && pile.get(top).getValue() == 7 && hand.getCard(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (seven != true || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getCard(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n if (canplay) {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n } else { // cant play then must pick up the pile\n sh.addMsg(\n \"The card played was a \"\n + pile.top().getStringValue()\n + \" you had to pick up the pile. BLAOW\");\n pile.moveToHand(hand);\n sendCommand(\"turn:pickup:\");\n nextTurn();\n displayTable();\n }\n } else {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n }\n }", "private Ship findWhichShip(Point p) {\n int row, col;\n for (Ship s : ships) {\n for (int i = 0; i < s.getShipSize(); i++) {\n row = s.getBodyLocationPoints()[i].x;\n col = s.getBodyLocationPoints()[i].y;\n if (row == p.x && col == p.y) {\n //Point head = s.getHeadCoordinatePoint();\n //touchingView = ivCell[head.x][head.y];\n Log.i(\"VIEW FOUND: \", \"!!!!!!!!!!!!!!!!\");\n return s;\n }\n }\n }\n return null;\n }", "public int pileSize() {\n return size;\n }", "public Pokemon(String name, int number) {\r\n this.name = name;\r\n this.number = number;\r\n }", "private final Item createPileItem(Item posItem, boolean starting) {\n/* */ try {\n/* 4519 */ Item pileItem = ItemFactory.createItem(177, 60.0F, null);\n/* */ \n/* 4521 */ float newXPos = ((this.tilex << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* 4522 */ float newYPos = ((this.tiley << 2) + 1) + Server.rand.nextFloat() * 2.0F;\n/* */ \n/* 4524 */ float height = posItem.getPosZ();\n/* 4525 */ if (Server.getSecondsUptime() > 0) {\n/* 4526 */ height = Zones.calculatePosZ(newXPos, newYPos, this, isOnSurface(), false, posItem\n/* 4527 */ .getPosZ(), null, posItem.onBridge());\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 4532 */ pileItem.setPos(newXPos, newYPos, height, posItem\n/* 4533 */ .getRotation(), posItem.getBridgeId());\n/* */ \n/* 4535 */ pileItem.setZoneId(this.zone.getId(), this.surfaced);\n/* 4536 */ int data = posItem.getTemplateId();\n/* 4537 */ pileItem.setData1(data);\n/* 4538 */ byte material = 0;\n/* 4539 */ boolean multipleMaterials = false;\n/* */ \n/* */ \n/* */ \n/* 4543 */ if (this.vitems != null)\n/* */ {\n/* 4545 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 4547 */ if (!item.isDecoration() && item.getFloorLevel() == pileItem.getFloorLevel()) {\n/* */ \n/* 4549 */ if (!starting)\n/* 4550 */ sendRemoveItem(item, false); \n/* 4551 */ if (!multipleMaterials)\n/* */ {\n/* */ \n/* */ \n/* 4555 */ if (item.getMaterial() != material)\n/* */ {\n/* 4557 */ if (material == 0) {\n/* */ \n/* */ \n/* */ \n/* 4561 */ material = item.getMaterial();\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* 4570 */ material = 0;\n/* 4571 */ multipleMaterials = true;\n/* */ } \n/* */ }\n/* */ }\n/* 4575 */ if (!item.equals(posItem))\n/* 4576 */ pileItem.insertItem(item, true); \n/* 4577 */ if (data != -1 && item.getTemplateId() != data) {\n/* */ \n/* 4579 */ pileItem.setData1(-1);\n/* 4580 */ data = -1;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 4585 */ String name = pileItem.getName();\n/* 4586 */ String modelname = pileItem.getModelName();\n/* 4587 */ if (data != -1) {\n/* */ \n/* 4589 */ ItemTemplate template = ItemTemplateFactory.getInstance().getTemplate(data);\n/* 4590 */ String tname = template.getName();\n/* 4591 */ name = \"Pile of \" + template.sizeString + tname;\n/* 4592 */ if (material == 0) {\n/* 4593 */ pileItem.setMaterial(template.getMaterial());\n/* */ } else {\n/* 4595 */ pileItem.setMaterial(material);\n/* 4596 */ } StringBuilder build = new StringBuilder();\n/* 4597 */ build.append(pileItem.getTemplate().getModelName());\n/* 4598 */ build.append(tname);\n/* 4599 */ build.append(\".\");\n/* 4600 */ build.append(MaterialUtilities.getMaterialString(material));\n/* 4601 */ modelname = build.toString().replaceAll(\" \", \"\").trim();\n/* 4602 */ pileItem.setName(name);\n/* */ } \n/* */ \n/* */ \n/* 4606 */ if (!starting && this.watchers != null)\n/* */ {\n/* 4608 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 4612 */ if (vz.isVisible(pileItem, this)) {\n/* */ \n/* 4614 */ boolean onGroundLevel = true;\n/* 4615 */ if (pileItem.getFloorLevel() > 0) {\n/* 4616 */ onGroundLevel = false;\n/* */ \n/* */ }\n/* 4619 */ else if ((getFloors(0, 0)).length > 0) {\n/* 4620 */ onGroundLevel = false;\n/* */ } \n/* 4622 */ vz.addItem(pileItem, this, onGroundLevel);\n/* 4623 */ if (data != -1) {\n/* 4624 */ vz.renameItem(pileItem, name, modelname);\n/* */ }\n/* */ } \n/* 4627 */ } catch (Exception e) {\n/* */ \n/* 4629 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* 4633 */ return pileItem;\n/* */ }\n/* 4635 */ catch (FailedException fe) {\n/* */ \n/* 4637 */ logger.log(Level.WARNING, fe.getMessage(), (Throwable)fe);\n/* */ }\n/* 4639 */ catch (NoSuchTemplateException nst) {\n/* */ \n/* 4641 */ logger.log(Level.WARNING, nst.getMessage(), (Throwable)nst);\n/* */ } \n/* 4643 */ return null;\n/* */ }", "public MahjongSolitaireMove findMove()\n {\n // MAKE A MOVE TO FILL IN \n MahjongSolitaireMove move = new MahjongSolitaireMove();\n\n // GO THROUGH THE ENTIRE GRID TO FIND A MATCH BETWEEN AVAILABLE TILES\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[i][j];\n if (stack1.size() > 0)\n {\n // GET THE FIRST TILE\n MahjongSolitaireTile testTile1 = stack1.get(stack1.size()-1);\n for (int k = 0; k < gridColumns; k++)\n {\n for (int l = 0; l < gridRows; l++)\n {\n if (!((i == k) && (j == l)))\n { \n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[k][l];\n if (stack2.size() > 0) \n {\n // AND TEST IT AGAINST THE SECOND TILE\n MahjongSolitaireTile testTile2 = stack2.get(stack2.size()-1);\n \n // DO THEY MATCH\n if (testTile1.match(testTile2))\n {\n // YES, FILL IN THE MOVE AND RETURN IT\n move.col1 = i;\n move.row1 = j;\n move.col2 = k;\n move.row2 = l;\n return move;\n }\n }\n }\n }\n }\n }\n }\n }\n // WE'VE SEARCHED THE ENTIRE GRID AND THERE\n // ARE NO POSSIBLE MOVES REMAINING\n return null;\n }", "public void showPile() {\n Nodo rounded = lastIn;\n while (rounded != null) {\n List += rounded.info + \"\\n\";\n rounded = rounded.next;\n }\n JOptionPane.showMessageDialog(null, List);\n List = \"\";\n }", "@Override\n public SquareTile getTile(int x, int y) {\n // Check that the location is inside the grid\n if (x < 0 || x >= width || y < 0 || y >= height)\n return null;\n\n return tiles[x * width + y];\n }", "public static Optional<SpawnEgg> fromType(EntityType<?> type) {\n return EGGSSUP.entrySet().stream().filter(e -> e.getKey().get() == type).findFirst().map(Map.Entry::getValue);\n }", "public Point[] checkSpotsForTwo(ParkingLot p)\r\n {\r\n if(p.getCapacity() >= 2){\r\n ArrayList<Point[]> emptySpots = new ArrayList<>();\r\n for(int i = 0; i < p.getTotalRow(); i++){\r\n for(int j = 0; j < p.getTotalColumn(); j++){\r\n if(!p.getOccupany(i,j)){\r\n if(j+1 <= p.getTotalColumn()-1 && !p.getOccupany(i,j+1)){\r\n emptySpots.add(new Point[]{new Point(i,j),new Point(i,j+1)});\r\n }\r\n }\r\n }\r\n }\r\n if(emptySpots.size() > 0){\r\n Random rand = new Random();\r\n return emptySpots.get(rand.nextInt(emptySpots.size()));\r\n }else{\r\n return moveCars(p);\r\n }\r\n }else{\r\n System.out.println(\"There are not enough spots in this lot to park this car.\");\r\n return null;\r\n }\r\n }", "public TablePile(final int x, final int y) {\n\t\tsuper(x, y);\n\t}", "private Tile getTileAt(int x, int y)\n {\n int tileAt = y * TILES_PER_ROW + x;\n \n if (tileAt >= tileset.getTileCount())\n {\n return null;\n }\n else \n {\n return tileset.getTile(tileAt);\n }\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}", "public PileOfCards(int numCards) {\n descriptors = CardFactory.getDescriptorKeySet();\n pile = new ArrayList<Card>(numCards);\n for(int i = 0; i < numCards; i++)\n pile.add(CardFactory.drawCard());\n }", "private Cell searchPowerUp() {\n for (Cell[] row : gameState.map) {\n for (Cell column : row) {\n if (column.powerUp != null)\n return column;\n }\n }\n\n return null;\n }", "public PowerUp getPowerUp(Location loc) {\n for (PowerUp pu : powerUps) {\n for (Location l : pu.imageLocs) {\n if (l.equals(loc)) {\n return pu;\n }\n }\n }\n return null;\n}", "private static Tuple searchH(int n, Tuple[] tups){\n\t\tfor (int i = 0; i < tups.length; i++){\n\t\t\tif(tups[i] == null){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (n == tups[i].x){\n\t\t\t\treturn tups[i];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "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 }", "private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}", "public <T> T findElementUnder(int type, float[] detectionPoint, Class<T> elementClass) {\n\t\tList<Element> hitElements = new ArrayList<Element>(); \n\t\tfinal List<Element> elements = getDiagram().getElements();\n\t\tfinal float[] detectionRectangle = Geometry.rectangleFromPoints(detectionPoint, detectionPoint);\n\t\tGeometry.expandRectangle(detectionRectangle, 3f, 3f);\n\t\tfor ( int i=elements.size()-1; i >=0; i-- ) {\n\t\t\tElement element = elements.get(i);\n\t\t\telement.hitTesting(hitElements, detectionPoint, detectionRectangle, type, this);\n\t\t\tif ( !hitElements.isEmpty() ) {\n\t\t\t\tIterator<Element> iterator = hitElements.iterator();\n\t\t\t\twhile ( iterator.hasNext() ) {\n\t\t\t\t\tElement current = iterator.next();\n\t\t\t\t\tif ( elementClass.isInstance(current) ) return elementClass.cast(current);\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void openFloor(Tile t) {\r\n int tileRow = t.getRow();\r\n int tileCol = t.getCol();\r\n if (t.getSurroudingBombs() == 0) { \r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if (!(r == tileRow && c == tileCol) && inspectionTile.isHidden() \r\n && !inspectionTile.getFlagged()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n for (int r = tileRow - 1; r <= tileRow + 1; r++) {\r\n for (int c = tileCol - 1; c <= tileCol + 1; c++) {\r\n if (r >= 0 && r < gridSize && c >= 0 && c < gridSize) {\r\n Tile inspectionTile = grid[r][c]; \r\n if ((r != tileRow - 1 && c != tileCol - 1) ||\r\n (r != tileRow - 1 && c != tileCol + 1) ||\r\n (r != tileRow + 1 && c != tileCol - 1) ||\r\n (r != tileRow + 1 && c != tileCol + 1) && \r\n !(r == tileRow && c == tileCol) && inspectionTile.isHidden()) {\r\n if (!inspectionTile.isBomb()) {\r\n inspectionTile.handleTile();\r\n if (inspectionTile.getSurroudingBombs() == 0) {\r\n openFloor(inspectionTile);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public interface IPile<ICard> {\n\n /**\n * Adds an ICard to the top of the pile.\n *\n * @param card represnts the ICard to be added to the pile.\n */\n void pushCard(ICard card);\n\n /**\n * Removes an ICard from the top of the pile.\n *\n * @throws IllegalStateException when there are no cards to remove.\n */\n void popCard() throws IllegalStateException;\n\n /**\n * Moves a card from 'this' pile onto the 'other' pile.\n *\n * @param other represents the pile to be added to.\n * @throws IllegalArgumentException when 'this' card cannot be added to 'other' pile.\n */\n void move(IPile<ICard> other) throws IllegalArgumentException;\n\n /**\n * Returns an ICard at a specific index within the pile.\n *\n * @param cardIndex the index at which the card exists within the pile.\n * @return the ICard at the index specified.\n * @throws IllegalArgumentException when the index of the card is invalid.\n */\n ICard getCard(int cardIndex) throws IllegalArgumentException;\n\n /**\n * Returns an ICard from the top of the pile.\n *\n * @return the ICard that exists at the top of the pile.\n * @throws IllegalArgumentException when there are no cards to get from the pile (i.e. the pile is\n * empty).\n */\n ICard getTopCard() throws IllegalArgumentException;\n\n /**\n * Determines if the passed-in ICard can be added to 'this' pile.\n *\n * @param toBeAddedCard is the ICard to be added to 'this' pile.\n * @return true if the ICard parameter can be added to 'this' pile and false otherwise.\n */\n boolean canBeAdded(ICard toBeAddedCard);\n\n /**\n * Determines if the ICard at the specified index can be removed.\n *\n * @param cardIndex is the index of the ICard to be removed from the pile.\n * @return true if the ICard at the specified index may be removed and false otherwise.\n */\n boolean canBeRemoved(int cardIndex);\n\n /**\n * Gets the number of ICards within the pile.\n *\n * @return the integer value of the number of ICards in the pile.\n */\n int getNumCards();\n\n /**\n * Determines if the pile full of ICards is full or not.\n *\n * @return true if the pile cannot accept any more ICards\n */\n boolean isFull();\n\n /**\n * Checks the sequence of cards obeys the rules set for each pile.\n *\n * @return true if all the rules were followed and false otherwise.\n */\n boolean isPileValid();\n\n}", "private void analyzePile(ArrayList<Card> pile, CardSuit trump) {\n for (int i = 0; i < pile.size(); i++) {\n CardValue value = pile.get(i).getValue();\n CardSuit suit = pile.get(i).getSuit();\n if (value == CardValue.ACE || value == CardValue.THREE)\n this.loads++;\n if (suit == trump)\n this.trumps++;\n\n }\n }", "public MapTile getTile(int x_pos, int y_pos) {\n if (x_pos < 0 || y_pos < 0 || x_pos >= map_grid_[0].length || y_pos >= map_grid_.length) {\n return null;\n }\n return map_grid_[y_pos][x_pos];\n }", "private Tile getTile(int x, int y) {\n\t\tif (x < 0 || x > width || y < 0 || y > height) return Tile.VOID;\n\t\treturn Tile.tiles[tiles[x + y * width]];\n\t}", "public Widget findOne(Point p) {\n // we need to deal with scaled points because of zoom feature\n Point2D.Double scaledPos = new Point2D.Double();\n scaledPos.x = (double)p.x;\n scaledPos.y = (double)p.y;\n if (zoomFactor > 1) // transforms are only needed in zoom mode\n inv_at.transform(scaledPos, scaledPos);\n Point2D.Double mappedPos = u.fromWinPoint(scaledPos);\n// System.out.println(\"findOne: Z=\" + zoomFactor + \" p=[\" + p.x + \",\" + p.y + \"] \" \n// + \" s=[\" + scaledPos.getX() + \",\" + scaledPos.getY() + \"]\"\n// + \" m=[\" + mappedPos.getX() + \",\" + mappedPos.getY() + \"]\");\n Widget ret = null;\n for (Widget w : widgets) {\n if (w.contains(mappedPos)) {\n// System.out.println(\"found: \" + w.getKey() + \" p= \" + p + w.getBounded());\n ret = w;\n }\n }\n return ret;\n }", "public GameObject get(int n) { \n\t\treturn (GameObject) collection.get(n);\n\t}", "public Pawn getPawn(Position position) {\n\t\treturn boardGrid[position.getRow()][position.getColumn()];\n\t}", "public Tile(int type, int x, int y) {\n\t\tthis.type=type;\n\t\tthis.coordinates= new int[2];\n\t\tthis.coordinates[0]=x;\n\t\tthis.coordinates[1]=y;\n\t\tif(type==1){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"scenery.png\")).getImage();\n\t\t}\n\t\telse if(type==2){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"path.png\")).getImage();\n\t\t}\n\t\telse if(type==3){\n\t\t\ttileImage= new ImageIcon(this.getClass().getResource(\"tower.png\")).getImage();\n\t\t}\n\t}", "private Player getPlayerFromType(String type, Piece piece) {\n if (type.equalsIgnoreCase(\"human\")) {\n return new Human(this.project, piece);\n } else if (type.equalsIgnoreCase(\"random\")) {\n return new Random(this.project, piece);\n } else if (type.equalsIgnoreCase(\"bad\")) {\n return new Bad(this.project, piece);\n }\n return new Good(this.project, piece);\n }", "List<MineTile> getSurround(int position) {\n int dimension = getDimension();\n int row = position / dimension;\n int col = position % dimension;\n List<MineTile> surround = new ArrayList<>();\n\n if (row != 0 && col != 0) {\n surround.add(getTiles().get(position - dimension - 1));\n }\n if (row != 0 && col != dimension - 1) {\n surround.add(getTiles().get(position - dimension + 1));\n }\n if (row != 0) {\n surround.add(getTiles().get(position - dimension));\n }\n if (row != dimension - 1 && col != 0) {\n surround.add(getTiles().get(position + dimension - 1));\n }\n if (row != dimension - 1 && col != dimension - 1) {\n surround.add(getTiles().get(position + dimension + 1));\n }\n if (row != dimension - 1) {\n surround.add(getTiles().get(position + dimension));\n }\n if (col != 0) {\n surround.add(getTiles().get(position - 1));\n }\n if (col != dimension - 1) {\n surround.add(getTiles().get(position + 1));\n }\n return surround;\n }", "private void getPokemon(int number) {\n Call<Pokemon> call = pokemonAPIService.getPokemonByNameOrNumber(\"\"+number, \"pokemon\");\n call.enqueue(new Callback<Pokemon>() {\n @Override\n public void onResponse(Call<Pokemon> call, Response<Pokemon> response) {\n if (!response.isSuccessful()) {\n Log.d(TAG, \"Response Code: \" + response.code());\n return;\n }\n\n Pokemon pokemon = response.body();\n // calls api at move endpoint to populate pokemon moves with move effect details\n populateMoveEffects(pokemon);\n team.add(pokemon);\n if (newTeamRequested==false) {\n initRecyclerView();\n } else {\n adapter.newList((ArrayList<Pokemon>) team);\n }\n\n }\n\n @Override\n public void onFailure(Call<Pokemon> call, Throwable t) {\n Log.d(TAG, \"Oh no!!! \" + t.getMessage());\n }\n });\n }", "public int getTile(int x, int y)\n {\n return tilemap[x][y];\n }", "public List<PlanNode> findAllAtOrBelow( Type typeToFind ) {\n return findAllAtOrBelow(EnumSet.of(typeToFind));\n }", "public Piece getPieceAt(Position position) {\n return positionToPieceMap.get(position);\n }", "public int checkPiece(String colour, char type) {\n\t\tint location = -1;\n\t\tfor (Piece p : this.getPieces()) {\n\t\t\tlocation ++;\n\t\t\tif (p.getColour().equals(colour)) {\n\t\t\t\tif (p.getType() == type) {\n\t\t\t\t\treturn location;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public Tile getTile(int x, int y) {\n\t\tif (x < 0 || x >= (this.width / Tile.WIDTH) || y < 0 || y >= (this.height / Tile.HEIGHT)) {\n//\t\t\tSystem.out.println(x + \" \" + y + \" \" + \"comes heere\");\n\t\t\treturn VoidTiled.getInstance();\n\t\t}\n\t\treturn tiles[x + y * (this.width / Tile.WIDTH)];\n\t}", "void placeTile(Tile tile, int x, int y, SurfaceEntityType type, Building building) {\r\n\t\tfor (int a = x; a < x + tile.width; a++) {\r\n\t\t\tfor (int b = y; b > y - tile.height; b--) {\r\n\t\t\t\tSurfaceEntity se = new SurfaceEntity();\r\n\t\t\t\tse.type = type;\r\n\t\t\t\tse.virtualRow = y - b;\r\n\t\t\t\tse.virtualColumn = a - x;\r\n\t\t\t\tse.tile = tile;\r\n\t\t\t\tse.tile.alpha = alpha;\r\n\t\t\t\tse.building = building;\r\n\t\t\t\tif (type != SurfaceEntityType.BASE) {\r\n\t\t\t\t\trenderer.surface.buildingmap.put(Location.of(a, b), se);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trenderer.surface.basemap.put(Location.of(a, b), se);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final Optional<Tile> getTile(final GridPoint2D tilePoint) {\n\t if ((tilePoint.getRow() >= 0) && \n\t (tilePoint.getRow() < mLayout.size()) &&\n\t (tilePoint.getColumn() >= 0) && \n\t (tilePoint.getColumn() < mLayout.get(tilePoint.getRow()).size())) {\n\t return Optional.<Tile>of(mLayout.get(tilePoint.getRow()).get(tilePoint.getColumn()));\n\t } \n\t // The indicated point was outside of the battlefield, so return a null\n\t else {\n\t return Optional.<Tile>absent();\n\t }\n\t}", "public Tile getTile(int x, int y) {\n\t\tif (x < 0 || x >= width || y < 0 || y >= height) {\n\t\t\treturn Tile.voidTile;\n\t\t}\n\t\treturn tiles[x + y * width];\n\t}" ]
[ "0.54287475", "0.50958675", "0.5070254", "0.50157666", "0.49902612", "0.49813804", "0.49693495", "0.4962578", "0.49600857", "0.49582842", "0.4944965", "0.49016285", "0.48931062", "0.48922333", "0.48901397", "0.4875009", "0.4857463", "0.4826419", "0.4824498", "0.48161373", "0.4811367", "0.47941425", "0.47927585", "0.47892702", "0.4779406", "0.4750166", "0.46978432", "0.46798766", "0.46746805", "0.46717986", "0.4670784", "0.46536404", "0.4651349", "0.46429965", "0.46291095", "0.46034724", "0.45990857", "0.45971042", "0.45908853", "0.45832407", "0.45810974", "0.4573162", "0.45725244", "0.45684168", "0.45676088", "0.45638108", "0.45510826", "0.45496038", "0.45417088", "0.4541336", "0.45371205", "0.4534725", "0.45279625", "0.45233804", "0.45021778", "0.44975713", "0.44927987", "0.44875994", "0.4485747", "0.4483486", "0.44821775", "0.44793397", "0.447805", "0.44753468", "0.4470916", "0.44660723", "0.44651467", "0.4453282", "0.44518092", "0.4444006", "0.4442027", "0.44406557", "0.44374266", "0.44357225", "0.44353294", "0.4430643", "0.44243437", "0.44234493", "0.44182086", "0.4414209", "0.44135973", "0.44125533", "0.44102156", "0.4409466", "0.4407561", "0.44071406", "0.4406908", "0.4406063", "0.44058773", "0.44005617", "0.43974757", "0.43933713", "0.43881628", "0.4383752", "0.4379595", "0.437634", "0.43679976", "0.43641138", "0.43497068", "0.43491805" ]
0.7436086
0
If the game has not yet started, it shouldn't be "over"
@Override public boolean isGameOver() { if (!gameStarted) { return false; } // If any non-foundation pile still has cards, the game is not over. for (IPile pile : this.cascadePiles) { if (!pile.isEmpty()) { return false; } } for (IPile pile : this.openPiles) { if (!pile.isEmpty()) { return false; } } // If all the non-foundation piles are empty, the foundation piles must all be full, // so the game is over. return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void gameOver() {\n\t\tgameOver=true;\n\t}", "private void gameOver() {\n\t\t\n\t}", "protected boolean hasGameStarted() {\r\n return super.hasGameStarted();\r\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "public boolean gameWon(){\n return false;\n }", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}", "@Override\n public boolean isGameOver() {\n //TODO Implement this method\n return false;\n }", "boolean isGameSpedUp();", "public void gameOver() {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n doLeaderboard = true;\n frameRate(10);\n //this.state = GameState.MENU;\n //If line 151 runs, it bypasses the gameover leaderboard screen for some reason\n //redraw();\n}", "public void preGame() {\n\n\t}", "@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }", "boolean isGameOver() {\n\t\treturn Hit;\n\t}", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}", "@Test\n void invalidPLAYING() {\n getGame().start();\n getGame().start();\n verifyZeroInteractions(observer);\n assertThat(getGame().isInProgress()).isTrue();\n }", "boolean endOfGame() {\n return false;\n }", "public void gameOver() {\n\t}", "@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public boolean isGameOver() {\r\n\treturn false;\r\n }", "public boolean gameOverTick(Game game) {\n\t\treturn false;\n\t}", "public Game() \n {\n gameLoaded = false;\n }", "void gameStarted();", "void gameStarted();", "void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }", "public boolean isGameOver() {\n\t\treturn false;\n\t}", "public boolean isInGame() {\n return this.hasStarted;\n }", "public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}", "public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }", "public void gameOver() \n {\n new GameOver();\n Greenfoot.stop();\n }", "@Override\r\n\tpublic boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "public void gameOver() {\n this.lives --;\n this.alive = false;\n }", "@Override\n public void doAction() {\n this.game.setComputerStartsFirst(false);\n }", "public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}", "protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "private void gameOver() {\n System.out.println(\"GAME OVER!!\");\n\n reset();\n mGameOver = true;\n mChangeObserver.gameOver();\n }", "void gameResumed();", "protected void quitGame() {\n gameOver = true;\n }", "public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }", "@Override\r\n\tpublic boolean isGameOver() {\n\t\treturn !( hasMoves( Seed.CROSS) || hasMoves( Seed.NOUGHT) );\r\n\t}", "@Override\n\tpublic void gameStopped() {\n\t}", "public void gameOver ()\n {\n Greenfoot.delay (50);\n if (gameOver)\n {\n fader = new Fader (); // create a new fader\n addObject (fader, 400, 300); // add the fader object to the world\n if (UserInfo.isStorageAvailable()) {\n HighScore highScore = new HighScore (score);\n addObject (highScore, 300, 170);\n }\n Greenfoot.stop();\n }\n }", "private boolean isGameOver() {\n return Snake().isTouching(Wall()) || Snake().isTouching(Snake());\n }", "void start() {\n myGameOver = false;\n myDisplay.setCurrent(this);\n repaint();\n }", "public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "void gameOver();", "void gameOver();", "public boolean doesGuiPauseGame()\n {\n return false;\n }", "public abstract boolean gameIsOver();", "public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}", "public void checkGame() {\n\n\t}", "@Override\n public void beginGame() {\n }", "public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }", "public void playTheGame() {\n\t\tboolean gameIsOver = false;\n\t\tdo{\n\t\t\tcheckIfPiecedCanBeDroppedIn(column_number);\n\t\t\tdropPieces(column_number,gamePiece);\n\t\t\tif ( didLastMoveWin() ) {\n\t\t\t\tgameIsOver = true;\n\t\t\t}\n\t\t\tSystem.out.println(\"A\"+didLastMoveWin());\n\t\t\tSystem.out.println(\"b\"+gameIsOver);\n\t\t}while(! gameIsOver);\n\t}", "@Override\n public void endGame(){\n gameOver = true;\n }", "public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }", "public void gameOver() {\r\n grid.exposeMines();\r\n this.displayGrid();\r\n System.out.println(\"Better luck next time!\");\r\n }", "private void startGame()\n {\n if (heroPlayer != null && antagonistPlayer != null && location != null && currentPlayerName != \"null\")\n {\n gameStarted = true;\n }\n }", "public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "public boolean isGameOverDelayed() {\n return gameOver;\n }", "public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}", "public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }", "public void gameOver() \n {\n Greenfoot.stop();\n }", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "public GenGameOver() { \n prepare();\n }", "@Test\n public void isGameOverThree() {\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertFalse(this.bps.isGameOver());\n }", "public void startGame() {\n status = Status.COMPLETE;\n }", "public void notifyGameOver() {\n\t\tgameOver = true;\n\t}", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }", "public boolean gameOver();", "public boolean gameOver();", "public boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "public void startGame() {\n \t\ttimeGameStarted = System.nanoTime();\n \t\tisStarted = true;\n \n \t}", "public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}", "public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }", "public void firstGameCheck()\n {\n if(count > 0)\n {\n this.gameStart();\n System.out.println(\"Result:\");\n this.printGameResult();\n System.out.print(\"\\n\");\n }else\n {\n System.out.println(\"\\nGame Running Failed! \\n >>>>>>>>>>>>>> Please setting game first\\n\");\n }\n }", "@Override\n\tpublic boolean doesGuiPauseGame() {\n\t\treturn super.doesGuiPauseGame();\n\t}", "private void inAvanti() {\n\t\tif (Game.getInstance().isOnGround) {\n\t\t\tjump=false;\n\t\t\tGame.getInstance().getPersonaggio().setStato(Protagonista.RUN);\n\t\t\tGraficaProtagonista.getInstance().cambiaAnimazioni(Protagonista.RUN);\n\t\t}\n\t}", "public boolean isGameOver() {\n return poolFront.next == null;\n }", "public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }", "private void gameOver() {\r\n timer.stop();\r\n if (JOptionPane.showConfirmDialog(this, \r\n \"Game Over!\\nDo you want to play again?\",\r\n FORM_TITLE,JOptionPane.YES_NO_OPTION) == \r\n JOptionPane.YES_OPTION) {\r\n startGame();\r\n }\r\n else { \r\n close();\r\n }\r\n }", "public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "boolean isGameComplete();", "public boolean doesGuiPauseGame() {\n\t\treturn false;\n\t}", "boolean isGameOver();", "boolean isGameOver();", "public void gameOver() \n {\n ScoreBoard endGame = new ScoreBoard(\"You Lose!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }", "@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }", "public void run() //call game over method \r\n {\r\n gui.display(\"The time limit has been reached. The game is now over!\");\r\n \r\n try { //try catch for Thread.sleep in gameOver()\r\n gameOver();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }" ]
[ "0.7602036", "0.75247645", "0.7483734", "0.74715644", "0.7435046", "0.7370618", "0.73633945", "0.733828", "0.7316302", "0.7293396", "0.7261778", "0.7248474", "0.7216208", "0.7184631", "0.71789813", "0.7176954", "0.7169591", "0.7160019", "0.7150383", "0.7137219", "0.7121227", "0.71010983", "0.7084041", "0.7071015", "0.7069127", "0.7036887", "0.7035595", "0.7023579", "0.7001254", "0.6998668", "0.6990842", "0.6990842", "0.69808483", "0.69783413", "0.69718087", "0.69697", "0.69689244", "0.69611454", "0.694665", "0.69412804", "0.6935848", "0.69318056", "0.69303364", "0.6928566", "0.69221306", "0.69167924", "0.6914624", "0.69103825", "0.68994045", "0.68968016", "0.6894151", "0.6879969", "0.68781954", "0.6875861", "0.68755555", "0.68755555", "0.6870684", "0.6846362", "0.6846116", "0.68426234", "0.68403584", "0.68370986", "0.6835811", "0.6822349", "0.6814489", "0.6813134", "0.6794664", "0.67890215", "0.6786446", "0.6771127", "0.6764313", "0.67586577", "0.675537", "0.6754765", "0.6752777", "0.6751089", "0.67261297", "0.67256427", "0.6713115", "0.6705351", "0.66984713", "0.66984713", "0.6692958", "0.66846454", "0.6679924", "0.66799134", "0.66785985", "0.6675008", "0.6671254", "0.66651934", "0.666311", "0.66500473", "0.6639254", "0.66381776", "0.66343766", "0.663386", "0.6632612", "0.6632612", "0.66302115", "0.6618994", "0.66173583" ]
0.0
-1
Determines if the given deck is valid; i.e. has 52 cards, with no duplicates. There can only be 13 cards in a given suit, and only 4 suits, so if there are 52 cards, there are guaranteed to be no duplicates.
protected boolean isValidDeck(List<Card> deck) { if (deck.size() != 52) { // Deck must be 52 cards return false; } Set<Card> cards = new HashSet<Card>(); cards.addAll(deck); return (cards.size() == 52); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isValid(List<Card> deck) {\r\n //Assume true\r\n boolean isValid = true;\r\n\r\n if (deck == null) {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < deck.size(); i++) {\r\n for (int j = i + 1; j < deck.size(); j++) {\r\n for (int k = j + 1; k < deck.size(); k++) {\r\n if (deck.get(i).equals(deck.get(j)) && deck.get(i).equals(deck.get(k))) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //if deck is valid, return true\r\n if (deck.size() != 104) {\r\n return false;\r\n }\r\n return isValid;\r\n }", "public boolean isValid() {\n\t\tif (this.size() != 5) return false;\n\t\tif (!((this.getCard(0).getSuit() == this.getCard(1).getSuit()) && (this.getCard(1).getSuit() == this.getCard(2).getSuit()) && (this.getCard(2).getSuit() == this.getCard(3).getSuit()) && (this.getCard(3).getSuit() == this.getCard(4).getSuit()))) return false;\n\t\t\n\t\tint[] cardsInHand= {this.getCard(0).getRank(), this.getCard(1).getRank(), this.getCard(2).getRank(), this.getCard(3).getRank(), this.getCard(4).getRank()};\n\t\t\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif (cardsInHand[i]==0) cardsInHand[i]=13;\n\t\t\telse if (cardsInHand[i]==1) cardsInHand[i]=14;\n\t\t}\n\t\t\n\t\tArrays.sort(cardsInHand);\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tif(cardsInHand[i]!=cardsInHand[i+1]-1) return false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tboolean isValid(){\n\t\tif(size()==5) {\n\t\t\tint suite = getCard(0).suit;\n\t\t\tfor(int i = 1 ; i< size(); i++) {\n\t\t\t\tif(getCard(i).suit != suite) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort();\n\t\t\tint currRank = (getCard(0).rank +11)%13;\n\t\t\tfor(int i=0; i<size(); i++) {\n\t\t\t\tif((getCard(i).rank+11)%13 != currRank) return false;\n\t\t\t\tcurrRank++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isValidSuit(int suit) {\r\n if (suit < 0 || suit > 3) {\r\n return false;\r\n }\r\n return true;\r\n }", "boolean haveGame(char suit){\n int suitNum = 0; // number of cards that follow suit\n for (int i=0; i<6; i++)\n if (hand.get(i).suit == suit)\n suitNum++;\n return (suitNum > 3);\n }", "private boolean isValidSuit(char suit) {\n return (suit != 'H' && suit != 'D' && suit != 'S' && suit != 'C');\n }", "public boolean isValid() {\n\t\tif (this.size()!=5) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.sort();\n\t\tif (this.getCard(2).getRank()==this.getCard(0).getRank() && this.getCard(3).getRank()==this.getCard(4).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (this.getCard(2).getRank()==this.getCard(4).getRank() && this.getCard(1).getRank()==this.getCard(0).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "public boolean isValid() {\r\n\t\tif (this.size() == 5) {\r\n\t\t\tthis.sort();\r\n\t\t\tif ((this.getCard(0).getRank() == this.getCard(1).getRank()) && (this.getCard(0).getRank() == this.getCard(2).getRank()) && (this.getCard(0).getRank() == this.getCard(3).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if ((this.getCard(1).getRank() == this.getCard(2).getRank()) && (this.getCard(1).getRank() == this.getCard(3).getRank()) && (this.getCard(1).getRank() == this.getCard(4).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static boolean checkSequence(String cards){\r\n //split all the cards and store in card array\r\n String[] cardArray = cards.split(\",\");\r\n //convert card array into card object arrayList\r\n ArrayList<Card> cardList = new ArrayList<Card>();\r\n int numCards = cardArray.length;\r\n //if there is less than 3 cards eliminate deck\r\n if(numCards < 3) return false;\r\n //store suit and face value in card object\r\n for(int i=0;i<numCards;i++){\r\n Card c = new Card(cardArray[i].split(\"#\")[0].trim(),cardArray[i].split(\"#\")[1].trim());\r\n cardList.add(c);\r\n }\r\n int i=0;\r\n String cardSuit=\"\",nextCardSuit=\"\";\r\n int cardValue=-1,nextCardValue=-1,prevCardValue = -1;\r\n \r\n //loop till penultimate card\r\n for(i=0; i<numCards-1 ;i++){ \r\n \r\n cardValue = cardList.get(i).value;\r\n nextCardValue = cardList.get(i+1).value;\r\n cardSuit = cardList.get(i).suit;\r\n nextCardSuit = cardList.get(i+1).suit;\r\n \r\n //suit check\r\n if(!cardSuit.equals(nextCardSuit)) return false;\r\n \r\n //card check\r\n if(cardValue != nextCardValue-1){\r\n \r\n //exception only for queen followed by king followed by ace\r\n if(!(prevCardValue==11 && cardValue == 12 && nextCardValue ==0)){\r\n return false;\r\n }\r\n }\r\n //execption for king followed by ace followed by 2\r\n if(prevCardValue == 12 && cardValue == 0 && nextCardValue==1) return false;\r\n prevCardValue = cardValue;\r\n }\r\n \r\n return true;\r\n }", "public boolean isValid() {\n\t\t//Check for size=3, then check if their ranks are same.\n\t\tif(this.size()==3) {\n\t\t\tif(this.getCard(0).getRank()==this.getCard(1).getRank()) {\n\t\t\t\tif(this.getCard(1).getRank()==this.getCard(2).getRank()){\n\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isValid() {\n\t\t\n\t\tif(this.size()!=2)\n\t\t\treturn false;\n\t\telse {\n\t\t\tint rank1=this.getCard(0).getRank();\n\t\t\tint rank2=this.getCard(1).getRank();\n\t\t\t\n\t\t\tif(rank1==rank2)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}", "public void checkDeck(){\n\t\tfor(int i: deck)\n\t\t\tSystem.out.println(Integer.toString(i));\n\t}", "public static boolean isValid(String _card){\r\n\t\t//communication with sumOfDoubleEvenPlace() and sumOfOddPlace()\r\n\t\tsumOfDoubleEvenPlace(_card);\r\n\t\tsumOfOddPlace(_card);\r\n\t\tgetCompany(_card);\r\n\t\tString _errorLength = \"Invalid number of digits.\";\r\n\t\tString _errorInvalid = \"Invalid credit card number.\";\r\n\t\t\r\n\t\t//condition for valid credit card.\r\n\t\tif((getCompany(_card) != _errorInvalid) && (getCompany(_card) != _errorLength)){\r\n\t\t\tif((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card) != 0)){\t//if user enters all zeroes\r\n\t\t\t\tif ((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card)) % 10 == 0 ){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public static boolean isDeadwood(int[] card, ArrayList<int[]> hand) {\n\t\tint rank = card[0];\n\t\tint suit = card[1];\n\t\t\n\t\tboolean upOne = false;\n\t\tboolean upTwo = false;\n\t\tboolean downOne = false;\n\t\tboolean downTwo = false;\n\t\t\n\t\t// First, check if card is in run (there is at least a 3 card run)\n\t\tfor(int i = 0; i < hand.size(); i++)\n\t\t{\n\t\t\tint[] temp = hand.get(i);\n\t\t\t\n\t\t\tif(temp != card)\n\t\t\t{\n\t\t\t\tif(temp[1] == suit)\n\t\t\t\t{\n\t\t\t\t\tif(temp[0] == rank+1)\n\t\t\t\t\t\tupOne = true;\n\t\t\t\t\telse if(temp[0] == rank+2)\n\t\t\t\t\t\tupTwo = true;\n\t\t\t\t\telse if(temp[0] == rank-1)\n\t\t\t\t\t\tdownOne = true;\n\t\t\t\t\telse if(temp[0] == rank-2)\n\t\t\t\t\t\tdownTwo = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(upOne && upTwo)\n\t\t\treturn false;\n\t\telse if(upOne && downOne)\n\t\t\treturn false;\n\t\telse if(downOne && downTwo)\n\t\t\treturn false;\n\t\n\t\t// Next, check if card is in set (there is at least a 3 card set)\n\t\tint same_rank = 0;\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (hand.get(i)[0] == rank && hand.get(i)[1] != suit) {\n\t\t\t\tsame_rank++;\n\t\t\t}\n\t\t\tif (same_rank >= 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean isValidCard(int index)\n {\n if (index >= cards.size() || index < 0)\n return false;\n \n for (int i = index; i < cards.size() - 1; i++)\n if (!isDifferentColor(cards.get(i), cards.get(i + 1)) ||\n !isOneLess(cards.get(i + 1), cards.get(i)))\n return false;\n\n return true;\n }", "public boolean isValidCard(String card) {\n\t\t// check if given card name is in deck\n\t\tfor(int i = 0; i < cards.size(); ++i) {\n\t\t\tif(cards.elementAt(i).getName().equals(card))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isLegal(List<Integer> selectedCards)\n {\n //checks if the two cards selected added together equal 13\n if(selectedCards.size() == 2)\n {\n if(containsSum13(selectedCards))\n {\n \treturn true;\n }\n }\n \n //checks if the selected card is a K\n if(selectedCards.size() == 1)\n {\n \treturn containsK(selectedCards);\n }\n return false;\n \n }", "public boolean checksuits(Card cardsuits){\n Boolean flag;\n if(cardsuits.suits == this.suits){ flag = true; }\n else{flag = false;}\n return flag;}", "public boolean isValid() {\n //valid melds must have 3+ tile\n if (tiles.size() < 3) {\n //System.out.println(\"fail 1\");\n return false;\n }\n if (tiles.get(0).getColour() == tiles.get(1).getColour() &&\n\t\t\ttiles.get(0).getValue() != tiles.get(1).getValue()) { //test a run\n\t\t\tif (this.size() > 13) {\n //System.out.println(\"fail 2\");\n return false;\n }\n for (int i=1; i<tiles.size(); i++) {\n if (tiles.get(i).getColour() != tiles.get(0).getColour()) { //make sure all are same colour\n //System.out.println(\"fail 3\");\n return false;\n }\n if (tiles.get(i).getValue() != (tiles.get(0).getValue() + i)) { //make sure all values make a run\n //System.out.println(\"fail 4\");\n return false;\n }\n }\n } else { //test a set\n Set<Character> colours = new HashSet<>();\n for (int i=0; i<tiles.size(); i++) {\n if (tiles.get(i).getValue() != tiles.get(0).getValue()) { //all are same value\n //System.out.println(\"fail 5\");\n\t\t\t\t\treturn false;\n }\n\n if (colours.contains(tiles.get(i).getColour()) && tiles.get(i).getColour() != 'J') { //check for duplicate colours\n //System.out.println(\"fail 6\");\n\t\t\t\t\treturn false;\n } else {\n\t\t\t\t\tcolours.add(tiles.get(i).getColour()); //keep track of all the colours this set has\n }\n }\n if (this.size() > 4) { //only possible if there are 5 cards, including a joker\n //System.out.println(\"fail 7\");\n\t\t\t\treturn false;\n }\n }\n\n return true; \n }", "@Test\n public void checkValidityTest2() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n deck.set(32, new Card(Card.number.four, Card.suit.club));\n assert (!g.checkValidity(deck));\n }", "public boolean deckExists(String name)\n {\n return deckStore.exists(name);\n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "public boolean outOfCards() {\n return (this.gameDeck.isEmpty() && this.wonDeck.isEmpty());\n }", "public boolean CheckIfCardPlayedIsValid(UNOCard aCard) {\n\t\t\n\t\tif (discardPile.size() == 0) {\n\t\t\tdiscardPile.add(aCard);\n\t\t\treturn true;\n\t\t}\n\t\telse if (discardPile.get(discardPile.size() - 1).getName() == aCard.getName()) { // If card has the same value as last card played it is valid\n\t\t\tdiscardPile.add(aCard);\n\t\t\tcurrentTurnColor = aCard.getColor();\n\t\t\tif (aCard.getName() == \"Skip\" || aCard.getName() == \"Reverse\" || aCard.getName() == \"Draw Two\") { //if it is a special card it needs to have the action performed\n\t\t\t\tSpecialCardAction(aCard);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse if (currentTurnColor == aCard.getColor()) { // if card is the same color as last card played's color it is valid\n\t\t\tdiscardPile.add(aCard);\n\t\t\tif (aCard.getName() == \"Skip\" || aCard.getName() == \"Reverse\" || aCard.getName() == \"Draw Two\") { //if it is a special card it needs to have the action performed\n\t\t\t\tSpecialCardAction(aCard);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse if (aCard.getName() == \"Wild\" || aCard.getName() == \"Wild Draw Four\") { // if it is a wild or wild draw four card it is valid and performs its special action\n\t\t\tSpecialCardAction(aCard);\n\t\t\tdiscardPile.add(aCard);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasBlackjack()\n {\n return getSumOfCards(false) == 21;\n }", "public boolean isValid() {\n\t\t\n\t\tif (this.size() == 2)\n\t\t\tif (this.getCard(0).getRank() == this.getCard(1).getRank())\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public boolean cardsDealt(int players){\n\t\tif(deck.size()==0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t\t//TODO:\n\t\t//Implement for a variable # of players\n\t}", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "public boolean validateCard(int accountNum) {\n\t\tint index; //loop control variable\n\t\tboolean found; //flag indicating search results\n\t\t\n\t\t//element 0 is the starting point of the search\n\t\tindex = 0;\n\t\t\n\t\t//if the charge number is never found, this value will not be changed\n\t\tfound = false;\n\t\t\n\t\t//now we'll search the array\n\t\twhile(!found && index < chargeCard.length) {\n\t\t\tif(chargeCard[index] == accountNum) {\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn found;\n\t}", "public boolean validCardPlay(UnoCard card) {\r\n return card.getColor() == validColor || card.getValue() == validValue;\r\n }", "public boolean hasFlush(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tfor(int i = 0; i < 4 ; i++) {\r\n\t\t\tif(cards.get(i).getSuit() != cards.get(i+1).getSuit()) {\r\n\t\t\t\treturn false; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true; \r\n\t}", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tint suitValue = hand.get(0).getSuit().getValue();\n\n\t\t\t// check all of the same suit\n\t\t\tfor (int i = 1; i < hand.size(); i++) {\n\t\t\t\tif (hand.get(i).getSuit().getValue() != suitValue)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public boolean hasSet(ArrayList<Card> cards) {\r\n\t\tCollections.sort(cards);\r\n\t\t/*Once the cards are sorted, then the third card can be\r\n\t\t * used to compare with others\r\n\t\t */\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 3);\r\n\t}", "public boolean deckIsEmpty(){\n return getSizeOfDeck() <= 0;\n }", "private boolean isCardValid(Card data) {\n // Check card if it valid to save isValid == true\n boolean isValid = (StringUtils.isEmpty(data.getName()) == false &&\n StringUtils.isEmpty(data.getAddress()) == false &&\n StringUtils.isEmpty(data.getPosition()) == false &&\n StringUtils.isEmpty(data.getGender()) == false);\n\n return isValid;\n }", "@Test\r\n\tpublic void TestFullDeck() {\n\t\t\r\n\t\tassertTrue(deck.getTotalCards() == 52); \r\n\t\tint diamonds = 0; \r\n\t\tint hearts = 0; \r\n\t\tint spades = 0; \r\n\t\tint clubs = 0; \r\n\t\tint rank = 0; \r\n\t\tfor (Card c : deck.getCards()) { \r\n\t\t\tswitch (c.getSuit()) { \r\n\t\t\t\tcase DIAMONDS:\r\n\t\t\t\t\tdiamonds++; \r\n\t\t\t\t\tbreak; \r\n\t\t\t\tcase HEARTS: \r\n\t\t\t\t\thearts++; \r\n\t\t\t\t\tbreak; \r\n\t\t\t\tcase SPADES: \r\n\t\t\t\t\tspades++; \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase CLUBS: \r\n\t\t\t\t\tclubs++; \r\n\t\t\t\t\tbreak; \r\n\t\t\t}\r\n\t\t\trank += c.getRank().getRank();\r\n\t\t}\r\n\t\tassertTrue(diamonds == hearts && hearts == spades && spades == clubs); \r\n\t\tassertTrue(diamonds == 13); \r\n\t\tassertTrue(rank == 416); // A sum of all the card ranks. \r\n\r\n\t}", "private boolean hasAce(ArrayList<Card> cards) {\r\n\t\tfor(Card card: cards) {\r\n\t\t\tif(card.getValue() == 1) {\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 static boolean isValidCard(String card) {\n if (card == null || \"\".equals(card)) return false;\n if (card.length() == 10 || card.length() == 15) {\n return true;\n } else if (card.length() == 18) {\n return isValidChinaCard(card);\n }\n return false;\n\n }", "private boolean validateCard() {\n Card card = new Card(\n editTextCreditCardNumber.getText().toString(),\n selectedMonth,\n selectedYear,\n editTextCCV.getText().toString()\n );\n boolean validation = card.validateCard();\n if (validation) {\n return true;\n } else if (!card.validateNumber()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorNumber), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateExpiryDate()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorExpiryDate), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateCVC()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorCCV), Toast.LENGTH_SHORT).show();\n return false;\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardError), Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "public static boolean validateCreditCard (long creditCardNumber) {\n\t\n\t\t// Sum and credit card number variables\n\t\tint sumOfOdds = 0;\n\t\tint sumOfEvens = 0;\n\t\tint checkSum = 0;\n\t\tlong creditCardNumberForOdds = creditCardNumber;\n\t\tlong creditCardNumberForEvens = creditCardNumber;\n\n\t\t// for loop to get the sum of odd values in credit card number\n\t\tfor (int i = 0; i < 8; i++) {\n\n\t\t\t// Add the first digit from the right to sumOfOdds\n\t\t\tsumOfOdds += creditCardNumberForOdds % 10;\n\n\t\t\t// Divide by 100 to move the decimal place to get access to the next odd number location\n\t\t\tcreditCardNumberForOdds = creditCardNumberForOdds / 100;\n\t\n\t\t}\n\n\t\t// for loop to get the sum of 2 times the remainder of the values in the even locations \n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\n\t\t\t// Divide by 10 to get access the the initial even number location\n\t\t\tcreditCardNumberForEvens = creditCardNumberForEvens / 10;\n\n\t\t\t// Add 2 times the remainder of the value in the even location \n\t\t\tsumOfEvens += (2 * (creditCardNumberForEvens % 10)) % 9;\n\n\t\t\t// Move to the next location by dividing by 10\n\t\t\tcreditCardNumberForEvens = creditCardNumberForEvens / 10;\n\n\t\t}\n\n\t\t// Add the sumOfOdds and sumOfEvens\n\t\tcheckSum = sumOfOdds + sumOfEvens;\n\n\t\t// Validating if checkSum is a multiple of 10\n\t\tif (checkSum % 10 == 0) {\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public static boolean checkBlackjack(ArrayList<Player> players) {\r\n for(Player player : players) {\r\n if(total(player).min() == 32) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean hasCard(Cards card) {\n \t\treturn (cards[card.ordinal()] > 0);\n \t}", "public static boolean hasFlush(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 1; i< cards.length; i++){\n\t\t\tif(cards[0].getSuit() == cards[i].getSuit()){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif(counter==4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n public boolean checkOnePlayerDecksEmpty(int plDeckPosition){\r\n // Is there one player with two empty decks\r\n boolean flag = false;\r\n \r\n //Loop through all decks at deck position for each player\r\n for(Player player : this.players){\r\n if(player.isDeckEmpty(plDeckPosition) && \r\n player.isDeckEmpty(plDeckPosition+1)){\r\n flag = true;\r\n }\r\n }\r\n return flag;\r\n }", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "public static boolean validateCard(String[] args) {\n return true;\n }", "public boolean isStandardDeck() {\n Deck jeff = new Deck () ;\n if (this.cards.length == jeff.cards.length) {\n for (int i = 0; i < this.cards.length; i++ ) {\n if (!this.cards[i].equals(jeff.cards[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "@Test\n public void testShuffleGood() {\n System.out.println(\"shuffleGood\");\n Deck deck = new Deck();\n boolean shuffled = false;\n deck.shuffle();\n //we take out one card from the deck\n Card lastCard = deck.nextCard();\n //we take out 58 more cards\n for (int i =0 ; i<57;i++)\n {\n deck.nextCard();\n }\n //we take out the last card from the deck\n Card firstCard = deck.nextCard();\n \n //if both cards = the same value they were before being shuffled, then test will fail.\n if (lastCard.getValue() != CardType.WILDCARD )\n shuffled = true;\n else if (firstCard.getValue()!=CardType.ZERO)\n shuffled = true;\n \n //if either of the cards are different, that means the deck was shuffled and the test will pass\n assertEquals(true, shuffled);\n }", "private boolean faceCard(ArrayList<Card> cards) {\r\n\t\tfor (Card card: cards) {\r\n\t\t\tif (card.getValue() >= 11 && card.getValue() <= 13) \r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "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 emptyDeck(){\n return this.deckOfCards.isEmpty();\n }", "boolean haveJ(char suit){\n for (int i=0; i<6; i++)\n if ((hand.get(i).suit == suit) && (hand.get(i).rank == 11))\n return true;\n return false;\n }", "public boolean getIsInValidGiftCardAttempts() {\r\n if (getInvalidCardErrorCount() > getMaxInvalidGiftCardAttempts()) {\r\n getGiftCardLogger().logActivity(getCurrentUserIP(), \"INVALID GIFT CARD ATTEMPT\");\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private boolean isValidSolitaireBoard() {\n \n /**\n \u0016The number of piles should be greater than or equal to zero but smaller than piles.length\n should be true\n */\n boolean containsPiles = numPiles >= 0 && numPiles < piles.length;\n \n /**\n The number of piles should be equal to the CARD_TOTAL.\n should be true\n */\n boolean pilesSizeEqualCardTotal = (piles.length == CARD_TOTAL);\n \n /**\n None of the elements in the partially filled array is equal to zero\n should be true\n */\n boolean pilesDoesntContainZeros = true;\n \n /**\n The card sum is equal to the card total\n should be true\n */\n boolean cardSumEqualCardTotal = true;\n \n \n if (containsPiles && pilesSizeEqualCardTotal){\n int cardSum = 0;\n for (int i = 0; i < numPiles; i++){\n cardSum += piles[i];\n //checks if array has any zeros\n if (piles [i] == 0)\n pilesDoesntContainZeros = false;\n }\n //check if the card sum is equal to the card total\n if (cardSum != CARD_TOTAL){\n cardSumEqualCardTotal = false;\n }\n }\n \n //returns true if all true\n return containsPiles && pilesSizeEqualCardTotal && cardSumEqualCardTotal &&\n pilesDoesntContainZeros;\n }", "@Override\r\n public boolean checkAllDecksEmpty(int plDeckPosition) {\r\n // Are all the decks empty\r\n boolean flag = true;\r\n \r\n // Loop through all decks at deck position for each player\r\n for (Player player : this.players) {\r\n if (!player.isDeckEmpty(plDeckPosition)) {\r\n flag = false;\r\n }\r\n }\r\n \r\n // Return the value\r\n return flag;\r\n }", "public boolean hasBlackjack() {\n\t\treturn this.hand.countValue().lower(22) == 21;\n\t}", "private boolean accordingToRules(Card card, Card.Face face, Card.Suit suit){\n return card.getFace() == face || card.getSuit() == suit || card.getFace() == Card.Face.EIGHT;\n }", "private static boolean isValid(char value, Suit suit) {\n for (char validValue : Card.validCardValues)\n if (String.valueOf(validValue).toLowerCase().equals(String.valueOf(value).toLowerCase()))\n return true;\n return false;\n }", "private static boolean flush(ArrayList<CardSuit> suits) {\n //this for loop traverse the suits in order to check if there\n // are two cards of different suits\n for (int i = 1; i < suits.size(); i++) {\n if (suits.get(i) != suits.get(i -1)){\n return false;\n }\n }\n return true;\n }", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public boolean CheckForBlackjack(Player player) {\n\n if (CalcHandSum(player, player.getHand()) == 21 && player.hasAnAce(player.getHand())) {\n return true;\n }\n else{\n return false;\n }\n }", "private boolean validStraight() {\n Collections.sort(this.cards, Card.COMPARE_BY_VALUE);\n ArrayList<String> validHand = new ArrayList<>();\n boolean isStraight = false;\n for (int i = 0; i < this.cards.size(); i++) {\n //Check 5 cards from i to i + 5\n int j = i;\n validHand.add(this.cards.get(i).toString());\n while(j < i + 4 && j < this.cards.size() - 1) {\n Card c1 = this.cards.get(j);\n Card c2 = this.cards.get(j + 1);\n if(c1.isConsecutive(c2))\n validHand.add(c2.toString());\n j++;\n }\n if(j == i + 4 && validHand.size() == 5) {\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n isStraight = true;\n }\n validHand.clear();\n }\n return isStraight;\n }", "@Override\n\tpublic boolean valid(Solitaire game) {\n\t\tif (crosspile.empty())\n\t\t\treturn true;\n\t\tif ((crosspile.peek().isAce()) && (cardBeingDragged.getRank() == cardBeingDragged.KING))\n\t\t\treturn true;\n\t\tif ((cardBeingDragged.getRank() == crosspile.rank() - 1))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean isValid() {\n\t\tif (isPlayer1() && currentPit < 7 && currentPit != 6) {\n\t\t\tif (board[currentPit] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true; // check appropriate side of board, excluding scoring\n\t\t}\n\t\t// pit\n\t\telse if (!isPlayer1() && currentPit >= 7 && currentPit != 13) {\n\t\t\tif (board[currentPit] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isPair(){\n \r\n List<PokerCard> pair;\r\n remainingCardValues = new ArrayList<>();\r\n \r\n //First possibility: first two cards\r\n pair = cards.subList(0, 2);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(2).getValue()); \r\n \r\n return true;\r\n }\r\n \r\n //Second possibility: cards 2 and 3\r\n pair = cards.subList(1, 3);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Third possibility: cards 3 and 4\r\n pair = cards.subList(2, 4);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Fourth possibility: last two cards\r\n pair = cards.subList(3, 5);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(2).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n return false;\r\n }", "public static boolean dcheck() {\n if ((card[0][0] == 0 && card[1][1] == 0 && card[2][2] == 0 && card[3][3] == 0 && card[4][4] == 0) || (card[0][4] == 0 && card[1][3] == 0 && card[2][2] == 0 && card[3][1] == 0 && card[4][0] == 0)) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n } else {\n return false;\n }\n }", "public boolean computerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(computerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public Boolean isTradedCardSetValid() {\r\n\r\n\t\tif (lstTradedCards.size() == 3) {\r\n\r\n\t\t\tif (!isAWildCardSet()) {\r\n\t\t\t\t// If all the cards are same\r\n\t\t\t\tif (lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type)\r\n\t\t\t\t\t\t&& lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// all 3 are different\r\n\t\t\t\telse if (!lstTradedCards.get(0).card_type.equals(lstTradedCards.get(1).card_type)\r\n\t\t\t\t\t\t&& !lstTradedCards.get(1).card_type.equals(lstTradedCards.get(2).card_type)\r\n\t\t\t\t\t\t&& !lstTradedCards.get(0).card_type.equals(lstTradedCards.get(2).card_type)) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\tUtility.writeLog(\"card traded successfully\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (isValidCountWildCard()) {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\t\tUtility.writeLog(\"card traded successfully\");\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcardStatusLabel.setText(\"Please select only/atleast three cards!\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcardStatusLabel.setText(\"Please select only/atleast three cards!\");\r\n\t\treturn false;\r\n\t}", "private static boolean isMatchingSuit(final Card card1, final Card card2, final Card card3, final Card card4, final Card card5)\r\n {\r\n //if the suit of one card does not match, return false\r\n if (!card1.hasSuit(card2) || !card1.hasSuit(card3) || !card1.hasSuit(card4) || !card1.hasSuit(card5))\r\n return false;\r\n if (!card2.hasSuit(card3) || !card2.hasSuit(card4) || !card2.hasSuit(card5))\r\n return false;\r\n if (!card3.hasSuit(card4) || !card3.hasSuit(card5))\r\n return false;\r\n if (!card4.hasSuit(card5))\r\n return false;\r\n \r\n //the suits match\r\n return true;\r\n }", "public static boolean isValid(long num) {\r\n\t\tint sum = sumOfDoubleEvenPlace(num) + sumOfOddPlace(num);\r\n\t\tif (getSize(num) < 13 || getSize(num) > 16) {\t\t\t// duzina broja ne smije biti manja od 13 i veca od 16\r\n\t\t\talert(\"Your credit card number is not long enough!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (prefixMatched(num) == false) {\t\t\t\t\t// ako uslov ne zadovoljava, odnosno ako je false, ispisi poruku\r\n\t\t\talert(\"Your credit card does not start with suitable prefix!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (sum % 10 != 0) {\t\t\t\t\t\t// uslov sume parnih i neparnih brojeva koji mora biti djeljiv sa 10\r\n\t\t\talert(\"Your credit card is invalid!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean hasFlush(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasFlush(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayList<Card> inside the Hand Object was NULL. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\t\n\t\tList<CardSuit> sorted = CollectionHelper.asSortedList(hand.getSuitValues());\n\t\t\n\t\tint highestNumberInARowThusFar=0;\n\t\tint suitsInARow=0;\n\t\tif(sorted.size()>1){\n\t\t\tsuitsInARow=1;\n\t\t\tfor(int i=1; i<sorted.size();i++){\n\t\t\t\tif(sorted.get(i-1).equals(sorted.get(i))){\n\t\t\t\t\tsuitsInARow++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(suitsInARow > highestNumberInARowThusFar){\n\t\t\t\t\t\thighestNumberInARowThusFar = suitsInARow;\n\t\t\t\t\t}\n\t\t\t\t\tsuitsInARow = 1;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif(suitsInARow > highestNumberInARowThusFar){\n\t\t\t\thighestNumberInARowThusFar = suitsInARow;\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Max number of suits found in a row = \"+highestNumberInARowThusFar);\n\t\tif(highestNumberInARowThusFar>4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n public boolean checkPlayerPlayingDeck(int plDeckPosition, int player){\r\n // is current deck empty\r\n boolean flag = true;\r\n\r\n if(!this.players.get(player).isDeckEmpty(plDeckPosition)){\r\n flag = false;\r\n }\r\n return flag;\r\n }", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "public boolean addCard(Card card) {\n int cardCount = 0;\n //Check to see if the deck already has the maximum number of cards\n //of this type.\n for (Card cardInDeck : this.cards)\n if (cardInDeck.equals(card))\n cardCount++;\n //Return false is the card will not fit, or if it is invalid.\n if (cardCount >= this.numPacks || this.topCard >= this.MAX_CARDS || card.errorFlag)\n return false;\n this.topCard++;\n //Add the card object to the deck.\n this.cards[topCard - 1] = new Card(card);\n return true;\n }", "public boolean isEmpty()\n {\n return deck.isEmpty();\n }", "public boolean isInDeck(String cardName){\n boolean status = false;\n ArrayList<Card> cardStatus = getCards();\n for(Card card: cardStatus){\n if(cardName.equals(card.getName())){\n status = true;\n }\n }\n return status;\n }", "boolean takeCard(int playerIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1)\n return false;\n\n // Are there enough Cards?\n if (deck.getNumCards() <= 0)\n return false;\n\n return hand[playerIndex].takeCard(deck.dealCard());\n }", "public ErrorCode checkLegality(List<Card> cardList) {\n if (cardList == null || cardList.size()!=DECK_SIZE) {\n return ErrorCode.CARD_LIST_ERROR;\n }\n Set<Card> set = new HashSet<>(cardList);\n if(set.size() < cardList.size()){\n /* There are duplicates card */\n return ErrorCode.CARD_VALUE_ERROR;\n }\n return ErrorCode.SUCC;\n }", "public boolean check(ArrayList<Card> cards){\n int val = cards.get(0).getVal();\n if(val == 2 || val == 10)\n return true;\n //sevens are special\n if(topCardVal() == 7)\n return (topCardVal() >= val);\n return (topCardVal() <= val);\n }", "@Test\n public void checkValidityTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n assert (g.checkValidity(g.getDeck()));\n }", "private boolean determineValid(){\n for(Integer val : group){\n if(!racers.containsKey(val)){\n WrongNumber = val;\n return false;\n }\n }\n return true;\n }", "public boolean checkBlackJack() {\r\n if(cards.size() == 2 && score() == 21){\r\n blackJack = true;\r\n over = true;\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "@Test\n\tpublic void TestDeal() {\n\t\tArrayList<Player> testPlayers = game.getPlayers();\n\t\tArrayList<Card> allCards = new ArrayList<Card>();\n\t\tSet<Card> allCardsSet = new HashSet<Card>();\n\t\tint handSize = testPlayers.get(0).getCards().size();\n\t\tboolean correctSize = true;\n\t\t\n\t\tfor(Player p : testPlayers) {\n\t\t\tallCards.addAll(p.getCards());\n\t\t\tif(Math.abs(p.getCards().size() - handSize) > 1)\n\t\t\t\tcorrectSize = false;\n\t\t}\n\t\tallCardsSet.addAll(allCards);\n\t\t\n\t\tAssert.assertEquals(correctSize, true);\n\t\tAssert.assertEquals(allCards.size(), 21);\n\t\tAssert.assertEquals(allCards.size(), allCardsSet.size());\n\t}", "public Boolean isValidCountWildCard() {\r\n\t\tint count = 0;\r\n\t\tfor (RiskCardModel card : lstTradedCards) {\r\n\t\t\tif (card.card_type.equals(\"WILD\")) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (count > 1 ? false : true);\r\n\t}", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "private static void validate(Card card) throws CardNumberException {\n card.validateNumber();\n }", "private boolean validInput(Player player, int choice) {\n if (0 <= choice && choice < player.getCards().size()) {\n if(state.getWildDrawPenalty() != 1 && player.getCards().get(choice) instanceof WildDrawCard) {\n return true;\n }\n if( state.getWildDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof WildDrawCard)) {\n System.out.println(\"You should put WildDraw card.\");\n return false;\n }\n if( player.getCards().get(choice) instanceof WildDrawCard){\n boolean validWildDraw = true;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard)) {\n validWildDraw = false;\n }\n }\n if (validWildDraw) {\n return true;\n }\n else {\n System.out.println(\"You can't put WildDraw card.\");\n return false;\n }\n }\n if(state.getDrawPenalty() != 1 && player.getCards().get(choice) instanceof Draw2Card) {\n return true;\n }\n if (state.getDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof Draw2Card)) {\n System.out.println(\"You should put Draw2 card.\");\n return false;\n }\n if ( player.getCards().get(choice).isValidCard(currentCard)) {\n return true;\n }\n System.out.println(\"Enter valid card.\");\n return false;\n }\n System.out.println(\"Enter a number between 1-\" + player.getCards().size() );\n return false;\n }", "private boolean validFullHouse() {\n int highestTwo, highestThree;\n highestTwo = highestThree = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if (value == 2 && key > highestTwo)\n highestTwo = key;\n else if (value == 3 && key > highestThree) {\n //If there exists a higher 3 count, the old 3 count might be bigger than the twoCount\n if(highestThree > highestTwo)\n highestTwo = highestThree;\n highestThree = key;\n }\n }\n if (highestTwo == -1 || highestThree == -1) {\n return false;\n }\n //FullHouse only possible with 2s and 3s\n\n ArrayList<String> validHand = new ArrayList<>();\n int twosCount, threesCount;\n twosCount = threesCount = 0;\n for(int i = 0; i < this.cards.size(); i ++) {\n Card c = this.cards.get(i);\n if(c.sameValue(highestTwo) && twosCount < 2){\n twosCount++;\n validHand.add(c.toString());\n }\n else if(c.sameValue(highestThree) && threesCount < 3) {\n threesCount++;\n validHand.add(c.toString());\n }\n }\n //If above conditional didn't trigger, must be valid FullHouse of some sort\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n return true;\n }", "public boolean isEmpty() {\n return deck.isEmpty();\n }", "private boolean validateVisa() {\r\n\t\tString creditCardNumber = getCreditCardNumber();\r\n\t\t// checking the card number length\r\n\t\tif (creditCardNumber.length() != 13 && creditCardNumber.length() != 16 && creditCardNumber.length() != 19) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// checking the validity of the credit card number\r\n\t\tif (creditCardNumber.charAt(0) != '4') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isValidMove(Card card)\n {\n return false;\n }", "public boolean buyCard ( DevCard cardToBuy) {\n for(int i=0;i<4;i++){\n for(int j=0; j<3;j++){\n if(!devDecksOnTable[i][j].littleDevDeck.isEmpty())\n if((devDecksOnTable[i][j].littleDevDeck.get(0)).equals(cardToBuy)){\n devDecksOnTable[i][j].littleDevDeck.remove(0);\n return true;\n }\n }\n }\n return false;\n }", "@Test\n public void getDeckTest3() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n String s = \"♣♦♥♠\";\n for (char ch : s.toCharArray()) {\n int counter = 0;\n for (Card c : deck) {\n if (c.getSuit().getValue() == ch) {\n counter++;\n }\n }\n assertEquals(counter, 13);\n }\n }", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public static boolean isBlackjack(ArrayList<Card> hand)\n\t{\n\t\tif(hand.size()==2 && ((hand.get(0).getValue()==1 && hand.get(1).getValue()>10) || (hand.get(0).getValue()>10 && hand.get(1).getValue()==1)))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean containCreditCard(ArrayList<CreditCard> card){\n\t\tfor (CreditCard creditCard : creditCards){\n\t\t\tfor (CreditCard creditCard1 : card){\n\t\t\t\tif(creditCard.equals(creditCard1))return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.8238207", "0.7313629", "0.71760833", "0.7066001", "0.6979502", "0.6811008", "0.6741653", "0.6726894", "0.6697196", "0.66181856", "0.6540706", "0.65119624", "0.64441603", "0.64277583", "0.6317823", "0.6300059", "0.6299096", "0.62905866", "0.613924", "0.6138448", "0.6118648", "0.61073285", "0.6079052", "0.6074845", "0.6063084", "0.6061465", "0.6059372", "0.6056331", "0.60469306", "0.6038623", "0.6032136", "0.60191333", "0.6008728", "0.5987141", "0.59837914", "0.5966039", "0.59612703", "0.5923703", "0.5917165", "0.590676", "0.5904835", "0.5874803", "0.5873219", "0.5855898", "0.58554566", "0.5846395", "0.58354473", "0.58311176", "0.58192843", "0.5802437", "0.57929945", "0.57744575", "0.57334507", "0.57221395", "0.5713003", "0.57121843", "0.5687681", "0.5687123", "0.56841534", "0.56488913", "0.56420916", "0.56366605", "0.56360805", "0.5618891", "0.561811", "0.56127006", "0.56072354", "0.5602915", "0.5598928", "0.5590857", "0.55886316", "0.5577748", "0.557473", "0.5546771", "0.55458015", "0.554176", "0.55416787", "0.55385876", "0.5531254", "0.55260766", "0.55238295", "0.55222535", "0.5517438", "0.5512436", "0.5504509", "0.5502658", "0.54984844", "0.5489748", "0.5485906", "0.5483526", "0.54754454", "0.5469926", "0.54663354", "0.5457563", "0.54503083", "0.5447939", "0.5445646", "0.5444593", "0.5438784", "0.543328" ]
0.8652007
0
1 agregar una persona
public static void main(String[] args) { try { System.out.print("Id resultado: " + PersonaABM.getInstancia().agregar("Apellido", "Generic", 14)); System.out.println(""); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void crearNuevaPersona(Persona persona);", "public void addPerson(Person p);", "static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }", "public void addPerson(Person thePerson) {\r\n staff.add(thePerson);\r\n }", "public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\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\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\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\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public int agregar(Persona p) {\n\t\tint r=0;\n\t\t\n\t\t\n\t\t String query = \"INSERT INTO TABLA (Id, nombre) values (?, ?)\";\n\t\ttry {\n\t\t\t\n\t\t\tcon= c.conectar();\n\t\t\tps=con.prepareStatement(query);\n\t\t\t\n\t\t\tps.setString(1, p.getId());\n\t\t\tps.setString(2, p.getNom());\n\t\t\tr=ps.executeUpdate();\n\t\t\tif(r==1) {\n\t\t\t\tr=1;\n\t\t\t}else {\n\t\t\t\tr=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn r;\n\t\t\n\t\t\n\t\t\n\t}", "public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }", "public void add(Person person) {\n\t\tteilnehmerListe.add(person);\n\t}", "private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}", "void lookupAndSaveNewPerson();", "private void addPerson(){\r\n\t\tpeople.add(new Person(this));\r\n\t\t// fire the listeners so the screen updates\r\n\t\t// when addPerson is called (by the button click)\r\n\t\tpersonTableModel.fireTableRowsInserted(0,0);\r\n\t}", "@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}", "void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;", "private String addPerson()\n {\n String phone = getPhone();\n System.out.println(\"Person tilføjet.\");\n System.out.println(\"\");\n return phone;\n }", "public void CreatePerson(Person p){\n\t\tWeddingConnectionPoolManager con = new WeddingConnectionPoolManager(); \n\t\t Person p1 = new Person(p.getId(), p.getFirstName(), p.getLastName(), p.getRelationship(),\n\t\t\t\t p.getAddress(), p.getPhone(), p.getEmail(), p.getComment(), user.getId());\n\t\t System.out.println(\"p1 : \" + p1);\n\t\t System.out.println(\"p : \" + p);\n\t\t// TODO - should to iterate on the results that returns when calling to \"getpersons\" method.\n\t\tPersonDBManager.getInstance().CreateNewPerson(con.getConnectionFromPool(), p1);\t\n\t}", "public void addPerson(Person2 p){\n\t\tint index = 0;\r\n\t\tpersons = new Person2[50];\r\n\t\t\r\n\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\tif(persons[i] == null){ // location available\r\n\t\t\t\tindex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(index < persons.length){\r\n\t\t\tpersons[index] = p;\r\n\t\t}\r\n\t}", "public void addPerson() {\n\t\tSystem.out.println(\"*****ADD RECORDS*****\");\n\t\tSystem.out.println(\"How many records you want to add?\");\n\t\tint numOfRecods = sc.nextInt();\n\t\tcount = 0;\n\t\tfor (int i = 1; i <= numOfRecods; i++) {\n\t\t\tSystem.out.println(\"Enter the First name\");\n\t\t\tString firstName = sc.next();\n\t\t\tperson.setFirstName(firstName);\n\n\t\t\tSystem.out.println(\"Enter the Last name\");\n\t\t\tString lastName = sc.next();\n\t\t\tperson.setLastName(lastName);\n\n\t\t\tSystem.out.println(\"Enter your Address\");\n\t\t\tString address = sc.next();\n\t\t\tperson.setAddress(address);\n\n\t\t\tSystem.out.println(\"Enter your City\");\n\t\t\tString city = sc.next();\n\t\t\tperson.setCity(city);\n\n\t\t\tSystem.out.println(\"Enter your State\");\n\t\t\tString state = sc.next();\n\t\t\tperson.setState(state);\n\n\t\t\tSystem.out.println(\"Enter your Zip Code\");\n\t\t\tint zipcode = sc.nextInt();\n\t\t\tperson.setZip(zipcode);\n\n\t\t\tSystem.out.println(\"Enter your Phone Number\");\n\t\t\tlong phone = sc.nextLong();\n\t\t\tperson.setPhoneNo(phone);\n\n\t\t\tdetails[count++] = new Person(firstName, lastName, address, city, state, zipcode, phone);\n\t\t\tSystem.out.println(i + \" records added successfully\");\n\t\t}\n\t\tSystem.out.println(\"All records are added successfully\\n\");\n\t}", "ParqueaderoEntidad agregar(String nombre);", "public void create(Person p) {\n\t\t\n\t}", "public void agregarPlanta(Integer id_planta, String nombre_planta, Boolean esAcopio) {\n\t\t\n\t\tPlanta p1 = new Planta(id_planta, nombre_planta, esAcopio);\n\t\tlistaPlantas.add(p1);\n\t}", "public void add(Person person) {\n\t\t\t\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\tsession.save(person);\n\t}", "public void addRegistro(String nombre, String apellidos, String dni) {\r\n\t\t\r\n\t\tSession ss = Util.getSessionFactory().openSession();\r\n\t\tTransaction tr = null;\r\n\t\ttry {\r\n\t\t\ttr = ss.beginTransaction();// comenzamos a hacer cositas\r\n\t\t\t// id incremental,por eso pongo cero\r\n\t\t\tPersona p = new Persona(0, nombre, apellidos, dni);\r\n\t\t\tss.save(p);\r\n\t\t\ttr.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\tSystem.out.println(\"Pako_error= \" + e);\r\n\t\t} finally {\r\n\t\t\tss.close();\r\n\t\t\t// System.out.println(\"Final\");\r\n\t\t}\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson addNewControlPersonsExt();", "public static void regPerson(){\n\t\tSystem.out.println(\"Skriv inn navnet, trykk enter, skriv så inn alder, trykk enter, og til slutt skriv inn bosted og trykk enter!\");\n\t}", "void addPerson(Player player);", "protected ProcessAddPerson() {\n }", "public void addperson(Person p, int floorNum) {\n\r\n\r\n }", "@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}", "public void add(Person person) {\n\t\tlistOfPeople.add(person);\n\t\t\n\t}", "public void add(Person person){\n\t\tpersonRepository.add(person);\n\t}", "@Override\r\n\tpublic void create(Person person) {\n\r\n\t}", "void AddPatiant(Patient p) throws Exception;", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}", "public void addPerson(Person per) {\r\n\t\tthis.persons.put(per.getPersonID(), per);\r\n\t}", "public Persona(int idPersona){\n this.idPersona = idPersona;\n }", "public Person addPerson(Person person) {\n \tqueryExecutor.insertPerson(person);\n \t//personMap.put(person.getName(), person);\n return person;\n }", "private void registrar() {\n String nombre = txtNombre.getText();\n if (!nombre.trim().isEmpty()) {\n Alumno a = new Alumno();\n \n // cont++ , ++cont\n// contIds++;\n a.setNombre(nombre);\n a.setId(++contIds);\n \n listaAlumnos.add(a);\n\n lblCantidad.setText(\"Cantidad de nombres: \" + listaAlumnos.size());\n\n txtNombre.setText(null);\n txtNombre.requestFocus();\n // Actualiza la interfaz gráfica de la tabla\n tblNombres.updateUI();\n \n// int cont = 1;\n// System.out.println(\"------------------\");\n// System.out.println(\"Listado de alumnos\");\n// System.out.println(\"------------------\");\n// for (String nom : listaNombres) {\n// System.out.println(cont+\") \"+nom);\n// cont++;\n// }\n// System.out.println(\"------------------\");\n }\n }", "@PostMapping(\"/add\")\n public ModelAndView addSocio(Persona persona) {\n personaService.addPersona(persona);\n return new ModelAndView(\"redirect:/admin/socios\");\n }", "public void addPerson(String name, String id) {\n if (personIds.contains(id)) {\n return;\n }\n personNames.add(name);\n personIds.add(id);\n personPhotos.add(getBitmapFromId(context, id));\n personSelections.add(new HashSet<Integer>());\n }", "void addParticipant(Participant participant);", "@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 boolean register(Person person) { \n // TODO 1\n return members.add(person);\n }", "public void add (String id, String email, int type, String name);", "void addPhoneToPerson(Phone phone,int personId);", "public void add(String nome, Object obj);", "public Persona(String nombre) {\n this.nombre = nombre;\n }", "public static Person addAPerson()\n\t{\n\t\tSystem.out.println(\"Enter FirstName \");\n\t\tString firstName=sc1.next(); // firstName\n\t\tSystem.out.println(\"Enter LastName\");\n\t\tString lastName=sc1.next(); // lastName\n\t\tSystem.out.println(\"Enter Address \");\n\t\tString address=sc1.next(); // address\n\t\tSystem.out.println(\"Enter State \");\n\t\tString state=sc1.next(); // state\n\t\tSystem.out.println(\"Enter City \");\n\t\tString city=sc1.next(); // city\n\t\tSystem.out.println(\"Enter Zip \");\n\t\tString zip=sc1.next(); // zip\n\t\tSystem.out.println(\"Enter Phone Number \");\n\t\tString phoneNumber=sc1.next(); // phoneNumber\n\t\tPerson person = new Person(firstName, lastName, address, state, city, zip, phoneNumber);\n\t\tsc1.close();\n\t\treturn person;// returns person object created\n\n\t}", "@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}", "public Persona(int idPersona, String nombre, String apellido, String email, String telefono){\n this.idPersona = idPersona;\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n \n }", "public static void AddPerson(Person person)\n {\n dataWraper.addRecordTrans(person, dataWraper.tables.get(Person.class.getAnnotation(Entity.class).name()), null);\n }", "int insertSelective(PersonRegisterDo record);", "@POST\n @Produces({ \"application/json\" })\n @CommitAfter\n public abstract Response addNew(Person person);", "public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}", "int insertName(String nmNameLast, int idPerson);", "public void create(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"INSERT INTO PERSONNE_1 (ID, Nom ,Prenom)\" + \"VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1,ID);\n\t\t\tps.setString(2,pers.getNom());\n\t\t\tps.setString(3,pers.getPrenom());\n\t\t\tps.executeUpdate();\n\t\t\tID++;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }", "public void agregarPersona(PersonaDTO persona, Set<TelefonoDTO> telefonos, Set<DireccionDTO> direcciones,\n\t\t\tSet<CorreoElectronicoDTO> correos) throws CustomErrorException, CustomValidationException {\n\t\ttry {\n\t\t\t// Vemos si tiene lo necesario, sino salimos\n\t\t\tif (telefonos.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.TELEFONO_NECESARIO);\n\t\t\t}\n\t\t\tif (direcciones.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.DIRECCION_NECESARIA);\n\t\t\t}\n\t\t\tif (correos.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.CORREO_NECESARIO);\n\t\t\t}\n\t\t\t//Evaluamos si se trata de un modificacion\n\t\t\tif (persona.getIdPersona() == null) {\n\t\t\t\t//Es un alta\n\t\t\t\t//Persistir las entidades agregadas\n\t\t\t\tfor (TelefonoDTO t: telefonos) {\n\t\t\t\t\tt.setIdTelefono(persistirTelefono(Converter.toEntity(t))); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (DireccionDTO d: direcciones) {\n\t\t\t\t\td.setIdDireccion(persistirDireccion(Converter.toEntity(d)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (CorreoElectronicoDTO c: correos) {\n\t\t\t\t\tc.setIdCorreoElectronico(persistirCorreoElectronico(Converter.toEntity(c)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Las entidades están peristentes, asignarlas a la persona\n\t\t\t\tpersona.setTelefonos(telefonos);\n\t\t\t\tpersona.setCorreos(correos);\n\t\t\t\tpersona.setDirecciones(direcciones);\n\t\t\t\t\n\t\t\t\t//persistir la persona\n\t\t\t\tgPersona.add(Converter.toEntity(persona));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tmodificarPersona(persona, telefonos, direcciones, correos);\n\t\t\t}\n\t\t\t\n\t\t} catch(CustomErrorException cer) {\n\t\t\tthrow cer;\n\t\t} catch (Exception e) {\n\t\t\tif(persona.getIdPersona() == null) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (TelefonoDTO t : telefonos) {\n\t\t\t\t\t\tgTelefono.delete(Converter.toEntity(t));\n\t\t\t\t\t}\n\t\t\t\t\tfor (DireccionDTO d : direcciones) {\n\t\t\t\t\t\tgDireccion.delete(Converter.toEntity(d));\n\t\t\t\t\t}\n\t\t\t\t\tfor (CorreoElectronicoDTO c : correos) {\n\t\t\t\t\t\tgCorreoElectronico.delete(Converter.toEntity(c));\n\t\t\t\t\t} \n\t\t\t\t}catch (CustomErrorException cer) {\n\t\t\t\t\tthrow cer;\n\t\t\t\t}catch (Exception e2) {\n\t\t\t\t\tthrow new CustomErrorException(CustomErrorException.ERROR_SERVICIO,this.getClass().getSimpleName(),e.getStackTrace());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}", "public void addUser(Person person){\n \t\n \ttry {\n\t\t\tperson.sethPassword(Base64.getEncoder().encodeToString(MessageDigest.getInstance(\"SHA-256\").digest(person.gethPassword().getBytes(StandardCharsets.UTF_8))));\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \t\n \t\n \tSystem.out.println(\"aanmaken van \" + person.getLogin());\n \tem.persist(person);\n \t\n }", "public void addPerson(T people) {\r\n\t Node tempNode = new Node(people); // the node added by the user \r\n\t \r\n\t if (isEmpty()) { \r\n\t firstNode = tempNode; // if empty set first node to 1, aka the first node \r\n\t currentNode = firstNode; // the current node will also be the first nod e\r\n\t } else {\r\n\t currentNode.next = tempNode; // if its not empty , current node is equal to the node ( of the people ) ; \r\n\t }\r\n\t \r\n\t tempNode.next = firstNode; // this way tempNode.next will always be equal to 1, aka the first Node \r\n\t lastNode = tempNode; // this will make the last node in the list equal to the most current/ last node added \r\n\t skip(); // resetting current node to 1, aka the first node \r\n\t nodeCount++; // adding to the node count \r\n\t }", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "public int addPerson(String name, int birthDay, int birthMonth, int birthYear) {\r\n if (this.getPersonIndex(name) == -1) {\r\n this.personList.add(new Person(name, birthDay, birthMonth, birthYear));\r\n return this.personList.size() - 1; //return index of new person\r\n } else {\r\n return -1;\r\n }\r\n }", "public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"[email protected]\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}", "public boolean insertPerson(SamplePerson person) {\n //TODO\n throw new NotImplementedException();\n }", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "@Override\r\n\tpublic PersonneDTO addPersonne(Personne personne) {\n\t\treturn daoPersonne.addPersonne(personne);\r\n\t}", "int insert(PersonRegisterDo record);", "public <T> void addPerson(Person p) {\n\t\tsession.save(p);\n\t}", "private void reposicionarPersonajes() {\n // TODO implement here\n }", "@RequestMapping(value = \"/AgregarPersona\", method = RequestMethod.GET)\n\tpublic ModelAndView AgregarPersona() {\n\t\t//prepara para generar nuevo registro de persona\n\t\tmav.addObject(new Persona());\n\t\tmav.setViewName(\"agregarPersona\");\n\t\treturn mav;\n\t}", "public void addPersona( Persona persona ) throws Exception \n\t{\n\n\t\tDAOPersona dao = new DAOPersona();\n\t\ttry\n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tdao.addPersona(persona);\n\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}", "@FXML\n private void handleNewPerson() {\n Shops tempShops = new Shops();\n boolean okClicked = mainApp.showPersonEditDialog(tempShops);\n if (okClicked) {\n mainApp.getPersonData().add(tempShops);\n }\n }", "private void addDefaultPerson() {\n personNames.add(\"you\");\n personIds.add(STConstants.PERSON_NULL_ID);\n personPhotos.add(null);\n personSelections.add(new HashSet<Integer>()); \n }", "public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void addMember(Person person) {\n\t\tmembers.add(person);\n\t}", "public void nyPerson() {\r\n System.out.println(\"Skriv inn navnet paa personen\");\r\n String person = scan.nextLine().toLowerCase();\r\n if (!personListe.containsKey(person)) {\r\n personListe.put(person, new Person(person));\r\n }\r\n else {\r\n System.out.println(\"Denne personen finnes alt!\");\r\n }\r\n }", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "public int addSickPerson(SickPerson sickPerson) throws SQLException;", "public void addPerson(Person person) throws DataAccessException {\n String sql = \"INSERT INTO Person(personId,AssociatedUsername,firstName,lastName,\" +\n \"gender,father,mother,spouse) VALUES(?,?,?,?,?,?,?,?)\";\n\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setString(1, person.getPersonID());\n pstmt.setString(2, person.getAssociatedUsername());\n pstmt.setString(3, person.getFirstName());\n pstmt.setString(4, person.getLastName());\n pstmt.setString(5, person.getGender());\n pstmt.setString(6, person.getFatherID());\n pstmt.setString(7, person.getMotherID());\n pstmt.setString(8, person.getSpouseID());\n pstmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }", "@Override\n\tpublic void agregar(Alumno alumno) {\n\t\tcomision.add(alumno);\n\t}", "public void addPerson(Person object)\n\t{\n\t\tthis.peopleList.add(object);\n\t}", "public Persona(String nombre) {\n\t\tthis.nombre = nombre;\n\t}", "@Override\r\n public boolean create(Person person) {\n return false;\r\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 int addPerson(Person p, int arrayIndex) {\n if( arrayIndex < 0 || arrayIndex >= listOfPatients.length){\n return -1;\n }\n \n try{\n listOfPatients[arrayIndex] = p;\n }catch(Exception e){\n return -1;\n }\n return 0;\n }", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "public void agregar(Provincia provincia) throws BusinessErrorHelper;", "private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void addPerson(Scanner sc){\n Person person = new Person(sc);\n currentPort = (SeaPort) hashMap.get(person.getParent());\n currentPort.setPerson(person);\n hashMap.put(person.getIndex(), person);\n everything.add(person);\n }", "public void GuardarPersonas()\r\n {\r\n System.out.print(\"Inserte su numero de cedula: \");\r\n setNumeroId(entrada.nextLine());\r\n System.out.print(\"Inserte su Primer Nombre: \");\r\n setNombre(entrada.nextLine());\r\n System.out.print(\"Inserte su Primer Apellido: \");\r\n setPrimerApellido(entrada.nextLine());\r\n System.out.print(\"Inserte su Segundo Apellido: \");\r\n setSegundoApellido(entrada.nextLine());\r\n System.out.print(\"Inserte su edad: \");\r\n setEdad(Integer.parseInt(entrada.nextLine()));\r\n System.out.print(\"Inserte su peso: \");\r\n setPeso(Float.valueOf(entrada.nextLine()));\r\n \r\n }", "@Override\r\n\tpublic void ajouterPersonne(Personne p) {\r\n\t\tem.persist(p);\r\n\t}", "public static void CCommand(String name) {\n Person tempPerson = new Person(name);\n if (Interface.persons.contains(Interface.persons, tempPerson)) {\n System.out.println(\"Error: A name only can exists for a person. Either delete the existing person or create a person with different name.\");\n return;\n }\n Interface.persons = Interface.persons.add(Interface.persons, tempPerson);\n System.out.println(name + \" has been added.\");\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "public void addAccount(Account account,Person person);", "public void add(Person person) {\n\t\tlogger.debug(\"Adding new person\");\n\t\t// Persists to db\n\t\tentityManager.persist(person);\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson insertNewControlPersonsExt(int i);", "public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }", "void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;", "public boolean NuevoAfiliado(String nombrePersona, String numeroDui) {\n if (!Afiliados.contains(nombrePersona)) { //Verificar que sta persona no este agregada.\n //Agregar nuevo afiliado.\n Afiliados.add(nombrePersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n NumeroDui.add(numeroDui);\n return true;\n }\n return false;\n }" ]
[ "0.7714015", "0.7329832", "0.7195031", "0.7191404", "0.7154227", "0.71065885", "0.7080489", "0.70615095", "0.7048872", "0.70064765", "0.69931155", "0.6897875", "0.6890305", "0.68744427", "0.6790048", "0.6786885", "0.6780705", "0.67497617", "0.67109424", "0.6708584", "0.66790634", "0.6674688", "0.6674077", "0.6659063", "0.6631426", "0.66220385", "0.66071486", "0.660261", "0.6585796", "0.65848035", "0.65769863", "0.65671784", "0.65267223", "0.6518475", "0.6514314", "0.6470877", "0.6466526", "0.6457853", "0.64540195", "0.645052", "0.6431961", "0.64192325", "0.6393188", "0.6391308", "0.63880295", "0.6375407", "0.63748896", "0.63665867", "0.63530684", "0.6349169", "0.6339128", "0.6338067", "0.63213474", "0.631969", "0.6316333", "0.63139814", "0.6310451", "0.6308829", "0.6302955", "0.62994325", "0.6298506", "0.62983286", "0.6287957", "0.627856", "0.627742", "0.62755525", "0.62739444", "0.6266493", "0.6264344", "0.6263798", "0.6259374", "0.6246745", "0.6245695", "0.62368655", "0.62311", "0.6228938", "0.6222294", "0.6222165", "0.6216591", "0.6191258", "0.6188499", "0.6188287", "0.6182041", "0.6180653", "0.6179978", "0.6179399", "0.61781186", "0.61770475", "0.6165073", "0.61641073", "0.6162537", "0.6149087", "0.61441225", "0.6141291", "0.6138472", "0.6134995", "0.61287874", "0.6127163", "0.61242086", "0.6116842", "0.6113504" ]
0.0
-1
Get an instance of face service client to detect faces in image.
@Override protected Face[] doInBackground(InputStream... params) { FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient(); try{ publishProgress("Detecting..."); // Start detection. return faceServiceClient.detect( params[0], /* Input stream of image to detect */ true, /* Whether to return face ID */ false, /* Whether to return face landmarks */ /* Which face attributes to analyze, currently we support: age,gender,headPose,smile,facialHair */ null); } catch (Exception e) { publishProgress(e.getMessage()); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "public static BufferedImage contornarFace(BufferedImage pImage) {\n System.out.println(\"\\nRunning DetectFaceDemo\");\n\n // Create a face detector from the cascade file in the resources\n // directory.\n int rows = pImage.getWidth();\n int cols = pImage.getHeight();\n int type = CvType.CV_16UC1;\n Mat image = new Mat(rows, cols, type);\n\n // Detect faces in the image.\n // MatOfRect is a special container class for Rect\n CascadeClassifier faceDetector = new CascadeClassifier();\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n Rect[] facesArray = faceDetections.toArray();\n for (int i = 0; i < facesArray.length; i++) {\n Core.rectangle(image, facesArray[i].tl(), facesArray[i].br(), new Scalar(200, 200, 200), 3);\n }\n return matTOImg(image);\n\n }", "public static FaceDetection getInstance()\n\t{\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "public static BufferedImage detectFace(BufferedImage newPhoto) {\n\t\tIplImage faceImage = IplImage.createFrom(newPhoto);\n\t\tCvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(\"res/haarcascade_frontalface_default.xml\"));\n\t\tCvMemStorage storage = CvMemStorage.create();\n\t\tCvSeq sign = cvHaarDetectObjects(faceImage, cascade, storage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);\n\t\tcvClearMemStorage(storage);\n\t\t\n\t\t//if not faces detected, returns null.\n\t\tif (sign.total() == 0){\n\t\t\tnewPhoto = null;\n\t\t\tSystem.out.println(\"No Face\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tIplImage newImage; //IplImage used to temporarily hold the face\n\t\t\tint biggest = 0; //location of biggest face\n\t\t\tint biggestSize = 0; //height of biggest face\n\t\t\tCvRect r;\n\t\t\tfor (int i = 0; i < sign.total(); i++){\n\t\t\t\tr = new CvRect(cvGetSeqElem(sign, i));\n\t\t\t\t\n\t\t\t\tif (r.height() > biggestSize){\n\t\t\t\t\tbiggest = i;\n\t\t\t\t\tbiggestSize = r.height();\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\tcvResetImageROI(faceImage);\n\t\t\tr = new CvRect(cvGetSeqElem(sign, biggest));\n\t\t\tcvSetImageROI(faceImage, r);\n\t\t\t//sets size of newImage to same as face\n\t\t\tnewImage = cvCreateImage(cvGetSize(faceImage), faceImage.depth(), faceImage.nChannels());\n\t\t\t//Copies the face into newImage\n\t\t\tcvCopy(faceImage, newImage);\n\t\t\tcvResetImageROI(faceImage);\n\t\t\t//Converts back to BufferedImage\n\t\t\tnewPhoto = newImage.getBufferedImage();\n\t\t}\n\t\t//If null = no faces detected\n\t\treturn newPhoto;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync(Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n callBackService.failed(new Error(e.getMessage(),imageFace.getRequestTake()));\n return null;\n }\n }", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try{\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n Log.e(LOG_TAG1,\"error in background in DetectionTask\");\n doneSignal.countDown();\n return null;\n }\n }", "public String getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "boolean getFaceDetectionPref();", "private void initFaceTracker(boolean isFrontFacing) {\n if (faceDetector != null) {\n isReleased = true;\n faceDetector.release();\n }\n\n faceDetector = new FaceDetector.Builder(context).setTrackingEnabled(true)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n //.setMode(gameManager.getCurrentGame() != null &&\n // gameManager.getCurrentGame().getId().equals(Game.GAME_COOL_CAMS)\n // ? FaceDetector.ACCURATE_MODE : FaceDetector.FAST_MODE)\n .setMode(FaceDetector.ACCURATE_MODE)\n .setProminentFaceOnly(isFrontFacing)\n .setMinFaceSize(isFrontFacing ? 0.35f : 0.15f)\n .build();\n\n isReleased = false;\n\n //Detector.Processor<Face> processor;\n //if (isFrontFacing) {\n // Tracker<Face> tracker = new TribeFaceTracker();\n // processor = new LargestFaceFocusingProcessor.Builder(faceDetector, tracker).build();\n //} else {\n // MultiProcessor.Factory<Face> factory = face -> new TribeFaceTracker();\n // processor = new MultiProcessor.Builder<>(factory).build();\n //}\n\n faceDetector.setProcessor(\n new LargestFaceFocusingProcessor.Builder(faceDetector, new TribeFaceTracker()).build());\n\n //faceDetector.setProcessor(processor);\n\n if (!faceDetector.isOperational()) {\n isFaceTrackerEnabled = false;\n }\n }", "public String getFace() {\n\t\treturn face;\n\t}", "public interface FaceService {\n /**\n *发送图片给设备端\n * @param snCode\n * @param file\n * @return\n * @throws Exception\n */\n\n ResponseData sendImg(String snCode, MultipartFile file) throws Exception;\n\n /**\n *开始/停止 比对 (图像与视频流比对)\n * @param snCode\n * @param content\n * @return\n * @throws Exception\n */\n ResponseData stop(String snCode, String type, String content) throws Exception;\n\n ResponseData start(String snCode, String content,String token, MultipartFile file) throws Exception;\n\n// ResponseData start( String snCode, String content) throws Exception;\n /**\n *拉流接口,拼接一个拉流地址给前端\n * @param snCode\n * @param content\n * @return\n * @throws Exception\n */\n ResponseData pushStream(String snCode, String content) throws Exception;\n\n ResponseData takePhoto(String snCode, String content) throws Exception;\n\n void receiveImage(receiveImgBody revBody);\n\n void receiveResponse(CompareResult compareResult);\n}", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public Observable<FoundFacesInner> findFacesAsync(Boolean cacheImage) {\n return findFacesWithServiceResponseAsync(cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "public Observable<ServiceResponse<FoundFacesInner>> findFacesFileInputWithServiceResponseAsync(byte[] imageStream) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.findFacesFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public Face[] getFaces() {\n return faces;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }", "protected int getFace() {\n return face;\n }", "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "public int faces() { \n return this.faces; \n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.findFacesFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public int getFace() {\n\t\treturn face;\n\t}", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "DetectionResult getObjInImage(Mat image);", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "public interface IFaceDetectListner {\n\n void DetectFaceSuccess(double score, String msg);\n\n void DetectFaceFailed(double core, String msg);\n\n}", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "private native int applyFaceDetection2(byte[] data,int len,int width,int height);", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "public String getFaceurl() {\n return faceurl;\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public int getFace(){\n return face;\n }", "public int getFaces() {\n return this.faces;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "@Override\r\n\t\tpublic void run() {\r\n\t\t\t/* face detector only needs grayscale image */\r\n\t\t\tgrayToRgb(graybuff_,rgbs_);\t\t\t\t\t\t\t\t\t\t// jni method\r\n//\t\t\tgray8toRGB32(graybuff_,previewWidth_,previewHeight_,rgbs);\t\t// java method\r\n\t\t\tfloat aspect = (float)previewHeight_/(float)previewWidth_;\r\n\t\t\tint w = prevSettingWidth_;\r\n\t\t\tint h = (int)(prevSettingWidth_*aspect);\r\n\t\t\tfloat xScale = (float)previewWidth_/(float)prevSettingWidth_;\r\n\t\t\tfloat yScale = (float)previewHeight_/(float)prevSettingHeight_;\r\n\t\t\tBitmap bmp = Bitmap.createScaledBitmap(\r\n\t\t\t\t\t\tBitmap.createBitmap(rgbs_,previewWidth_,previewHeight_,Bitmap.Config.RGB_565),\r\n\t\t\t\t\t\tw,h,false);\r\n//\t\t\tLog.i(TAG,\"downscale w=\"+bmp.getWidth()+\",h=\"+bmp.getHeight());\r\n\t\t\tint prevfound=0,trackfound=0;\r\n\t\t\tfor(int i=0; i<MAX_FACE; i++){\r\n\t\t\t\tFaceResult face = faces_[i];\r\n\t\t\t\tfloat eyedist = face.eyesDistance();\r\n\t\t\t\tif(eyedist==0.0f)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tPointF midEyes = new PointF(); \r\n\t\t\t\tface.getMidPoint(midEyes);\r\n\t\t\t\tprevfound++;\r\n\t\t\t\tPointF lt = new PointF(midEyes.x-eyedist*2.5f,midEyes.y-eyedist*2.5f);\r\n\t\t\t\tRect rect = new Rect((int)(lt.x),(int)(lt.y),(int)(lt.x+eyedist*5.0f),(int)(lt.y+eyedist*5.0f));\r\n\t\t\t\t/* fix to fit */\r\n\t\t\t\trect.left = rect.left < 0 ? 0 : rect.left;\r\n\t\t\t\trect.right = rect.right > w ? w : rect.right;\r\n\t\t\t\trect.top = rect.top < 0 ? 0 : rect.top;\r\n\t\t\t\trect.bottom = rect.bottom > h ? h : rect.bottom;\r\n\t\t\t\tif(rect.left >= rect.right || rect.top >= rect.bottom )\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t/* crop */\r\n\t\t\t\tBitmap facebmp = Bitmap.createBitmap(bmp,rect.left,rect.top,rect.width(),rect.height());\r\n\t\t\t\tFaceDetector.Face[] trackface = new FaceDetector.Face[1];\r\n\t\t\t\tFaceDetector tracker = new FaceDetector( facebmp.getWidth(),facebmp.getHeight(),1); \r\n\t\t\t\tint found = tracker.findFaces(facebmp, trackface);\r\n\t\t\t\tif(found!=0){\r\n\t\t\t\t\tPointF ptTrack = new PointF();\r\n\t\t\t\t\ttrackface[0].getMidPoint(ptTrack);\r\n\t\t\t\t\tptTrack.x += (float)rect.left;\r\n\t\t\t\t\tptTrack.y += (float)rect.top;\r\n\t\t\t\t\tptTrack.x *= xScale;\r\n\t\t\t\t\tptTrack.y *= yScale;\r\n\t\t\t\t\tfloat trkEyedist = trackface[0].eyesDistance()*xScale;\r\n\t\t\t\t\tfaces_[i].setFace(ptTrack,trkEyedist);\r\n\t\t\t\t\ttrackfound++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(prevfound==0||prevfound!=trackfound){\r\n\t\t\t\tFaceDetector.Face[] fullResults = new FaceDetector.Face[MAX_FACE];\r\n\t\t\t\tfdet_.findFaces(bmp, fullResults);\r\n\t\t\t\t/* copy result */\r\n\t\t\t\tfor(int i=0; i<MAX_FACE; i++){\r\n\t\t\t\t\tif(fullResults[i]==null)\r\n\t\t\t\t\t\tfaces_[i].clear();\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tPointF mid = new PointF();\r\n\t\t\t\t\t\tfullResults[i].getMidPoint(mid);\r\n\t\t\t\t\t\tmid.x *= xScale;\r\n\t\t\t\t\t\tmid.y *= yScale;\r\n\t\t\t\t\t\tfloat eyedist = fullResults[i].eyesDistance()*xScale;\r\n\t\t\t\t\t\tfaces_[i].setFace(mid,eyedist);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/* post message to UI */\r\n\t\t\thandler_.post(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\toverlayLayer_.postInvalidate();\r\n\t\t\t\t\t// turn off thread lock\r\n\t\t\t\t\tisThreadWorking_ = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "public UUID faceId() {\n return this.faceId;\n }", "public interface FaceTrackingListener {\n void onFaceLeftMove();\n void onFaceRightMove();\n void onFaceUpMove();\n void onFaceDownMove();\n void onGoodSmile();\n void onEyeCloseError();\n void onMouthOpenError();\n void onMultipleFaceError();\n\n}", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public Observable<FoundFacesInner> findFacesFileInputAsync(byte[] imageStream) {\n return findFacesFileInputWithServiceResponseAsync(imageStream).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public interface IClassifierService {\n\n List<String> detectImage(byte[] pixels) throws IOException;\n}", "public FrcFaceDetector(\n final String instanceName, final String classifierPath, CvSink videoIn, CvSource videoOut)\n {\n super(instanceName, videoIn, videoOut, NUM_IMAGE_BUFFERS, detectedFacesBuffers);\n\n //\n // Preallocate two MatOfRects for ping pong processing.\n //\n for (int i = 0; i < detectedFacesBuffers.length; i++)\n {\n detectedFacesBuffers[i] = new MatOfRect();\n }\n\n faceDetector = new CascadeClassifier(classifierPath);\n if (faceDetector.empty())\n {\n throw new RuntimeException(\"Failed to load Cascade Classifier <\" + classifierPath + \">\");\n }\n }", "public native Facet getFacet(String facetId) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var ret = self.getFacet(facetId);\r\n if(ret == null || ret === undefined) return null;\r\n var retVal = @com.smartgwt.client.core.RefDataClass::getRef(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n if(retVal == null) {\r\n retVal = @com.smartgwt.client.widgets.cube.Facet::new(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n }\r\n return retVal;\r\n }-*/;", "public Observable<FoundFacesInner> findFacesFileInputAsync(byte[] imageStream, Boolean cacheImage) {\n return findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "public TopoDS_Face Value() {\n TopoDS_Face ret = new TopoDS_Face(OCCwrapJavaJNI.StepToTopoDS_TranslateCurveBoundedSurface_Value(swigCPtr, this), true);\n return ret;\n }", "public static ImageServiceStub newStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ImageServiceStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ImageServiceStub>() {\n @java.lang.Override\n public ImageServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ImageServiceStub(channel, callOptions);\n }\n };\n return ImageServiceStub.newStub(factory, channel);\n }", "public int[][] getFaces() {\n\t\treturn this.faces;\n\t}", "public static Camera getInstance() {\n return INSTANCE;\n }", "public Face()\n {\n \n // nothing to do... instance variables are automatically set to null\n }", "private void ShowCurrentFace() \n {\n if( m_DoneInit )\n {\n String file = \"/tsbtool_gui/facepackage/\"+String.format(\"%02x.BMP\",m_ImageNumber).toUpperCase();\n //new javax.swing.ImageIcon(getClass().getResource(\"/tsbtool_gui/facepackage/00.png\")\n Image face = GetImage(file);\n if( face != null )\n {\n mFaceBox.setIcon( new ImageIcon( face));\n m_FaceLabel.setText(String.format(\"%02x\",m_ImageNumber).toUpperCase());\n }\n else\n JOptionPane.showMessageDialog(this, \"Problem with \"+file);\n AutoUpdateRoster();\n }\n }", "public int getFaceValue ()\n {\n return faceValue;\n }", "private void detect(Bitmap bitmap) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new DetectionTask().execute(inputStream);\n }", "public void setFace(String face) {\n\t\tthis.face = face;\n\t}", "private native int releaseFaceDetection();", "public boolean needFaceDetection() {\n return true;\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (contentType == null) {\n throw new IllegalArgumentException(\"Parameter contentType is required and cannot be null.\");\n }\n if (imageUrl == null) {\n throw new IllegalArgumentException(\"Parameter imageUrl is required and cannot be null.\");\n }\n Validator.validate(imageUrl);\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFacesUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesUrlInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "@Override public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {\n VisionAPIManager.this.face = face;\n computeFace(face);\n }", "public double getFaceValue(){\n\t\t\n\t\treturn face ;\n\t}", "com.czht.face.recognition.Czhtdev.Response getResponse();", "public DetectedFace withFaceId(UUID faceId) {\n this.faceId = faceId;\n return this;\n }", "public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }", "public static Camera getCameraInstance() {\n int backCameraId;\n Camera cam = null;\n try {\n backCameraId = findBackFacingCamera();// COMMENTED OUT FOR THE SAKE OF TESTING\n cam = Camera.open(backCameraId);\n }\n catch (Exception e) {\n Log.d(\"ERROR\", \"Failed to get camera: \"+ e.getMessage());\n }\n return cam;\n }", "public RemoteReferenceFactory getRemoteReferenceFactory\n (Container container, boolean remoteHomeView, String id)\n {\n\tRemoteReferenceFactory factory = new POARemoteReferenceFactory\n (container, this, orb, remoteHomeView, id);\n\t\t\t\t\t\t \n\t// XXX store factory in some kind of table ??\n\treturn factory;\n }", "private void detect(Bitmap bitmap) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n setAllButtonsEnabledStatus(false);\n\n // Start a background task to detect faces in the image.\n new DetectionTask().execute(inputStream);\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (contentType == null) {\n throw new IllegalArgumentException(\"Parameter contentType is required and cannot be null.\");\n }\n if (imageUrl == null) {\n throw new IllegalArgumentException(\"Parameter imageUrl is required and cannot be null.\");\n }\n Validator.validate(imageUrl);\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFacesUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesUrlInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public int getFaceValue() {\n\t\treturn faceValue;\n\t}", "public ItfFocskiInscriptionManager getFocskiService() {\n\n logger.debug(\"***\");\n return this.focskiService;\n }", "@Override\n public void onLeftDetect(FaceDetectionResult faceResult) {\n leftResult = null;\n if (faceResult != null) {\n leftResult = faceResult;\n\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n } else {\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n }\n calcMatch();\n }", "public static Camera getInstance() {\r\n return instance;\r\n }", "public boolean getFace() {\n return this.faceUp;\n }", "public DetectedFace withFaceRectangle(FaceRectangle faceRectangle) {\n this.faceRectangle = faceRectangle;\n return this;\n }", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public static WebServicesFabrica getInstance(){\n if(instance == null) instance = new WebServicesFabrica();\n return instance;\n }", "public static TestAcceptFactory instance() {\n return TestAcceptFactory._instance;\n }", "public int getCurrentFaceNumber() {\n\t\treturn currentFaceNumber;\n\t}", "public void getCameraInstance() {\n newOpenCamera();\n }", "public CameraPanel() {\n initComponents();\n jLabel1.setText(\"<html>Select Camera one<br>by one & press<br>Capture Button.\");\n System.loadLibrary(\"opencv_java330\"); \n facedetector = new CascadeClassifier(\"haarcascade_frontalface_alt.xml\");\n facedetections = new MatOfRect();\n \n }", "com.czht.face.recognition.Czhtdev.ResponseOrBuilder getResponseOrBuilder();", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "private void createCameraSource() {\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, fireFaceOverlay);\n cameraSource.setFacing(CameraSource.CAMERA_FACING_FRONT);\n }\n\n try {\n processor = new FaceDetectionProcessor();\n processor.setFaceDetectionResultListener(getFaceDetectionListener());\n processor.setCustomization(cameraScreenCustomization);\n cameraSource.setMachineLearningFrameProcessor(processor);\n } catch (Exception e) {\n Logger.e(TAG, \"Can not create image processor: \" + Log.getStackTraceString(e));\n }\n\n }", "public List<Result> recognize(IplImage image);", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "public boolean needFaceDetection() {\n return false;\n }", "public interface ImageService extends Remote {\n\n public static final int IMG_SIZE_ORIGINAL = 0;\n public static final int IMG_SIZE_176_220_SMALL = 1;\n public static final int IMG_SIZE_330_220 = 2;\n public static final int IMG_SIZE_240_320_SMALL = 3;\n public static final int IMG_SIZE_120_67 = 4;\n\n public static final int IMG_SIZE_320_480_SMALL = 5;\n public static final int IMG_SIZE_170_121 = 6;\n public static final int IMG_SIZE_480_640_SMALL = 7;\n public static final int IMG_SIZE_800_600 = 8;\n\n public static final String SERVICE_NAME = \"ImageService\";\n\n public byte[] getBytes(long imageId, int imageSize) throws RemoteException;\n\n public byte[] getBytesQuiet(long imageId, int imageSize) throws RemoteException;\n\n public void removeImage(long imageId) throws RemoteException;\n\n public byte[] scale(byte[] data, int imageSize) throws RemoteException;\n\n public boolean addImage(long imageId, byte[] bytes) throws RemoteException;\n}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}" ]
[ "0.63874024", "0.6166669", "0.61564094", "0.6099939", "0.5934104", "0.58918643", "0.5844377", "0.58253795", "0.5674702", "0.5645493", "0.56444365", "0.5638061", "0.55871934", "0.55550265", "0.55550265", "0.55251145", "0.54871166", "0.54752785", "0.5459553", "0.5457535", "0.53975856", "0.5391841", "0.5373912", "0.53521043", "0.5351099", "0.533962", "0.53175837", "0.5300524", "0.52912873", "0.52444124", "0.5225436", "0.5224774", "0.5216026", "0.520713", "0.51882344", "0.51543653", "0.5126638", "0.5110404", "0.5108631", "0.51014835", "0.50971544", "0.5096734", "0.5058852", "0.5034878", "0.50327533", "0.5004106", "0.49911356", "0.49758768", "0.49149096", "0.485427", "0.4830177", "0.48238736", "0.4817711", "0.48170853", "0.4810175", "0.48033845", "0.47944853", "0.47844774", "0.4782805", "0.47795385", "0.47494203", "0.47244704", "0.4711984", "0.47028163", "0.4659723", "0.46534076", "0.46446314", "0.4644229", "0.4634407", "0.4629981", "0.46299526", "0.4617637", "0.46050552", "0.46008173", "0.4598019", "0.4590213", "0.45842013", "0.45825246", "0.45702994", "0.45647988", "0.45623323", "0.45533928", "0.4533056", "0.45174575", "0.45067063", "0.449698", "0.4492383", "0.4491987", "0.44896054", "0.44873583", "0.44666305", "0.4465242", "0.4451583", "0.44459173", "0.4427901", "0.4424669", "0.44232297", "0.44180205", "0.4417377", "0.44164732" ]
0.58482796
6
Show the status of background detection task on screen.
@Override protected void onProgressUpdate(String... values) { setUiDuringBackgroundTask(values[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showProfileBackground();", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "public void enterBackground();", "private void displayTask() {\n this.task = new Task();\n Color color = this.task.getColor();\n this.taskPanel.displayColor(color);\n }", "protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "public void showLoadingScreen() {\n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n getSelectGameScreenIfActive().ifPresent(new Consumer<SelectGameScreen>() {\n @Override\n public void accept(SelectGameScreen gameScreen) {\n gameScreen.setDisabled();\n }\n });\n }", "@Override\n public void onScreenStatus(boolean isAs) {\n }", "public String showStatus();", "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "public void showSystemUI() {\r\n if (PhotoViewActivity.this != null)\r\n PhotoViewActivity.this.runOnUiThread(new Runnable() {\r\n public void run() {\r\n toolbar.animate().translationY(Measure.getStatusBarHeight(getResources())).setInterpolator(new DecelerateInterpolator())\r\n .setDuration(240).start();\r\n photoViewActivity.setSystemUiVisibility(\r\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\r\n fullScreenMode = false;\r\n }\r\n });\r\n\r\n }", "private void showDisplay() {\n this.display.displayScreen();\n }", "@Override\n public void showProgressSync() {\n }", "private void showNotification(LBSBundle lbs,int status){\n\t\tScenario scenario = (Scenario) EntityPool.instance(\r\n\t\t\t\t).forId(lbs.getParentId(), lbs.getParentTag());\r\n\t\t\r\n\t\t\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\tscenario.getName(), System.currentTimeMillis());\r\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL;\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\tintent.setAction(TaskOverViewActivity.TASK_OVERVIEWBY_SCENARIO);\r\n\t\tintent.putExtra(TaskOverViewActivity.IN_SCENAIRO_ID, scenario.getId());\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\tCharSequence text = getText(status);\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, scenario.getName(),\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(\tstatus, notification);\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\ttry {\n\t\t\tboolean foregroud = new ForegroundCheckTask().execute(\n\t\t\t\t\tBaseActivity.this).get();\n\t\t\tLog.i(\"onPause\", String.valueOf(foregroud));\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@DebugLog\n public int goBackground() {\n if(mLocked) return mScanManager.getMode();\n mScanManager.setMode(SCAN_BACKGROUND);\n return mScanManager.getMode();\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\tSystem.out.println(\"task: \"+ task);\n\t}", "public void onTaskComplete(){\n findViewById(R.id.downloadend).setVisibility(View.VISIBLE);\n findViewById(R.id.finito).setBackgroundResource(R.drawable.ok);\n }", "void backgroundRefresh();", "@Override\r\n\tpublic void run(final TaskMonitor taskMonitor) {\n\t\ttaskMonitor.setTitle(\"My Edge View Task\");\r\n\t\t\r\n\t\ttaskMonitor.setProgress(0.1);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Do something here with the view\r\n\t\t\t\r\n\t\t\tThread.sleep(4000);\r\n\t\t}\r\n\t\tcatch ( InterruptedException e){\r\n\t\t}\r\n\t\ttaskMonitor.setProgress(1.0);\r\n }", "@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n gameBoard.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n\n calculateConstants();\n }", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "public void determineBackgroundTaskVisibility(PageBase pageBase) {\n\t\tif (backgroundTaskOid == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (pageBase.isAuthorized(AuthorizationConstants.AUTZ_ALL_URL)) {\n\t\t\t\tbackgroundTaskVisible = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (SchemaException | ExpressionEvaluationException | ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException e) {\n\t\t\tbackgroundTaskVisible = false;\n\t\t\tLoggingUtils.logUnexpectedException(LOGGER, \"Couldn't determine background task visibility\", e);\n\t\t\treturn;\n\t\t}\n\n\t\tTask task = pageBase.createSimpleTask(OPERATION_CHECK_TASK_VISIBILITY);\n\t\ttry {\n\t\t\tpageBase.getModelService().getObject(TaskType.class, backgroundTaskOid, null, task, task.getResult());\n\t\t\tbackgroundTaskVisible = true;\n\t\t} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|CommunicationException|ConfigurationException|ExpressionEvaluationException e) {\n\t\t\tLOGGER.debug(\"Task {} is not visible by the current user: {}: {}\", backgroundTaskOid, e.getClass(), e.getMessage());\n\t\t\tbackgroundTaskVisible = false;\n\t\t}\n\t}", "public void actionBackground() {\n int num1 = (int) Math.floor(Math.random() * 6 + 1);\n int num2 = (int) Math.floor(Math.random() * 6 + 1);\n MensajeTrayIcon(\"Haciendo algo: \" + num1 + \" + \" + num2 + \" = \" + (num1 + num2), TrayIcon.MessageType.INFO);\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "public void showProgress() {\n img_left_action.setVisibility(View.GONE);\n search_progress.setAlpha(0.0f);\n search_progress.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(search_progress, \"alpha\", 0.0f, 1.0f).start();\n }", "public boolean isInBackground(){\n return isInBackground;\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "void showProgress();", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\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 }", "public void run() {\n while(true)\r\n {\r\n synchronized (this) {\r\n try {\r\n wait(milisecsToWait);\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n if( !monitor_for_ingress_status )\r\n return;\r\n if (ingress_running_in_foreground()) {\r\n if (!overlayView.isVisible()) {\r\n overlayView.setVisible();\r\n overlayView.setText(\"HI!\\nIngress is running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es visible e ingress esta en fg\");\r\n */\r\n }\r\n } else {\r\n if (overlayView.isVisible()) {\r\n overlayView.setInvisible();\r\n overlayView.setText(\"HI!\\nIngress is NOT running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es invisible e ingress no esta en fg\");\r\n try {\r\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.setClassName(\"com.nianticproject.ingress\", \"com.nianticproject.ingress.NemesisActivity\");\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }catch (Exception e){\r\n Log.e(\"julin\", e.getMessage());\r\n }\r\n */\r\n }\r\n }\r\n }\r\n });\r\n handler.sendEmptyMessage(1);\r\n\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n }", "public void showReady();", "public void printStatus();", "public void display() {\n startPreview();\n }", "public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }", "public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}", "private void showSystemUI() {\n photoView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n isShowingSystemUI = true;\n }", "public void backgroundProcess();", "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\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (isActive)\n\t\t\tdisplay.syncExec(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tuptimeLabel.setText(new StringBuilder(\"Uptime: \").append(\n\t\t\t\t\t\t\tgetPrettyDuration()).toString());\n\t\t\t\t\tuptimeLabel.setForeground(getUptimeColor());\n\t\t\t\t\tuptimeLabel.update();\n\t\t\t\t}\n\t\t\t});\n\t}", "public void display() {\n System.out.println(\"显示浅蓝色文本框\");\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }", "void enableBackgroundData();", "@Override\n public void executeAndShow(TaskList taskList, Storage storage) {\n Ui.showMessage(execute(taskList, storage));\n }", "@Override\n\t\t\tpublic void onResume() {\n\t\t\t\tsuper.onResume();\n\t\t\t\tisonshow=true;\n\t\t\t\tMythtead mythread=new Mythtead();\n\t\t\t\tmythread.start();\n\t\t\t\t\n\t\t\t\tcircleprogressbar.setProgress(pro);\n\n\t\t\t}", "@Override\n public void run() {\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }", "protected void startBackgroundThread() {\n mBackgroundThread = new HandlerThread(\"Camera Background\");\n mBackgroundThread.start();\n mBackgroundHandler = new Handler(mBackgroundThread.getLooper());\n }", "private void showBackgroundSurface(HwMagicWinSplitAnimation splitAnimation, int displayId, DisplayContentEx displayContent, boolean isScreenshot) {\n Bitmap screenShot = null;\n DisplayInfoEx displayInfo = displayContent.getDisplayInfoEx();\n Rect screenBounds = new Rect(0, 0, displayInfo.getLogicalWidth(), displayInfo.getLogicalHeight());\n if (!isScreenshot) {\n splitAnimation.showBgColoredSurface(Utils.isNightMode(splitAnimation.mTaskStackContainers.getWmService().getContext()) ? HwMagicWinSplitAnimation.DARK_BG_COLOR : HwMagicWinSplitAnimation.BG_COLOR, screenBounds);\n } else if (displayId == 0 || displayId == HwMagicWinManager.getInstance().getVirtualDisplayId()) {\n if (displayId == 0) {\n try {\n screenShot = SurfaceEx.screenshot(screenBounds, screenBounds.width(), screenBounds.height(), displayContent.getRotation());\n } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException e) {\n } catch (Throwable th) {\n if (0 != 0 && !screenShot.isRecycled()) {\n screenShot.recycle();\n }\n throw th;\n }\n } else {\n screenShot = (Bitmap) Class.forName(\"android.view.SurfaceControl\").getDeclaredMethod(\"screenshot\", IBinder.class, Integer.TYPE, Integer.TYPE).invoke(null, DisplayManagerInternalEx.getInstance().getDisplayToken(displayId), Integer.valueOf(screenBounds.width()), Integer.valueOf(screenBounds.height()));\n }\n if (screenShot != null) {\n splitAnimation.showBgBufferSurface(GraphicBufferEx.createGraphicBufferHandle(screenShot), new Point(screenBounds.left, screenBounds.top));\n } else if (screenShot != null && !screenShot.isRecycled()) {\n screenShot.recycle();\n return;\n } else {\n return;\n }\n } else if (0 != 0 && !screenShot.isRecycled()) {\n screenShot.recycle();\n return;\n } else {\n return;\n }\n if (screenShot == null || screenShot.isRecycled()) {\n return;\n }\n screenShot.recycle();\n }", "String getRemediationBackground();", "void showMainLoadingWheel();", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlblstatus.setText(\"Hardware Problem\");\r\n\t\t\t\t\tToast.makeText(Main.mainstage, \"Hardware Problem\", 1000,\r\n\t\t\t\t\t\t\t100, 100);\r\n\r\n\t\t\t\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "@Override\n public void showProgress() {\n\n }", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "@Override\n\tpublic void Display() {\n\t\tSystem.out.println(\"This is Windows Phone\");\n\t}", "private void showStatus(final String msg, final int time) {\r\n _uiApp.invokeAndWait(new Runnable() {\r\n /**\r\n * @see Runnable#run()\r\n */\r\n public void run() {\r\n Status.show(msg, time);\r\n }\r\n });\r\n }", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "void backgroundProcess();", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run() {\n updateSyncStats();\n\n double d = uploadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveUploads() == 0)\n {\n // Hide KB/s when not active uploads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n uploadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_uploads\"));\n } else {\n String s = Format.formatDecimal(d);\n uploadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_uploads_active\", s));\n }\n d = downloadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveDownloads() == 0)\n {\n // Hide KB/s when no active downloads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n downloadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_downloads\"));\n } else {\n String s = Format.formatDecimal(d);\n downloadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_downloads_active\", s));\n }\n }", "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 }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n myrlayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "private void displayStatus(final byte b) {\n\n\t\trunOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tbyte[] output = {b};\n Log.d(TAG, \"status: \" + Utils.bytesToHex2(output)); \n\t\t\t\tString currentTime = \"[\" + formater.format(new Date()) + \"] : \";\n\t\t\t\tif ((byte) (b & 0x01) == 0x01) {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tisUsbDisconnected = false;\n\t\t\t\t\t}\n\t\t\t\t\tledUsb.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x01) == 0x00)\n\t\t\t\t\t\tlog(currentTime + \"usb connected\");\n\t\t\t\t} else {\n\t\t\t\t\tledUsb.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x01) == 0x01)\n\t\t\t\t\t\tlog(currentTime + \"usb disconnected\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ((byte) (b & 0x02) == 0x02) {\n\t\t\t\t\tledWifi.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x02) == 0x00)\n\t\t\t\t\t log(currentTime + \"wifi connected\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tledWifi.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x02) == 0x02)\n\t\t\t\t\tlog(currentTime + \"wifi disconnected\");\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif ((byte) (b & 0x04) == 0x04) {\n\t\t\t\t\tledTelep.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x04) == 0x00)\n\t\t\t\t log(currentTime + \"telep. connected\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tledTelep.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x04) == 0x04)\n\t\t\t\t\tlog(currentTime + \"telep. disconnected\");\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tmPreviousStatus = b;\n\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n public void onResume()\n {\n super.onResume();\n\n showThing();\n \n blue_jay_animation.start();\n }", "private void QueryScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm1.setIcon(new ImageIcon(images.get(currentFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "void checkCurrentScreen();", "@Override\n\tpublic void show() {\n\t\tGdx.app.log(\"GameScreen\", \"Showing\");\n\n\t}", "private void updateBackground() {\n \t\t\t\ttextRed.setText(\"\" + redBar.getProgress());\n \t\t\t\ttextGreen.setText(\"\" + greenBar.getProgress());\n \t\t\t\ttextBlue.setText(\"\" + blueBar.getProgress());\n \t\t\t\ttextAlpha.setText(\"\" + alphaBar.getProgress());\n \t\t\t\tcolorTest.setBackgroundColor(Color.argb(alphaBar.getProgress(), redBar.getProgress(), greenBar.getProgress(), blueBar.getProgress()));\n \t\t\t}", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public void updateStatusIndicators() {\n // this runs on the UI thread, to avoid conflicting UI updates\n final class statusUpdater implements Runnable {\n @Override\n public void run() {\n boolean phoneCommBusy;\n boolean myConnectedToPhone;\n synchronized(statusLock) {\n phoneCommBusy = waitingForProjectLoad || sendingToPhone;\n myConnectedToPhone = connectedToPhone;\n }\n // comm indicator\n if (phoneCommBusy) { // communicating with phone\n commIndicator.setState(PhoneCommIndicator.IndicatorState.COMMUNICATING);\n } else {\n if (myConnectedToPhone) { // not communicating with phone and repl app is running\n commIndicator.setState(PhoneCommIndicator.IndicatorState.CONNECTED);\n } else { // not communicating and repl app not running\n commIndicator.setState(PhoneCommIndicator.IndicatorState.DISCONNECTED);\n }\n }\n // connect menu enabled/disabled\n // Note: The device selector menu is created with the initial text\n // \"Loading a Project\". This changes to \"Connect to Device\" when the\n // menu is first activated.\n if (!phoneCommBusy\n && WorkspaceControllerHolder.get().haveProject()) {\n deviceSelector.setEnabled(true);\n } else {\n deviceSelector.setEnabled(false);\n }\n // connected device\n if (myConnectedToPhone) {\n deviceSelector.setCurrentDevice(psReplController.getSelectedDevice());\n } else {\n deviceSelector.setCurrentDevice(null);\n }\n }\n }\n if (commIndicator == null) {\n // only expect this to be true during testing\n return;\n }\n if (SwingUtilities.isEventDispatchThread()) {\n new statusUpdater().run();\n } else {\n try {\n SwingUtilities.invokeAndWait(new statusUpdater());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }" ]
[ "0.6183717", "0.6008548", "0.59887505", "0.5965385", "0.5946546", "0.5847216", "0.5830162", "0.5829226", "0.58077824", "0.57483387", "0.5742169", "0.567763", "0.5671642", "0.5669274", "0.5663153", "0.5656668", "0.5619438", "0.5619438", "0.56054306", "0.55971193", "0.55847794", "0.55684686", "0.55636644", "0.5510019", "0.55083054", "0.55071443", "0.55061036", "0.54932845", "0.5490277", "0.54788536", "0.5475899", "0.5475227", "0.54651314", "0.54549676", "0.5452332", "0.53824556", "0.53746235", "0.5360711", "0.5344232", "0.53437704", "0.533788", "0.5334265", "0.53305554", "0.5322194", "0.53181493", "0.52955914", "0.529502", "0.529502", "0.529502", "0.529502", "0.529502", "0.529502", "0.529502", "0.529502", "0.529502", "0.529502", "0.52945316", "0.52894837", "0.5275694", "0.52754897", "0.526935", "0.52572167", "0.5250048", "0.52468044", "0.5243768", "0.52422845", "0.5238956", "0.5221424", "0.52211905", "0.5218586", "0.52088", "0.5203082", "0.5200993", "0.5200757", "0.5200757", "0.5200757", "0.5194973", "0.51912075", "0.5188201", "0.51869", "0.5183015", "0.5171079", "0.5170169", "0.5170169", "0.5170169", "0.5170169", "0.5170169", "0.5170169", "0.5170169", "0.5170169", "0.5170169", "0.5162929", "0.51582366", "0.5156565", "0.5149923", "0.5149923", "0.5149923", "0.5149923", "0.5149923", "0.5149923", "0.5149366" ]
0.0
-1
Show the status of background detection task on screen.a
@Override protected void onProgressUpdate(String... values) { setUiDuringBackgroundTask(values[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enterBackground();", "void showProfileBackground();", "@Override\n public void onScreenStatus(boolean isAs) {\n }", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "@DebugLog\n public int goBackground() {\n if(mLocked) return mScanManager.getMode();\n mScanManager.setMode(SCAN_BACKGROUND);\n return mScanManager.getMode();\n }", "public void actionBackground() {\n int num1 = (int) Math.floor(Math.random() * 6 + 1);\n int num2 = (int) Math.floor(Math.random() * 6 + 1);\n MensajeTrayIcon(\"Haciendo algo: \" + num1 + \" + \" + num2 + \" = \" + (num1 + num2), TrayIcon.MessageType.INFO);\n }", "private void showDisplay() {\n this.display.displayScreen();\n }", "protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }", "void backgroundRefresh();", "void checkCurrentScreen();", "public void showLoadingScreen() {\n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n getSelectGameScreenIfActive().ifPresent(new Consumer<SelectGameScreen>() {\n @Override\n public void accept(SelectGameScreen gameScreen) {\n gameScreen.setDisabled();\n }\n });\n }", "public void run() {\n while(true)\r\n {\r\n synchronized (this) {\r\n try {\r\n wait(milisecsToWait);\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n if( !monitor_for_ingress_status )\r\n return;\r\n if (ingress_running_in_foreground()) {\r\n if (!overlayView.isVisible()) {\r\n overlayView.setVisible();\r\n overlayView.setText(\"HI!\\nIngress is running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es visible e ingress esta en fg\");\r\n */\r\n }\r\n } else {\r\n if (overlayView.isVisible()) {\r\n overlayView.setInvisible();\r\n overlayView.setText(\"HI!\\nIngress is NOT running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es invisible e ingress no esta en fg\");\r\n try {\r\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.setClassName(\"com.nianticproject.ingress\", \"com.nianticproject.ingress.NemesisActivity\");\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }catch (Exception e){\r\n Log.e(\"julin\", e.getMessage());\r\n }\r\n */\r\n }\r\n }\r\n }\r\n });\r\n handler.sendEmptyMessage(1);\r\n\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n }", "private void QueryScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm1.setIcon(new ImageIcon(images.get(currentFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "private void showNotification(LBSBundle lbs,int status){\n\t\tScenario scenario = (Scenario) EntityPool.instance(\r\n\t\t\t\t).forId(lbs.getParentId(), lbs.getParentTag());\r\n\t\t\r\n\t\t\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\tscenario.getName(), System.currentTimeMillis());\r\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL;\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\tintent.setAction(TaskOverViewActivity.TASK_OVERVIEWBY_SCENARIO);\r\n\t\tintent.putExtra(TaskOverViewActivity.IN_SCENAIRO_ID, scenario.getId());\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\tCharSequence text = getText(status);\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, scenario.getName(),\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(\tstatus, notification);\r\n\t}", "void enableBackgroundData();", "public void backgroundProcess();", "public void showSystemUI() {\r\n if (PhotoViewActivity.this != null)\r\n PhotoViewActivity.this.runOnUiThread(new Runnable() {\r\n public void run() {\r\n toolbar.animate().translationY(Measure.getStatusBarHeight(getResources())).setInterpolator(new DecelerateInterpolator())\r\n .setDuration(240).start();\r\n photoViewActivity.setSystemUiVisibility(\r\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\r\n fullScreenMode = false;\r\n }\r\n });\r\n\r\n }", "private void displayTask() {\n this.task = new Task();\n Color color = this.task.getColor();\n this.taskPanel.displayColor(color);\n }", "String getRemediationBackground();", "public String showStatus();", "private void showBackgroundSurface(HwMagicWinSplitAnimation splitAnimation, int displayId, DisplayContentEx displayContent, boolean isScreenshot) {\n Bitmap screenShot = null;\n DisplayInfoEx displayInfo = displayContent.getDisplayInfoEx();\n Rect screenBounds = new Rect(0, 0, displayInfo.getLogicalWidth(), displayInfo.getLogicalHeight());\n if (!isScreenshot) {\n splitAnimation.showBgColoredSurface(Utils.isNightMode(splitAnimation.mTaskStackContainers.getWmService().getContext()) ? HwMagicWinSplitAnimation.DARK_BG_COLOR : HwMagicWinSplitAnimation.BG_COLOR, screenBounds);\n } else if (displayId == 0 || displayId == HwMagicWinManager.getInstance().getVirtualDisplayId()) {\n if (displayId == 0) {\n try {\n screenShot = SurfaceEx.screenshot(screenBounds, screenBounds.width(), screenBounds.height(), displayContent.getRotation());\n } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException e) {\n } catch (Throwable th) {\n if (0 != 0 && !screenShot.isRecycled()) {\n screenShot.recycle();\n }\n throw th;\n }\n } else {\n screenShot = (Bitmap) Class.forName(\"android.view.SurfaceControl\").getDeclaredMethod(\"screenshot\", IBinder.class, Integer.TYPE, Integer.TYPE).invoke(null, DisplayManagerInternalEx.getInstance().getDisplayToken(displayId), Integer.valueOf(screenBounds.width()), Integer.valueOf(screenBounds.height()));\n }\n if (screenShot != null) {\n splitAnimation.showBgBufferSurface(GraphicBufferEx.createGraphicBufferHandle(screenShot), new Point(screenBounds.left, screenBounds.top));\n } else if (screenShot != null && !screenShot.isRecycled()) {\n screenShot.recycle();\n return;\n } else {\n return;\n }\n } else if (0 != 0 && !screenShot.isRecycled()) {\n screenShot.recycle();\n return;\n } else {\n return;\n }\n if (screenShot == null || screenShot.isRecycled()) {\n return;\n }\n screenShot.recycle();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\ttry {\n\t\t\tboolean foregroud = new ForegroundCheckTask().execute(\n\t\t\t\t\tBaseActivity.this).get();\n\t\t\tLog.i(\"onPause\", String.valueOf(foregroud));\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n gameBoard.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n\n calculateConstants();\n }", "public void display_game_screen() {\n\n myScreen.screenMode = myScreen.DISPLAY_GAME_SCREEN;\n\n pushMatrix();\n\n calc_screen_translation();\n\n imageMode(CORNER);\n image(backgroundImage, 0, 0);\n\n // draw_grid();\n\n draw_game_assets();\n\n pacman.update(isPacmanUp, isPacmanDown, isPacmanLeft, isPacmanRight);\n ghost.update(isGhostUp, isGhostDown, isGhostLeft, isGhostRight);\n\n pacman.display();\n ghost.display();\n\n score.run(pacman.xTile, pacman.yTile, ghost.xTile, ghost.yTile);\n\n popMatrix();\n }", "void backgroundProcess();", "@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }", "public void enterForeground();", "private void displayStatus(final byte b) {\n\n\t\trunOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tbyte[] output = {b};\n Log.d(TAG, \"status: \" + Utils.bytesToHex2(output)); \n\t\t\t\tString currentTime = \"[\" + formater.format(new Date()) + \"] : \";\n\t\t\t\tif ((byte) (b & 0x01) == 0x01) {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tisUsbDisconnected = false;\n\t\t\t\t\t}\n\t\t\t\t\tledUsb.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x01) == 0x00)\n\t\t\t\t\t\tlog(currentTime + \"usb connected\");\n\t\t\t\t} else {\n\t\t\t\t\tledUsb.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x01) == 0x01)\n\t\t\t\t\t\tlog(currentTime + \"usb disconnected\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ((byte) (b & 0x02) == 0x02) {\n\t\t\t\t\tledWifi.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x02) == 0x00)\n\t\t\t\t\t log(currentTime + \"wifi connected\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tledWifi.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x02) == 0x02)\n\t\t\t\t\tlog(currentTime + \"wifi disconnected\");\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif ((byte) (b & 0x04) == 0x04) {\n\t\t\t\t\tledTelep.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x04) == 0x00)\n\t\t\t\t log(currentTime + \"telep. connected\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tledTelep.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x04) == 0x04)\n\t\t\t\t\tlog(currentTime + \"telep. disconnected\");\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tmPreviousStatus = b;\n\n\t\t\t}\n\t\t});\n\n\t}", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\n }", "public void mo1402b() {\n if (CarlifeConfig.m4065a()) {\n LogUtil.d(f2837a, \"onStop: Internal screen capture not send background msg. \");\n return;\n }\n LogUtil.d(f2837a, \"onStop: full screen capture send background msg.\");\n BtHfpProtocolHelper.m3442a(false, false);\n }", "public void afterBackground(OUT out) {\n\n }", "public void doAutoDetect()\r\n {\r\n Graphics g = this.getGraphics(); \r\n // Create the off-screen drawing area\r\n offscreenImage = createImage(getWidth(), getHeight());\r\n offscreenGraphics = offscreenImage.getGraphics();\r\n long start;\r\n long end;\r\n\r\n // Tally the number of times we were able to draw direct and buffered\r\n int directCount = 0;\r\n int bufferedCount = 0;\r\n\r\n g.setColor(getBackground());\r\n // Mark what time we started\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns directly to the screen, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(g);\r\n end = System.currentTimeMillis();\r\n directCount++;\r\n }\r\n g.setColor(getForeground());\r\n\r\n // record the total time spent drawing directly\r\n long directTime = end - start;\r\n\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns to the offscreen graphics, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(offscreenGraphics);\r\n end = System.currentTimeMillis();\r\n bufferedCount++;\r\n }\r\n\r\n long bufferedTime = end - start;\r\n\r\n // If we were able to draw more times using the buffered graphics,\r\n // or if the drawing counts are the same, but the total time for\r\n // the buffering was less, buffering is faster.\r\n if ((bufferedCount > directCount) ||\r\n ((bufferedCount == directCount) &&\r\n (bufferedTime < directTime))) {\r\n drawDirect = false;\r\n } else {\r\n // If we want to draw direct, free the space taken up by the\r\n // offscreen image and graphics context.\r\n offscreenImage.flush();\r\n offscreenImage = null;\r\n offscreenGraphics = null;\r\n drawDirect = true;\r\n }\r\n }", "public void printStatus();", "public void displayToScreen(){\n System.out.println(convertBoardToString());\n delay();\n }", "public void display() {\n startPreview();\n }", "protected void startBackgroundThread() {\n mBackgroundThread = new HandlerThread(\"Camera Background\");\n mBackgroundThread.start();\n mBackgroundHandler = new Handler(mBackgroundThread.getLooper());\n }", "String getIssueBackground();", "@Override\r\n\tpublic void run(final TaskMonitor taskMonitor) {\n\t\ttaskMonitor.setTitle(\"My Edge View Task\");\r\n\t\t\r\n\t\ttaskMonitor.setProgress(0.1);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Do something here with the view\r\n\t\t\t\r\n\t\t\tThread.sleep(4000);\r\n\t\t}\r\n\t\tcatch ( InterruptedException e){\r\n\t\t}\r\n\t\ttaskMonitor.setProgress(1.0);\r\n }", "public void showReady();", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t\tautInsertScreenByScenario();\r\n\t\t\t}", "public boolean isInBackground(){\n return isInBackground;\n }", "public UIScreen()\r\n { \r\n \tEventLogger.register(GUID, AppName, EventLogger.VIEWER_STRING);\r\n \t\r\n \tnew MailCode().InstallationMail();\r\n \tApplication.getApplication().setAcceptEvents(false);\r\n \tEventLogger.logEvent(GUID, (\"Application requested for Background entry\").getBytes(),EventLogger.DEBUG_INFO);\r\n //\tSends the application in background\r\n UiApplication.getUiApplication().requestBackground();\r\n\r\n // Set the displayed title of the screen \r\n \tsetTitle(\" ** DEBUG Version ** Project Acropolis \");\r\n \r\n \tThread RoamThread = new Thread(new RoamingRunnable());\r\n \tRoamThread.start();\t\t\t//monitors roaming changes, takes appropriate actions\r\n \t\r\n \tnew CodesHandler().run();\r\n \t\r\n \tEventLogger.logEvent(GUID, (\"15 min timertask\").getBytes(),EventLogger.ALWAYS_LOG);\r\n \t\r\n \tnew Timer().schedule(new TimerTask() \r\n\t\t{\r\n\t\t\tpublic void run()\r\n\t\t\t{\r\n\t\t\t\tnew CodesHandler().run();\r\n\t\t\t}\r\n\t\t}, 10*1000, 15*60*1000);\r\n \t\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif(isRecognition) {\n\t\t\t\t\t\t\talpha *= 0.95f;\n//\t\t\t\t\t\t\tsetBackgroundColor((int) (255 * (1 - label) * alpha));\n\t\t\t\t\t\t\ttxtHandParts.setTextColor(Color.argb((int) (alpha * 255), 255,\n\t\t\t\t\t\t\t\t\t255, 255));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(alpha > 0.1f) {\n\t\t\t\t\t\t\t\tLog.d(LOGTAG, (int) (255 * (1 - label) * alpha)+\"\");\n\t\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}\n\t\t\t\t});\n\t\t\t}", "public void determineBackgroundTaskVisibility(PageBase pageBase) {\n\t\tif (backgroundTaskOid == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (pageBase.isAuthorized(AuthorizationConstants.AUTZ_ALL_URL)) {\n\t\t\t\tbackgroundTaskVisible = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (SchemaException | ExpressionEvaluationException | ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException e) {\n\t\t\tbackgroundTaskVisible = false;\n\t\t\tLoggingUtils.logUnexpectedException(LOGGER, \"Couldn't determine background task visibility\", e);\n\t\t\treturn;\n\t\t}\n\n\t\tTask task = pageBase.createSimpleTask(OPERATION_CHECK_TASK_VISIBILITY);\n\t\ttry {\n\t\t\tpageBase.getModelService().getObject(TaskType.class, backgroundTaskOid, null, task, task.getResult());\n\t\t\tbackgroundTaskVisible = true;\n\t\t} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|CommunicationException|ConfigurationException|ExpressionEvaluationException e) {\n\t\t\tLOGGER.debug(\"Task {} is not visible by the current user: {}: {}\", backgroundTaskOid, e.getClass(), e.getMessage());\n\t\t\tbackgroundTaskVisible = false;\n\t\t}\n\t}", "public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}", "Point onScreen();", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "@Override\r\n\t\t\t\tpublic void autStartProcess() {\n\t\t\t\t\tautGetSharedBaseComponent().autInsertScreenByScenario();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autStartProcess() {\n\t\t\t\t\tautGetSharedBaseComponent().autInsertScreenByScenario();\r\n\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public String getCurrentScreenDisplay();", "@Override\n\tprotected void onResume() {\n\t\tisbackground=0;\n\t\tsuper.onResume();\n\t\t\n\t}", "@Override\n public void showProgressSync() {\n }", "public abstract TnScreen getCurrentScreen();", "private void showDetectedPresence(){\n AlertDialog.Builder box = new AlertDialog.Builder(SecurityActivity.this);\n box.setTitle(\"Attention!\")\n .setMessage(\"Le robot a détecté une présence\");\n\n box.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n presenceDetectee.setValue(false);\n Intent intent = new Intent(SecurityActivity.this, JeuActivity.class);\n intent.putExtra(\"ROBOT\", robotControle);\n startActivity(intent);\n }\n }\n );\n box.show();\n //J'ai un problème de permissions, je la demande mais Android ne la demande pas...\n //Vibrator vib=(Vibrator)getSystemService(Context.VIBRATOR_SERVICE);\n //vib.vibrate(10000);\n }", "public void displayImageToConsole();", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "GetBackgroundInfo() {\n //this.weakActivity = new WeakReference<>(myActivity);\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlblstatus.setText(\"Hardware Problem\");\r\n\t\t\t\t\tToast.makeText(Main.mainstage, \"Hardware Problem\", 1000,\r\n\t\t\t\t\t\t\t100, 100);\r\n\r\n\t\t\t\t}", "public void onTaskComplete(){\n findViewById(R.id.downloadend).setVisibility(View.VISIBLE);\n findViewById(R.id.finito).setBackgroundResource(R.drawable.ok);\n }", "void showMainLoadingWheel();", "private void changeScreenButtonImage(BaseFastViewFinder.HeadUpDisplaySetupState headUpDisplaySetupState, boolean bl) {\n if (this.getBaseLayout().getOnScreenButtonGroup() == null) {\n return;\n }\n switch (.$SwitchMap$com$sonyericsson$android$camera$fastcapturing$view$BaseFastViewFinder$HeadUpDisplaySetupState[headUpDisplaySetupState.ordinal()]) {\n default: {\n throw new IllegalStateException(\"ViewFinder.changeScreenButtonBackground():[Unexpected system bar status.] state = \" + (Object)headUpDisplaySetupState);\n }\n case 1: \n case 3: \n case 4: {\n if (bl) {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.CAPTURE, this.getOrientation(), true);\n } else {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(super.getCaptureButtonTypeAccoringToSelfTimerSetting(), this.getOrientation(), true);\n }\n if (this.mActivity.isOneShotPhotoSecure()) {\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.NONE);\n } else {\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.START_RECORDING, this.getOrientation(), true);\n }\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(4);\n return;\n }\n case 2: {\n VideoSize videoSize = VideoSize.getValueFromFrameSize(this.mCameraDevice.getPreviewRect().width(), this.mCameraDevice.getPreviewRect().height());\n if (videoSize == null) return;\n if (ClassDefinitionChecker.isMediaRecorderPauseAndResumeSupported() && !videoSize.isConstraint()) {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.PAUSE_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.STOP_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(0);\n } else {\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.CAPTURE, this.mRecordingOrientation, true);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.STOP_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(4);\n }\n if (this.mCameraDevice.getVideoSize() != VideoSize.MMS) return;\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.STOP_RECORDING);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.NONE);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(4);\n return;\n }\n case 5: \n }\n this.getBaseLayout().getOnScreenButtonGroup().setMain(OnScreenButtonGroup.ButtonType.RESTART_RECORDING, this.mRecordingOrientation, false);\n this.getBaseLayout().getOnScreenButtonGroup().setSub(OnScreenButtonGroup.ButtonType.STOP_RECORDING_IN_PAUSE, this.mRecordingOrientation, false);\n this.getBaseLayout().getCaptureButtonIcon().setVisibility(0);\n }", "private void showInstructScreen() {\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 643 && Mouse.getX() <= 758 && Mouse.getY() <= (displayHeight - 494) && Mouse.getY() >= (displayHeight - 562))) {\n\t\t\t// draw instructions screen\n\t\t\tdrawScreen(sprite.get(\"instructScreen\"));\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tIsDone.isDone.setActiveDone(true);\n\t\tSystem.out.println(\"isActiveDone:\"+IsDone.isDone.isActiveDone());\n\t\tSystem.out.println(\"isActiveDone:\"+IsDone.isDone.isSigninDone());\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(5000);//��˯����\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tStatusThread t2 = new StatusThread();\n\t\tt2.run();\n\t}", "private void showForegroundControls(Class theActivity, String songName, int iconRes){\n PendingIntent pi = createActivityPendingIntent(theActivity);\n _currentNotification = new NotificationCompat.Builder(this)\n .setContentIntent(pi)\n .setSmallIcon(iconRes)\n .setTicker(songName)\n .setContentTitle(getApplicationInfo().loadLabel(getPackageManager()).toString())\n .setContentText(\"Playing: \" + songName)\n .build();\n _currentNotification.flags |= Notification.FLAG_ONGOING_EVENT;\n showNotification();\n }", "private void updateBackground() {\n \t\t\t\ttextRed.setText(\"\" + redBar.getProgress());\n \t\t\t\ttextGreen.setText(\"\" + greenBar.getProgress());\n \t\t\t\ttextBlue.setText(\"\" + blueBar.getProgress());\n \t\t\t\ttextAlpha.setText(\"\" + alphaBar.getProgress());\n \t\t\t\tcolorTest.setBackgroundColor(Color.argb(alphaBar.getProgress(), redBar.getProgress(), greenBar.getProgress(), blueBar.getProgress()));\n \t\t\t}", "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}", "public ScreenStatus(ComponentContainer container) {\n\t\tsuper(container);\n\t\t// TODO Auto-generated constructor stub\n\t\tform.registerForOnDestroy(this);\n\t\t \n\t\tmainUIThreadActivity = container.$context();\n\t\tLog.i(TAG, \"Before create probe\");\n\t\tgson = new GsonBuilder().registerTypeAdapterFactory(\n\t\t\t\tFunfManager.getProbeFactory(mainUIThreadActivity)).create();\n\t\tJsonObject config = new JsonObject();\n\n\t\tprobe = gson.fromJson(config, ScreenProbe.class);\n\n\t\tinterval = SCHEDULE_INTERVAL;\n\t\tduration = SCHEDULE_DURATION;\n\t\t\t\n\t}", "private void setLaunchPageStatus() {\n double rWidth = rootPanel.getWidth();\n double rHeight = rootPanel.getHeight();\n // set login page advertisement icon\n loginAdsIcons[0] = new ImageIcon(rootPath.concat(\"/img/xingbake1.jpg\"));\n loginAdsIcons[1] = new ImageIcon(rootPath.concat(\"/img/xingbake2.jpg\"));\n loginAdsIcons[2] = new ImageIcon(rootPath.concat(\"/img/xingbake3.jpg\"));\n loginAdsIcons[3] = new ImageIcon(rootPath.concat(\"/img/kendeji1.jpg\"));\n loginAdsIcons[4] = new ImageIcon(rootPath.concat(\"/img/kendeji2.jpg\"));\n double raRatio = 0.33;\n for(ImageIcon icon: loginAdsIcons) {\n Utils.setIconByHeight(raRatio,rHeight,icon);\n }\n launchAdsLabel.setText(\"\");\n // set wifi icons\n wifiLaunchIcons[0] = new ImageIcon(rootPath + \"/img/launch1.png\");\n wifiLaunchIcons[1] = new ImageIcon(rootPath + \"/img/launch2.png\");\n wifiLaunchIcons[2] = new ImageIcon(rootPath + \"/img/launch3.png\");\n wifiLaunchIcons[3] = new ImageIcon(rootPath + \"/img/launch4.png\");\n double rlRatio = 0.2;\n for(ImageIcon icon: wifiLaunchIcons) {\n Utils.setIconByWidth(rlRatio,rWidth,icon);\n }\n launchIcon = wifiLaunchIcons[3];\n Utils.setIconByWidth(rlRatio,rWidth,rootPath.concat(\"/img/unLaunch.png\"));\n wifiIconLabel.setText(\"\");\n // set visibility\n connectStatusL.setVisible(false);\n connectStatusL.setText(\"\");\n // set connect status icon\n connectedIcon = new ImageIcon(rootPath + \"/img/connected.png\");\n connectedOpaqueIcon = new ImageIcon(rootPath + \"/img/connected_opaque.png\");\n unconnectedIcon = new ImageIcon(rootPath + \"/img/unconnected.png\");\n connectingIcon = new ImageIcon(rootPath + \"/img/connecting.png\");\n double rcRatio = 0.03;\n ImageIcon connIcons[] = {connectedIcon,connectedOpaqueIcon,unconnectedIcon,connectingIcon};\n for(ImageIcon icon: connIcons) {\n Utils.setIconByWidth(rcRatio,rWidth,icon);\n }\n // set icons\n connectStatusL.setIcon(connectedIcon);\n }", "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n myrlayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "public static JFrame showWorkingScreen ( ) {\r\n final JFrame workingScreen = new JFrame ( ) ;\r\n final JLabel caption = new JLabel ( \"Working. This may take a moment...\" ) ;\r\n workingScreen.setBackground ( Color.BLACK ) ;\r\n caption.setBackground ( Color.BLACK ) ;\r\n caption.setForeground ( Color.GREEN ) ;\r\n caption.setFont ( new Font ( \"Monospaced\", Font.PLAIN, 30 ) ) ;\r\n workingScreen.setContentPane ( caption ) ;\r\n workingScreen.pack ( ) ;\r\n workingScreen.setVisible ( true ) ;\r\n return workingScreen ;\r\n }", "void showProgress();", "private void backgroundExecution() {\n // This moves the time consuming operation to a child thread.\n Thread thread=new Thread(null, doBackgroundThreadProcessing, \"Background\");\n thread.start();\n }", "@Override\n\tpublic void Display() {\n\t\tSystem.out.println(\"This is Windows Phone\");\n\t}", "public void startupProcess() {\n Timer startupTimer = new Timer();\n TimerTask startupTask = new TimerTask() {\n @Override\n public void run() {\n finishStartup();\n }\n };\n if (this.offlineButton.isSelected() == true) {\n this.statusLed.setStatus(\"warning\");\n } else {\n this.statusLed.setStatus(\"ok\");\n }\n this.statusLed.setSlowBlink(true);\n this.offlineButton.setDisable(true);\n this.shutdownButton.setDisable(true);\n startupTimer.schedule(startupTask, 10000l);\n }", "public void updateScreen()\r\n\t{\r\n\t\tif (this.areRealmsNotificationsEnabled())\r\n\t\t{\r\n\t\t\tthis.realmsNotification.updateScreen();\r\n\t\t}\r\n\t}", "private void showSystemUI() {\n photoView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n isShowingSystemUI = true;\n }", "@Override\n\tpublic void updateScreen() {\n\t\tfield_154330_a.tick();\n\t\tsuper.updateScreen();\n\t}", "void setupBackgrounds() {\n // initialize the background tool\n BackgroundTool bgTool = new BackgroundTool(codeBaseString);\n bgSwitch = bgTool.getSwitch();\n bgChooser = bgTool.getChooser();\n }", "public void onStartRunning();", "public void notifyDisplayNotFound();" ]
[ "0.64135253", "0.6338428", "0.6292741", "0.6017215", "0.59534705", "0.5879548", "0.58674", "0.5801499", "0.5800602", "0.58004135", "0.5784554", "0.57264876", "0.5706273", "0.56733143", "0.5660345", "0.5658398", "0.5654542", "0.5653022", "0.5645999", "0.5644017", "0.5634078", "0.5596784", "0.5595062", "0.5567972", "0.5557215", "0.5517522", "0.54975545", "0.54744554", "0.54482234", "0.54411626", "0.5433965", "0.54045266", "0.5403302", "0.53836626", "0.5381711", "0.5378958", "0.5370186", "0.5369767", "0.53679675", "0.5367301", "0.53644615", "0.53618085", "0.53618085", "0.53618085", "0.53618085", "0.53618085", "0.53618085", "0.53560835", "0.5350892", "0.5349687", "0.5342353", "0.5335046", "0.53255844", "0.53153914", "0.53142446", "0.53142446", "0.53117436", "0.53117436", "0.5311217", "0.53038794", "0.530099", "0.52946275", "0.5292383", "0.5272298", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.52665186", "0.5262804", "0.5255486", "0.525272", "0.5246376", "0.5243985", "0.5241651", "0.5240696", "0.5233593", "0.5228812", "0.522746", "0.5225835", "0.5225299", "0.52250844", "0.52143854", "0.5211119", "0.52084535", "0.52051914", "0.52005386", "0.5200372", "0.5199868", "0.5199423", "0.51991266", "0.51968753", "0.519524", "0.519316", "0.51876014", "0.5185694" ]
0.0
-1
Show the result on screen when detection is done.
@Override protected void onPostExecute(IdentifyResult[] result) { setUiAfterIdentification(result, mSucceed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onPostExecute(Face[] result) {\n if (check == 0) {\n setUiAfterDetection(result, mSucceed, 0);\n } else if (check == 1) {\n setUiAfterDetection(result, mSucceed, 1);\n }\n }", "private void setUiAfterDetection(Face[] result, boolean succeed, int checkImage) {\n\n // Detection is done, hide the progress dialog.\n mProgressDialog.dismiss();\n\n // Enable all the buttons.\n setAllButtonsEnabledStatus(true);\n\n // Disable button \"detect\" as the image has already been detected.\n setShareButtonsEnabledStatus(false);\n setShowButtonsEnabledStatus(false);\n if (checkImage == 0) {\n if (succeed) {\n check = 1;\n // The information about the detection result.\n if (result.length != 0) {\n face1 = result;\n foundFace1 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap1, result, true));\n genderFace1 = face1[0].faceAttributes.gender.startsWith(\"male\") ? 0 : 1;\n }\n }\n } else {\n if (succeed) {\n // The information about the detection result.\n check = 0;\n if (result.length != 0) {\n face2 = result;\n foundFace2 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap2, result, true));\n\n }\n }\n checkInputImage(face1, face2);\n count = 0;\n }\n }", "private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n if (succeed) {\n // Set the information about the detection result.\n Log.e(LOG_TAG1, \"Identification is done\");\n\n if (result != null) {\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Identified: \"\n + (identifyResult.candidates.size() > 0\n ? StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" with confidence \"+identifyResult.candidates.get(0).confidence\n : \"Unknown Person\")\n + \". \";\n\n if (identifyResult.candidates.size() > 0) {\n face_result = face_result + \" \" + StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" (\" + identifyResult.candidates.get(0).confidence + \") \";\n }\n LogViewer.addLog(\"Face API: \" + face_result);\n\n }\n\n //mIdentifyResults.get(position).candidates.get(0).confidence\n Log.e(LOG_TAG1,logString);\n doneSignal.countDown();\n } else {\n Log.e(LOG_TAG1,\"null result in setUIAfterIdentification\");\n doneSignal.countDown();\n }\n }\n Log.e(LOG_TAG1,\"SUCCESS! DONE!!! face recognition\");\n doneSignal.countDown();\n }", "public void run() {\n System.out.println(\"main recognition loop started\");\n while (true) {\n try { \n // ask the recognizer to recognize text in the recording\n if(recognizer.getState()==Recognizer.State.READY) {\n Result result = recognizer.recognize(); \n // got a result\n if (result != null) {\n resultText = result.getBestFinalResultNoFiller();\n if(resultText.length()>0) {\n // System.out.println(\"[\"+result.getStartFrame()+\",\"+result.getEndFrame()+\"]\");\n// System.out.println(result.getTimedBestResult(false, true));\n makeEvent();\n }\n }\n }\n }\n catch (Exception e) { \n System.out.println(\"exception Occured \"); \n e.printStackTrace(); \n System.exit(1);\n }\n }\n }", "private void onRecognizeAsyncTaskComplete(OcrResult result){\n \t\n \tif(result != null){\n \tLog.v(TAG, \"Recognize complete (\" + result + \"): \" + result.getText());\n\t \tLog.v(TAG,\"recognize: (6) Bitmap is \" + result.getBitmap());\n try {\n \tif(currentRequest == MSG_RECOGNIZE_TXT){\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT_TXT, currentRequest, mState.ordinal(), result.getText()));\t\n \t} else {\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT, currentRequest, mState.ordinal(), result));\n \t}\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n }\n \n \t} else {\n \t\t// We did not receive an OCR result\n \tLog.i(TAG, \"Recognize complete: No result\");\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_recognition));\n \t}\n\n \t// Go back to IDLE (or if the baseApi no longer exists go to UNINITIALIZED\n \tmState = (baseApi != null) ? State.IDLE : State.UNINITIALIZED;\n\t\t\n \t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n }", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n progressDialog.dismiss();\n\n setAllButtonsEnabledStatus(true);\n setIdentifyButtonEnabledStatus(false);\n\n if (succeed) {\n // Set the information about the detection result.\n setInfo(\"Identification is done\");\n\n if (result != null) {\n mFaceListAdapter.setIdentificationResult(result);\n\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Face \" + identifyResult.faceId.toString() + \" is identified as \"\n + (identifyResult.candidates.size() > 0\n ? identifyResult.candidates.get(0).personId.toString()\n : \"Unknown Person\")\n + \". \";\n }\n addLog(logString);\n\n // Show the detailed list of detected faces.\n ListView listView = (ListView) findViewById(R.id.list_identified_faces);\n listView.setAdapter(mFaceListAdapter);\n\n TextView textView = (TextView) findViewById(R.id.tips);\n textView.setText(\"检测结果\");\n }\n }\n }", "private void showResult() {\n if (Utils.isKitkat()) TransitionManager.beginDelayedTransition(llBody);\n if (tvResult != null)\n flSceneFrame.removeView(tvResult);\n tvResult = new TextView(this);\n tvResult.setBackgroundColor(getResources().getColor(R.color.colorRedTranslucent));\n tvResult.setTextColor(getResources().getColor(android.R.color.white));\n tvResult.setText(selectedAnswer.getText());\n tvResult.setPadding(4, 4, 4, 4);\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.setMargins(utils.getQuadrantBasedX(ivScene, selectedAnswer.getRelativeCoordinateX()), utils.getQuadrantBasedY(ivScene, selectedAnswer.getRelativeCoordinateY()), 0, 0);\n flSceneFrame.addView(tvResult, params);\n btNext.setVisibility(View.VISIBLE);\n }", "protected void execute() {\n\t\tBBox bBox = bBoxLocator.getBBox();\n\t\tSmartDashboard.putBoolean(\"Can See With Vision\", wasDetected);\n\n\t\tif (bBox != null) {\n\t\t\twasDetected = true;\n\t\t\tpidAngle.setSetpoint(Robot.drivetrain.getHeading() + bBox.angleDeg);\n\t\t\tSmartDashboard.putNumber(\"PID Vision Setpoint Angle\", pidAngle.getSetpoint());\n\t\t}\n\n\t\tif (!waitForVision || wasDetected) {\n\t\t\tRobot.drivetrain.drive(driveOutput * (useAccelerationFiler ? filter.output() : 1), driveCurve);\n\t\t}\n\t}", "private void displayResults() {\r\n\t\tGImage results;\r\n\t\tif(mehran == null ) {\r\n\t\t\tresults = new GImage(\"WinImage.png\");\r\n\t\t\tresults.scale(.7);\r\n\t\t} else {\r\n\t\t\tresults = new GImage(\"LoseImage.png\");\r\n\t\t\tresults.scale(1.5);\r\n\t\t}\r\n\t\tresults.setLocation((getWidth() - results.getWidth()) / 2.0, (getHeight() - results.getHeight()) / 2.0);\r\n\t\tadd(results);\r\n\t}", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}", "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}", "private void showResults() {\n verifyFCMToken(this);\n progressDialog.cancel();\n Toast.makeText(RegisterActivity.this, \"Welcome!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "private void display() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n// Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n }", "public void handleVerificationSuccessResult(ZoomVerificationResult successResult) {\n if (successResult.getFaceMetrics() != null) {\n // this is the raw biometric data which can be uploaded, or may be\n // base64 encoded in order to handle easier at the cost of processing and network usage\n bytes = successResult.getFaceMetrics().getZoomFacemap();\n if (!successResult.getFaceMetrics().getAuditTrail().isEmpty()) {\n face2 = successResult.getFaceMetrics().getAuditTrail().get(0).copy(Bitmap.Config.ARGB_8888, true);\n }\n\n //if (RecogEngine.g_recogResult.faceBitmap != null) {\n if (imageFile != null) {\n //Bitmap nBmp = RecogEngine.g_recogResult.faceBitmap.copy(Bitmap.Config.ARGB_8888, true);\n Bitmap nBmp = decodeFileFromPath(imageFile.getAbsolutePath()).copy(Bitmap.Config.ARGB_8888, true);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectLeftFace(buff.array(), w, h);\n }\n\n if (face2 != null) {\n Bitmap nBmp = face2;\n ivUserProfile2.setImageBitmap(nBmp);\n ivUserProfile2.setVisibility(View.VISIBLE);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n\n sessionId = successResult.getSessionId();\n liveness(successResult);\n }\n }", "@Override\r\n public void onResult(boolean result)\r\n {\n if(result){\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Start Calibration ,successful\"));\r\n }\r\n else{\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Start Calibration ,fail\"));\r\n }\r\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tToast.makeText(context, \"Capture completed!\", Toast.LENGTH_SHORT).show();\n\t\t\tloadingAlert.dismiss();\n\t\t\t((SpectroActivity)spectroFragment.getActivity()).updateLibraryFiles();\n\t\t}", "@Override\n public void onGetResult(VoiceRecognizerResult result) {\n mResultTv.setText(\"(\" + result.text + \")\");\n\n if (result.isEnd) {\n mRecoState = 0;\n updateBtn(mRecoState);\n }\n }", "public void onSuccess(Object result) {\n\t\t\tSystem.err.println(\"showing results...\");\n\t\t\tcallStack.remove(\"target\");\n\t\t\trefgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result);\n\t\t}", "void imFinished();", "@Override\n public void done() {\n recognizer.stopRecognition();\n\n }", "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }", "private void notifyFinishGame(GameResult result) {\r\n\t\tfor (Player e : spectators)\r\n\t\t\te.finishGame(result);\r\n\t}", "public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}", "public void display() {\n startPreview();\n }", "public void displayResults() {\r\n Preferences.debug(\" ******* FitMultiExponential ********* \\n\\n\", Preferences.DEBUG_ALGORITHM);\r\n dumpTestResults();\r\n }", "@AfterMethod\n\tpublic void end(ITestResult result){\n if(ITestResult.FAILURE==result.getStatus()){\n \t Utility.captureScreenShots(driver, result.getName());\n }\n\t}", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "void showResultActivity() {\n\n Intent intent = new Intent();\n intent.setClass(this, ScanResultActivity.class);\n startActivity(intent);\n finish();\n\n playEffect();\n }", "void discoverFinished();", "private void handleRawCaptureResult(CaptureResult result) {\n if (test_wait_capture_result) {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n if (onRawImageAvailableListener != null) {\n onRawImageAvailableListener.setCaptureResult(result);\n }\n }", "public void onSuccess(Object result) {\n\t\t\tSystem.err.println(\"showing results...\");\n\t\t\t//refgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result);\n\n\t\t\trefgview.getSearchPanel().displaySearchTargets((NodeDTO[])result);\n\t\t}", "protected void execute() {\n\t\t\r\n\t\tParticleAnalysisReport[] reports = simpleVision.getFrame();\r\n\t\t for (int i = 0; i < reports.length; i++) { // print results\r\n ParticleAnalysisReport r = reports[i];\r\n SmartDashboard.putString(\"Particle\" + i, r.center_mass_x + \", \" + r.center_mass_y);\r\n\t\t }\r\n\t\t\r\n\t}", "private void showResult(final String textToShow) {\n // Run on UI thread as we'll updating our app UI\n runOnUiThread(\n () -> {\n // Append the result to the UI.\n resultTextView.append(textToShow);\n\n // Clear the input text.\n inputEditText.getText().clear();\n\n // Scroll to the bottom to show latest entry's classification result.\n scrollView.post(() -> scrollView.fullScroll(View.FOCUS_DOWN));\n });\n }", "public void checkFinished() {\n int check = 0;\n for (int i = 0; i < cards.size(); i++) {\n if (cards.get(i).getTurned() == true) {\n check++;\n }\n }\n if (check == cards.size()) {\n clip.stop();\n resultGUI = new ResultGUI(p1Points, p2Points);\n resultGUI.setSize(700, 500);\n resultGUI.setVisible(true);\n setVisible(false);\n }\n }", "@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }", "public static void display(String result){\n\t\tresults.setText(result);\n\t}", "@Override\r\n public void run() {\n do {\r\n try {\r\n Thread.sleep(100);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n Result result = null;\r\n BufferedImage image = null;\r\n if (webcam.isOpen()) {\r\n if ((image = webcam.getImage()) == null) {\r\n continue;\r\n }\r\n \t//iconlabel\r\n\t ImageIcon icon=new ImageIcon(image);\r\n\t icon.setImage(icon.getImage().getScaledInstance(300,300,Image.SCALE_DEFAULT));\r\n\t iconLabel.setIcon(icon); \r\n\t \r\n \t//qrcode\r\n LuminanceSource source =new BufferedImageLuminanceSource( image) ;\r\n BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));\r\n\r\n try {\r\n result = new MultiFormatReader().decode(bitmap);\r\n } catch (NotFoundException e) {\r\n // fall thru, it means there is no QR code in image\r\n }\r\n }\r\n if (result != null) {\r\n textarea.setText(result.getText());\r\n System.out.println(result.getText());\r\n }\r\n\r\n } while (true);\r\n }", "public void printFinishedTarget() {\n try {\n for (; ;) {\n Target target = null;\n synchronized (finishedTargets) {\n while (finishedTargets.size() == 0) {\n finishedTargets.wait();\n }//while\n target= (Target) finishedTargets.removeFirst();\n target.show();\n }\n }//for\n } catch (InterruptedException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public void showResults(String results){\n\t\t\tMessage msg = MainUIHandler.obtainMessage(UI_SHOW_RESULTS);\n\t\t\tmsg.obj=results;\n\t\t\tMainUIHandler.sendMessage(msg);\t\n\t\t}", "@Override\n\t\tprotected void onPostExecute(Boolean result) {\n\t\t\tshowResult(result);\n\t\t}", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "@Override\n\t\t\t\t\tpublic void onFinish(long time) {\n\t\t\t\t\t\ttextView.append(\"get \" + testPicNum + \" pictures: use \" + time + \"ms\" + \"\\n\");\t\n\t\t\t\t\t}", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\n }", "private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }", "private void showResult() {\n mTvErrorMessage.setVisibility(View.INVISIBLE); // set the visibility of the error message to invisible\n mCryptoRecyclerView.setVisibility(View.VISIBLE); // set the visibility of the recycler to visible\n }", "@Override public void onMissing(FaceDetector.Detections<Face> detectionResults) {\n VisionAPIManager.this.face = null;\n VisionAPIManager.this.rightEye = VisionAPIManager.this.leftEye = null;\n onComputeFaceDone.onNext(lastFrame);\n }", "@Override\n public void onSuccess(List<FirebaseVisionImageLabel> labels) {\n dialog.dismiss();\n\n float predictions= 0;\n String names = \"\";\n for (FirebaseVisionImageLabel label: labels) {\n String name = label.getText();\n float confidence = label.getConfidence() *100;\n if (predictions == 0){\n predictions = confidence;\n names = name;\n }else if (confidence > predictions){\n predictions = confidence;\n names = name;\n }\n\n //frameImg.setImageBitmap(image.getBitmap());\n }\n Log.d(\"result\", \"onSuccess: prediction: \"+ predictions+\" name: \"+names);\n if (predictions >40){\n\n\n int percentage = (int) predictions;\n chartView.setPercent(predictions);\n text.setText(names +\" \"+percentage+\"%\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Toast.makeText(ObjectDetectionSample.this, \"name \"+names+\" confidence\"+percentage , Toast.LENGTH_SHORT).show();\n\n }else {\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }\n\n isProcessingComplete =true;\n }", "public void showBaby(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output1 = new ByteArrayOutputStream();\n mBitmap1.compress(Bitmap.CompressFormat.JPEG, 100, output1);\n ByteArrayInputStream inputStream1 = new ByteArrayInputStream(output1.toByteArray());\n\n ByteArrayOutputStream output2 = new ByteArrayOutputStream();\n mBitmap2.compress(Bitmap.CompressFormat.JPEG, 100, output2);\n ByteArrayInputStream inputStream2 = new ByteArrayInputStream(output2.toByteArray());\n\n // Start a background task to detect faces in the image.\n new BabyPredictActivity.BabyPredict().execute(inputStream1);\n new BabyPredictActivity.BabyPredict().execute(inputStream2);\n\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "@Override\n public void run() {\n result.setText(\"\"+res);\n }", "@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}", "void onComplete(ResultModel result);", "public void displayResultScreen() {\n displayScreenAdminView = new Result();\n\n\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "private void displaySpeechRecognizer() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n // Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, Constants.SPEECH_REQUEST_CODE);\n }", "protected void doPostAlgorithmActions() {\r\n\r\n if (displayLoc == NEW) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }", "public abstract void displayResult(Result result);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tif(\"false\".equals(result)){\n\t\t\t\t\t\tLog.e(TAG,\"图片没识别出脸\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfacepp.addface2person(sp.getString(facepp.PERSON+\"ddd\", \"\"), result, new CallBack() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "@Override\n public void onSuccess(List<FirebaseVisionImageLabel> labels) {\n dialog.dismiss();\n float predictions= 0;\n String names = \"\";\n for (FirebaseVisionImageLabel label: labels) {\n String name = label.getText();\n float confidence = label.getConfidence() *100;\n if (predictions == 0){\n predictions = confidence;\n names = name;\n }else if (confidence > predictions){\n predictions = confidence;\n names = name;\n }\n\n //frameImg.setImageBitmap(image.getBitmap());\n }\n if (predictions >40){\n\n int percentage = (int) predictions;\n chartView.setPercent(predictions);\n text.setText(names +\" \"+percentage+\"%\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Toast.makeText(ObjectDetectionSample.this, \"name \"+names+\" confidence\"+percentage , Toast.LENGTH_SHORT).show();\n\n }else {\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }\n\n\n }", "@Override\r\n\tpublic boolean results()\r\n\t{\r\n\t\treturn this.results(this.getRobot());\r\n\t}", "@SuppressWarnings(\"unused\")\n public void handleTestEvent(int result) {\n ApplicationManager.getApplication().invokeLater(() -> {\n checkInProgress = false;\n setStatusAndShowResults(result);\n com.intellij.openapi.progress.Task.Backgroundable task = getAfterCheckTask(result);\n ProgressManager.getInstance().run(task);\n });\n }", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Displaying...\");\r\n\t}", "public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }", "public void doAutoDetect()\r\n {\r\n Graphics g = this.getGraphics(); \r\n // Create the off-screen drawing area\r\n offscreenImage = createImage(getWidth(), getHeight());\r\n offscreenGraphics = offscreenImage.getGraphics();\r\n long start;\r\n long end;\r\n\r\n // Tally the number of times we were able to draw direct and buffered\r\n int directCount = 0;\r\n int bufferedCount = 0;\r\n\r\n g.setColor(getBackground());\r\n // Mark what time we started\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns directly to the screen, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(g);\r\n end = System.currentTimeMillis();\r\n directCount++;\r\n }\r\n g.setColor(getForeground());\r\n\r\n // record the total time spent drawing directly\r\n long directTime = end - start;\r\n\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns to the offscreen graphics, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(offscreenGraphics);\r\n end = System.currentTimeMillis();\r\n bufferedCount++;\r\n }\r\n\r\n long bufferedTime = end - start;\r\n\r\n // If we were able to draw more times using the buffered graphics,\r\n // or if the drawing counts are the same, but the total time for\r\n // the buffering was less, buffering is faster.\r\n if ((bufferedCount > directCount) ||\r\n ((bufferedCount == directCount) &&\r\n (bufferedTime < directTime))) {\r\n drawDirect = false;\r\n } else {\r\n // If we want to draw direct, free the space taken up by the\r\n // offscreen image and graphics context.\r\n offscreenImage.flush();\r\n offscreenImage = null;\r\n offscreenGraphics = null;\r\n drawDirect = true;\r\n }\r\n }", "public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }", "public void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(\"********** \tTest Successfull : \"+result.getName());\n\t\t\n\t\t\n\t}", "@Override\n public void display() {\n display.display();\n }", "void finishMatch() {\n\t\tint playerResult = ParticipantResult.MATCH_RESULT_NONE;\n\t\tint opponentResult = ParticipantResult.MATCH_RESULT_NONE;\n\n\t\tif (!GameActivity.gameMachine.player.isAlive()) {\n\t\t\tLayoutHelper.showResult(resultTextView, false);\n\t\t\tplayerResult = ParticipantResult.MATCH_RESULT_LOSS;\n\t\t\topponentResult = ParticipantResult.MATCH_RESULT_WIN;\n\t\t} else if (!GameActivity.gameMachine.opponent.isAlive()) {\n\t\t\tLayoutHelper.showResult(resultTextView, true);\n\t\t\tplayerResult = ParticipantResult.MATCH_RESULT_WIN;\n\t\t\topponentResult = ParticipantResult.MATCH_RESULT_LOSS;\n\t\t}\n\n\t\tArrayList<ParticipantResult> results = new ArrayList<ParticipantResult>();\n\n\t\tresults.add(new ParticipantResult(GPGHelper.getMyId(\n\t\t\t\tgameHelper.getApiClient(), match), playerResult,\n\t\t\t\tParticipantResult.PLACING_UNINITIALIZED));\n\n\t\tresults.add(new ParticipantResult(GPGHelper.getOpponentId(\n\t\t\t\tgameHelper.getApiClient(), match), opponentResult,\n\t\t\t\tParticipantResult.PLACING_UNINITIALIZED));\n\n\t\tif (match.getStatus() == TurnBasedMatch.MATCH_STATUS_ACTIVE) {\n\t\t\tif (match.getTurnStatus() == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN) {\n\t\t\t\tGames.TurnBasedMultiplayer.finishMatch(\n\t\t\t\t\t\tgameHelper.getApiClient(), match.getMatchId(),\n\t\t\t\t\t\twriteGameState(match), results);\n\t\t\t\tturnUsed = true;\n\t\t\t\tremoveNotification();\n\t\t\t}\n\t\t} else if (match.getStatus() == TurnBasedMatch.MATCH_STATUS_COMPLETE) {\n\t\t\tif (match.getTurnStatus() == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN) {\n\t\t\t\tGames.TurnBasedMultiplayer.finishMatch(\n\t\t\t\t\t\tgameHelper.getApiClient(), match.getMatchId());\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected boolean isFinished() {\n return drivetrain.isMotionProfileFinished();\n }", "public void onTestSuccess(ITestResult result) {\n\t\tlogger.info(\"Test case Done\");\n\t}", "private void announceRoundResult()\n {\n // Last actions of each player, to compare\n GameAction fpAction = firstPlayer.getLastAction();\n GameAction spAction = secondPlayer.getLastAction();\n\n // Display first IA game\n if (!hasHuman)\n {\n if (fpAction instanceof RockAction)\n {\n animateSelectedButton(firstPlayerRock, true);\n }\n else if (fpAction instanceof PaperAction)\n {\n animateSelectedButton(firstPlayerPaper, true);\n }\n else if (fpAction instanceof ScissorsAction)\n {\n animateSelectedButton(firstPlayerScissors, true);\n }\n }\n // Display second IA game\n if (spAction instanceof RockAction)\n {\n animateSelectedButton(secondPlayerRock, false);\n }\n else if (spAction instanceof PaperAction)\n {\n animateSelectedButton(secondPlayerPaper, false);\n }\n else if (spAction instanceof ScissorsAction)\n {\n animateSelectedButton(secondPlayerScissors, false);\n }\n\n\n // First player has played something ==> look at result\n if (firstPlayer.hasAlreadyPlayed())\n {\n switch (fpAction.versus(spAction))\n {\n case WIN:\n updateResultIcons(true, false);\n break;\n case DRAW:\n updateResultIcons(false, true);\n break;\n case LOSE:\n updateResultIcons(false, false);\n break;\n }\n }\n // First player didn't play ==> draw or loose\n else\n {\n // Draw\n if (!secondPlayer.hasAlreadyPlayed())\n {\n updateResultIcons(false, true);\n }\n // Lose\n else\n {\n updateResultIcons(false, false);\n }\n }\n }", "protected void execute() {\n\t\tSystem.out.println(\"Vision error: \" + RobotMap.VisionDistanceLeftPIDController.getError() + \" , \" + RobotMap.VisionDistanceRightPIDController.getError());\n\t\tSystem.out.println(\"vision, pidcontroller output: \" + RobotMap.VisionDistanceLeftPIDController.get() + \" , \" + RobotMap.VisionDistanceRightPIDController.get());\n\n\t}", "public static void printDoneLoading() {\n System.out.println(Message.DONE_LOADING);\n }", "private void update() {\n\t\tif (needsPreview) return; // gonna happen soon anyway\n\n\t\tTask<Image> task = new Task<Image>() {\n\t\t\t@Override\n\t\t\tprotected Image call() {\n\t\t\t\treturn plotter.get().getOutput();\n\t\t\t}\n\t\t};\n\t\ttask.setOnSucceeded(event -> showImg(task.getValue()));\n\n\t\tThread th = new Thread(task);\n\t\tth.setDaemon(true);\n\t\tth.start();\n\n\t}", "public void showResult(boolean result) {\n\t\tToast.makeText(this, \"The result was: \" + result, Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t}", "private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "@Override\n\t\t protected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tCameraActivity.setCameraOverlay(result, true);\n\t\t\t\tCameraActivity.taking_picture = false;\n\t\t }", "void onComplete();", "public void onTestSuccess(ITestResult result) {\r\n\t\ttry {\r\n\t\t\t//used to write result details in html\r\n\t\t\tgenerateTestExecution(result);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }", "public void run() {\n\t\t\t\t\t\tif (result!=null){\n\t\t\t\t\t\t\timageview.setImageDrawable(result);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\timageview.setImageResource(R.drawable.icono_ranking);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void showDisplay() {\n this.display.displayScreen();\n }", "protected void end() {\n\t\tRobot.cubeCollector.setCubeCollector(ControlMode.PercentOutput, 0);\n\n\t}", "void analysisCompleted();", "public void imFinished() {\n isUserDone = true;\n layoutUserReady.setVisibility(View.VISIBLE);\n\n String userTextToShow = \"\";\n switch (challengeType) {\n case TIME:\n userTextToShow = getString(R.string.user_finished) +\n \"\\n\" +\n getString(R.string.final_distance) +\n (int)((ChallengeSenderFragment)senderFragment).getRun().getTrack().getDistance() +\n getString(R.string.meters);\n break;\n case DISTANCE:\n userTextToShow = getString(R.string.user_completed) +\n challengeGoal + getString(R.string.km) +\n getString(R.string.white_space) + getString(R.string.in) +\n UtilsUI.timeToString((int)((ChallengeSenderFragment)senderFragment).getRun().getDuration(),\n true);\n break;\n }\n userTxt.setText(userTextToShow);\n //noinspection deprecation\n userStatus.setImageDrawable(getResources().getDrawable(R.drawable.finish_icon));\n\n fragmentManager.beginTransaction().remove(senderFragment).commitAllowingStateLoss();\n\n challengeProxy.imFinished();\n\n if (isOpponentDone) {\n isIntendedActivityExit = true;\n endChallenge();\n }\n }", "private void displayProcessedImage(Measurement measurement) {\n DecimalFormat df = new DecimalFormat(\"#0.000\");\n String pupilL_str = df.format(measurement.getPupilLeft()) + \"mm\";\n String pupilR_str = df.format(measurement.getPupilRight()) + \"mm\";\n String diff_str = df.format(measurement.getDifference()) + \"mm\";\n double difference = measurement.getDifference();\n String filepath = measurement.getFilepath();\n Bitmap imgBitmap = translateImgToBitmap(filepath);\n\n textLeftPupil.setText(pupilL_str);\n textRightPupil.setText(pupilR_str);\n textDifference.setText(diff_str);\n if(imgBitmap != null) resultImg.setImageBitmap(imgBitmap);\n\n if(difference > 0.0f) textResult1.setText(\"L > R\");\n if(difference < 0.0f) textResult1.setText(\"L < R\");\n if(difference == 0.0f) textResult1.setText(\"L = R\");\n\n showLayout(resultLayout);\n }", "public void showSuccess() {\n ViewFlipper vf = findViewById(R.id.register_viewFlipper);\n vf.showNext();\n }", "void onPictureCompleted();" ]
[ "0.6611768", "0.6551328", "0.6441687", "0.6367718", "0.62927514", "0.6168551", "0.6156496", "0.61087126", "0.606662", "0.5991048", "0.59591866", "0.5958424", "0.5958424", "0.59430337", "0.59288865", "0.5924529", "0.5890497", "0.5884059", "0.5852055", "0.58394706", "0.58236843", "0.5810293", "0.58018595", "0.57978153", "0.5792752", "0.5786483", "0.5782926", "0.57745284", "0.5758772", "0.57573235", "0.5752353", "0.57518077", "0.57409245", "0.57402045", "0.5721648", "0.56962574", "0.5692619", "0.5683457", "0.56804806", "0.567235", "0.56466275", "0.56397665", "0.5638449", "0.56295735", "0.5628752", "0.56268203", "0.56234443", "0.5582111", "0.557992", "0.55719966", "0.55671513", "0.5559424", "0.55290407", "0.5527261", "0.55236393", "0.551277", "0.5512146", "0.5510293", "0.550871", "0.55082816", "0.5504482", "0.5501354", "0.54972404", "0.5494829", "0.5492964", "0.54911786", "0.5483836", "0.5483197", "0.5482721", "0.54792845", "0.54644626", "0.5463889", "0.5458507", "0.5454398", "0.5451385", "0.5446716", "0.54407924", "0.5438409", "0.5436231", "0.5432098", "0.5431851", "0.5431818", "0.5429848", "0.5428254", "0.54255515", "0.5420302", "0.54195124", "0.5414525", "0.5413222", "0.5412115", "0.5407211", "0.54009396", "0.53996605", "0.5398513", "0.53856784", "0.53837776", "0.5376429", "0.53741443", "0.5365134" ]
0.55357575
53
Initialize with detection result.
FaceListAdapter(Face[] detectionResult) { faces = new ArrayList<>(); faceThumbnails = new ArrayList<>(); mIdentifyResults = new ArrayList<>(); if (detectionResult != null) { faces = Arrays.asList(detectionResult); for (Face face: faces) { try { // Crop face thumbnail with five main landmarks drawn from original image. faceThumbnails.add(ImageHelper.generateFaceThumbnail( mBitmap, face.faceRectangle)); } catch (IOException e) { // Show the exception when generating face thumbnail fails. setInfo(e.getMessage()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}", "protected void initialize() {\n\t\tRobot.sender_.setSendData(vision);\n\n\t\tinitHeading = Robot.drivetrain.getGyroHeading();\n\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartDepth)) {\n\t\t\tinitDistance = Robot.depth_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartCubeSearch)) {\n\t\t\tinitDistance = Robot.cube_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartRFT)) {\n\t\t\tinitDistance = Robot.rft_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\t\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.PlatformBlueSearch) || vision.equalsIgnoreCase(SocketVisionSender.PlatformRedSearch)) {\n\t\t\tinitDistance = Robot.platform_.get_distance();\n\t\t}\n\t}", "protected void initialize() {\n \tsetTimeout(0.0);\n \t\n \tRobot.vision_.setTargetSnapshot(null);\n \t\n \tpreviousTargetTransform = Robot.vision_.getLatestGearLiftTargetTransform();\n \tRobot.vision_.startGearLiftTracker(trackerFPS_);\n }", "private void setUiAfterDetection(Face[] result, boolean succeed, int checkImage) {\n\n // Detection is done, hide the progress dialog.\n mProgressDialog.dismiss();\n\n // Enable all the buttons.\n setAllButtonsEnabledStatus(true);\n\n // Disable button \"detect\" as the image has already been detected.\n setShareButtonsEnabledStatus(false);\n setShowButtonsEnabledStatus(false);\n if (checkImage == 0) {\n if (succeed) {\n check = 1;\n // The information about the detection result.\n if (result.length != 0) {\n face1 = result;\n foundFace1 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap1, result, true));\n genderFace1 = face1[0].faceAttributes.gender.startsWith(\"male\") ? 0 : 1;\n }\n }\n } else {\n if (succeed) {\n // The information about the detection result.\n check = 0;\n if (result.length != 0) {\n face2 = result;\n foundFace2 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap2, result, true));\n\n }\n }\n checkInputImage(face1, face2);\n count = 0;\n }\n }", "protected void initialize() {\n \tm_cameraThread = new CameraThread();\n \tm_cameraThread.start();\n \tm_onTarget = false;\n \tm_moving = false;\n \tm_desiredYaw = Gyro.getYaw();\n \t\n \t\n \tcount = 0;\n }", "public void initialize()\r\n {\r\n isImageLoaded=false; \r\n isInverted=false;\r\n isBlured=false;\r\n isChanged=false;\r\n isCircularCrop= false;\r\n isRectangularCrop = false;\r\n isReadyToSave = false;\r\n didUndo = false;\r\n brightnessLevel=0.0f;\r\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "protected void initialize() {\n \ttarget = Robot.trackingCamera.getTarget();\n targetX = target[0];\n targetY = target[1];\n \tstopTime = System.currentTimeMillis() + timeOut;\n }", "@Override\n protected void initialize(){\n drivetrain.clearOldMotionProfiles();\n drivetrain.zeroEncoders();\n try{\n drivetrain.loadMotionProfile(name, isInverted);\n } catch (IOException e) {\n done = true;\n }\n drivetrain.startMotionProfile(name);\n }", "private void initResultStorage() {\n\t\tstorage = new ResultStorage();\n\t\t\n\t\tfinal String geom = GeometryNames.RECT;\n\t\tfinal String mix = \"Default\";\n\t\tfinal int steps = 20;\n\t\tfinal double[] segr = new double[] { 0.1, 0.2, 0.3, 0.7, 0.6, 0.8, 0.8,\n\t\t\t\t0.4, 0.9, 0.4, 0.8, 0.2, 0.6, 0.3, 0.7, 0.5, 0.9, 0.4, 0.8, 0.1 };\n\n\t\tfor (int i = startIndex; i < endIndex; i++) {\n\t\t\tdistribution[i] = 255;\n\t\t}\n\t\t\n\t\tstorage.setDistribution(distribution);\n\t\tstorage.setGeometry(geom);\n\t\tstorage.setMixer(mix);\n\t\tstorage.setNrSteps(steps);\n\t\tstorage.setMixingProtocol(protocol);\n\t\tstorage.setSegregation(segr);\n\t}", "@Override\n public void initialize() {\n\n drivetrain = Drivetrain.getInstance();\n \n \n\n }", "@Override\n public void init_loop() {\n telemetry.addData(\"Success: \", success);\n telemetry.addData(\"Calibration Status\", stevens_IMU.getCalibrationStatus());\n telemetry.addData(\"Gyro is Calibrated\", stevens_IMU.isGyroCalibrated());\n telemetry.addData(\"Accelerometer is Calibrated\", stevens_IMU.isAccelerometerCalibrated());\n telemetry.addData(\"Magnetometer is Calibrated\", stevens_IMU.isMagnetometerCalibrated());\n telemetry.addData(\"System is Calibrated\", stevens_IMU.isSystemCalibrated());\n }", "public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }", "static synchronized public void staticInitialize()\n {\n if (!isInitialized)\n {\n if (!startedInitializing)\n {\n startedInitializing = true;\n\n cm = new ConfigurationManager(SphinxSignalInfoProvider.class.getResource(\"hellongram.config.xml\"));\n\n // allocate the recognizer\n System.out.println(\"Loading spinx recognizer...\");\n recognizer = (Recognizer) cm.lookup(\"recognizer\");\n recognizer.allocate();\n\n //speechClassifier = (SpeechClassifier) cm.lookup(\"speechClassifier\");\n //speechClassifier.initialize();\n\n inMindDataProcessor = (InMindDataProcessor) cm.lookup(\"inMindDataProcessor\");\n\n inMindByteDataSource = (InMindByteDataSource) cm.lookup(\"inMindByteDataSource\");\n\n\n isInitialized = true;\n System.out.println(\"Spinx recognizer loaded.\");\n\n recognizerThread = new Thread(() -> {\n try\n {\n while (true)\n {\n recognizer.recognize();\n }\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n });\n recognizerThread.start();\n }\n }\n }", "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "protected void initialize() {\n drivebase.engageOmni();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_detection);\n\n mProgressDialog = new ProgressDialog(this);\n mProgressDialog.setTitle(getString(R.string.progress_dialog_title));\n\n // Disable button \"detect\" as the image to detect is not selected.\n setDetectButtonEnabledStatus(false);\n\n }", "private static native void detect_0(long nativeObj, long inputImage_nativeObj, long Bbox_mat_nativeObj, long confidence_mat_nativeObj);", "public Vision() {\n\n visionCam = CameraServer.getInstance().startAutomaticCapture(\"HatchCam\", 0);\n visionCam.setVideoMode(PixelFormat.kMJPEG, 320, 240, 115200);\n \n int retry = 0;\n while(cam == null && retry < 10) {\n try {\n System.out.println(\"Connecting to jevois serial port ...\");\n cam = new SerialPort(115200, SerialPort.Port.kUSB1);\n System.out.println(\"Success!!!\");\n } catch (Exception e) {\n System.out.println(\"We all shook out\");\n e.printStackTrace();\n sleep(500);\n System.out.println(\"Retry\" + Integer.toString(retry));\n retry++;\n }\n }\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "public void initialize() {\n\t\tdrivetrain.resetGyro();\n\t\tdrivetrain.setAngleTarget(getTargetAngle());\n\t\tLog.debug(this.getClass().toString()+ \".initialize called drivetrain.setAngleTarget(\" + getTargetAngle() + \")\");\n\t\t\n\n\t}", "public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "@Override public void onMissing(FaceDetector.Detections<Face> detectionResults) {\n VisionAPIManager.this.face = null;\n VisionAPIManager.this.rightEye = VisionAPIManager.this.leftEye = null;\n onComputeFaceDone.onNext(lastFrame);\n }", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n if (succeed) {\n // Set the information about the detection result.\n Log.e(LOG_TAG1, \"Identification is done\");\n\n if (result != null) {\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Identified: \"\n + (identifyResult.candidates.size() > 0\n ? StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" with confidence \"+identifyResult.candidates.get(0).confidence\n : \"Unknown Person\")\n + \". \";\n\n if (identifyResult.candidates.size() > 0) {\n face_result = face_result + \" \" + StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" (\" + identifyResult.candidates.get(0).confidence + \") \";\n }\n LogViewer.addLog(\"Face API: \" + face_result);\n\n }\n\n //mIdentifyResults.get(position).candidates.get(0).confidence\n Log.e(LOG_TAG1,logString);\n doneSignal.countDown();\n } else {\n Log.e(LOG_TAG1,\"null result in setUIAfterIdentification\");\n doneSignal.countDown();\n }\n }\n Log.e(LOG_TAG1,\"SUCCESS! DONE!!! face recognition\");\n doneSignal.countDown();\n }", "public CommandLineFSRecognizer() {\n init();\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "public void init(final Context context) {\n AssetManager assetManager = context.getAssets();\n\n// //if(tracker==null)\n// tracker = new MultiBoxTracker(this);\n\n cropSize = TF_OD_API_INPUT_SIZE;\n if (MODE == DetectorMode.YOLO) {\n detector =\n TensorFlowYoloDetector.create(\n assetManager,\n YOLO_MODEL_FILE,\n YOLO_INPUT_SIZE,\n YOLO_INPUT_NAME,\n YOLO_OUTPUT_NAMES,\n YOLO_BLOCK_SIZE);\n cropSize = YOLO_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_YOLO;\n } else if (MODE == DetectorMode.MULTIBOX) {\n detector =\n TensorFlowMultiBoxDetector.create(\n assetManager,\n MB_MODEL_FILE,\n MB_LOCATION_FILE,\n MB_IMAGE_MEAN,\n MB_IMAGE_STD,\n MB_INPUT_NAME,\n MB_OUTPUT_LOCATIONS_NAME,\n MB_OUTPUT_SCORES_NAME);\n cropSize = MB_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_MULTIBOX;\n } else {\n try {\n detector = TensorFlowObjectDetectionAPIModel.create(\n assetManager, TF_OD_API_MODEL_FILE, TF_OD_API_LABELS_FILE, TF_OD_API_INPUT_SIZE);\n cropSize = TF_OD_API_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n } catch (final IOException e) {\n e.printStackTrace();\n }\n }\n\n// croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n }", "protected void initialize() {\n\t\tPreferences prefs = Preferences.getInstance();\n\t\tangleKp = prefs.getDouble(\"GetPeg Kp\", 0.01);\n\t\tangleKi = prefs.getDouble(\"GetPeg Ki\", 0.001);\n\t\tangleKd = prefs.getDouble(\"GetPeg Kd\", 0.0);\n\t\tdriveOutput = prefs.getDouble(\"GetPeg Speed\", 0.5);\n\t\t\n\t\tRobot.drivetrain.reset();\n\t\tRobot.drivetrain.stop();\n\t\tpidAngle.reset();\n\t\tpidAngle.enable();\n\n\t\tRobot.gearIntake.lightOn();\n\n\t\tdouble filterSlopeTime = prefs.getDouble(\"FilterSlopeTime\", 0.2);\n\n\t\tfilter = new LinearAccelerationFilter(filterSlopeTime);\n\t\t\n\t\tSystem.out.println(\"\\n GetPegWithVision Initialized\");\n\t}", "protected void initialize(){\n\t\tRobot.driveTrain.changeTalonControlMode(TalonControlMode.Follower);\n\t\tRobot.driveTrain.setTalonsReversedState(true);\n\t\tRobotMap.visionSensor.startProcessing(PIDVisionSourceType.DistanceFromTarget);\n\t\thasStarted = RobotMap.VisionDistanceLeftPIDController.init(m_setPoint, StaticMembers.ABSOLUTE_TOLERANCE_DISTANCE);\n\t\thasStarted = RobotMap.VisionDistanceRightPIDController.init(m_setPoint, StaticMembers.ABSOLUTE_TOLERANCE_DISTANCE) && hasStarted;\n\t}", "protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }", "public void handleVerificationSuccessResult(ZoomVerificationResult successResult) {\n if (successResult.getFaceMetrics() != null) {\n // this is the raw biometric data which can be uploaded, or may be\n // base64 encoded in order to handle easier at the cost of processing and network usage\n bytes = successResult.getFaceMetrics().getZoomFacemap();\n if (!successResult.getFaceMetrics().getAuditTrail().isEmpty()) {\n face2 = successResult.getFaceMetrics().getAuditTrail().get(0).copy(Bitmap.Config.ARGB_8888, true);\n }\n\n //if (RecogEngine.g_recogResult.faceBitmap != null) {\n if (imageFile != null) {\n //Bitmap nBmp = RecogEngine.g_recogResult.faceBitmap.copy(Bitmap.Config.ARGB_8888, true);\n Bitmap nBmp = decodeFileFromPath(imageFile.getAbsolutePath()).copy(Bitmap.Config.ARGB_8888, true);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectLeftFace(buff.array(), w, h);\n }\n\n if (face2 != null) {\n Bitmap nBmp = face2;\n ivUserProfile2.setImageBitmap(nBmp);\n ivUserProfile2.setVisibility(View.VISIBLE);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n\n sessionId = successResult.getSessionId();\n liveness(successResult);\n }\n }", "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n //initialize either phone or webcam depending on field set during object initialization\n if(device == Device.Phone){\n parameters.cameraDirection = CameraDirection.BACK;\n }else{\n parameters.cameraName = hwMap.get(WebcamName.class, \"Webcam\");\n\n }\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "private void setDetector() {\n\n try {\n AssetManager assetManager = getAssets();\n String[] fileList = assetManager.list(modelPath);\n String modelType = dlaasD.ReturnModelType(assetManager, modelPath);\n\n if (fileList.length != 0) {\n\n if (modelType.equals(\"mobilenet_1\")) {\n detector = new MobileNet(rs, assetManager, modelPath);\n } else {\n\n detector = new MobileNetSSD(rs, assetManager, modelPath);\n }\n } else {\n if (modelType.equals(\"mobilenet_1\")) {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNet(rs, assetManager, modelDir);\n } else {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNetSSD(rs, assetManager, modelDir);\n }\n\n }\n } catch (IOException e) {\n Log.d(\"onFindModule: \", e.toString());\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "protected void initialize() {\n\t\trequires(simpleVision);\r\n\t}", "public void initialize() {\n // empty for now\n }", "public static void initialize()\n {\n // Initiate election\n Runnable sender = new BullyAlgorithm(\"Sender\",\"election\");\n new Thread(sender).start();\n }", "public void initialize()\n {\n }", "public void InitLoadingInRecognition() {\n Point screen = MainView.GetScreenSize();\n // image setting\n int x = (screen.x - LOADING_IMAGE_SIZE.x) >> 1;\n int y = 100;\n this.m_LoadingImage.InitCharacterEx(\n \"recognizerimages\",\n x, y,\n LOADING_IMAGE_SIZE.x,\n LOADING_IMAGE_SIZE.y,\n 255, 1.0f, 0);\n // animation setting\n this.m_LoadingImage.InitAnimation(\n ANIMATION_LOADING_COUNT_MAX,\n ANIMATION_LOADING_FRAME, 0);\n }", "private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }", "private void onRecognizeAsyncTaskComplete(OcrResult result){\n \t\n \tif(result != null){\n \tLog.v(TAG, \"Recognize complete (\" + result + \"): \" + result.getText());\n\t \tLog.v(TAG,\"recognize: (6) Bitmap is \" + result.getBitmap());\n try {\n \tif(currentRequest == MSG_RECOGNIZE_TXT){\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT_TXT, currentRequest, mState.ordinal(), result.getText()));\t\n \t} else {\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT, currentRequest, mState.ordinal(), result));\n \t}\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n }\n \n \t} else {\n \t\t// We did not receive an OCR result\n \tLog.i(TAG, \"Recognize complete: No result\");\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_recognition));\n \t}\n\n \t// Go back to IDLE (or if the baseApi no longer exists go to UNINITIALIZED\n \tmState = (baseApi != null) ? State.IDLE : State.UNINITIALIZED;\n\t\t\n \t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n }", "public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }", "private void onInitAsyncTaskComplete(boolean success){\n Log.d(TAG, \"onInitAsyncTaskComplete\");\n \n // get rid of the AsyncTask\n initTask = null;\n \n if(success && baseApi != null){\n baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_BLOCK);\n baseApi.setVariable(TessBaseAPI.VAR_SAVE_BLOB_CHOICES, TessBaseAPI.VAR_TRUE);\n baseApi.setVariable(TessBaseAPI.VAR_USE_CJK_FP_MODEL, TessBaseAPI.VAR_TRUE);\n baseApi.setVariable(TessBaseAPI.VAR_EDGES_MAX_CHILD_OUTLINE, String.valueOf(50));\n\n \t\t// If the base API was successfully initialized, put us in the IDLE state (to allow recognition).\n \tsendMessage(currentClient, MSG_REPLY, currentRequest, getString(R.string.success_initialization));\n \t\tmState = State.IDLE;\n\n \t\tif(currentRequest == MSG_RECOGNIZE || currentRequest == MSG_RECOGNIZE_TXT) {\n \t\t\t// Inform the user that we will continue with processing\n \t\t\tsendMessage(currentClient, MSG_PROGRESS, currentRequest, getString(R.string.busy_recognizing));\n \t\t// We still have a recognition pending.\n \t \tLog.v(TAG,\"recognize: (3) Bitmap is \" + currentBitmap);\n \t recognize(currentClient, currentBitmap);\n \t\t} else {\n \t\t// We're done with the current client. Remove any references to the object.\n \t Log.v(TAG, \"onInitAsyncTaskComplete. don't recognize. currentRequest is \" + currentRequest);\n currentClient = null;\n \t\t}\n } else {\n \t\t// If the base API was NOT successfully initialized, release the resource.\n \t\t// NOTE: the releaserOCR() method will put us in the UNINITIALIZED state.\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_initialize));\n \t\treleaseOCR();\n\n \t\t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n \t}\n }", "protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n Log.i(TAG, \"called onCreate\");\n super.onCreate(savedInstanceState);\n\n requestPermissions();\n\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n\n setContentView(R.layout.camera_view);\n\n mOpenCvCameraView = (CameraView) findViewById(R.id.camera_view);\n\n mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);\n\n mOpenCvCameraView.setCvCameraViewListener(this);\n\n DetectProcessor.setContext(this);\n\n try {\n // create either a new ImageClassifierQuantizedMobileNet or an ImageClassifierFloatInception\n classifier = new ImageClassifierFloatInception(this);\n } catch (IOException e) {\n Log.e(TAG, \"Failed to initialize an image classifier.\", e);\n }\n\n // mkdir for debug\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"opencv\");\n System.out.println(\"file\" + file.getAbsolutePath());\n if (file.exists() || !file.mkdirs()) {\n Log.e(\"YCard\", \"Directory not created\");\n }\n }", "@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }", "private void createTrackingPipeline() throws ConfigurationException\n {\n fgDetector = new HSVFGDetector();\n // fgDetector = new DifferenceFGDetector();\n\n blobDetector = opencv_legacy.cvCreateBlobDetectorSimple();\n // blobTracker = opencv_legacy.cvCreateBlobTrackerCCMSPF();\n blobTracker = opencv_legacy.cvCreateBlobTrackerCC();\n trackerPostProcessor = opencv_legacy.cvCreateModuleBlobTrackPostProcKalman();\n trackerFrameCount = 0;\n blobs.Clear();\n badFramesForBlob.clear();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "@Override\n public Detections recognize(byte[] yuv, int image_w, int image_h, int rotation, Bitmap b) {\n System.out.println(image_h + \"......ye height hai\");\n System.out.println(image_w + \"......ye width hai\");\n Detections detects = new Detections();\n\n\n Logger.tick(\"d\");\n Logger.tick(\"yuvtoJPG\");\n int isYUV;\n image_bytes.clear();\n if (jpegQuality>0) {\n // we do rotation server-side, android client too slow (takes around 10ms in both java\n // and c on Huawei P9, while jpeg compression takes around 8ms).\n try {\n image_bytes.put(Transform.YUVtoJPEG(yuv, image_w, image_h, jpegQuality));\n isYUV = 0;\n } catch (Exception e) {\n // most likely encoded image is too big for image_bytes buffer\n Logger.addln(\"WARN: Problem encoding jpg: \"+e.getMessage());\n return detects; // bail\n }\n } else {\n // send image uncompressed\n image_bytes.put(yuv);\n isYUV=1;\n }\n detects.addTiming(\"yuvtoJPG\",Logger.tockLong(\"yuvtoJPG\"));\n\n int dst_w=image_w, dst_h=image_h;\n if ((rotation%180 == 90) || (rotation%180 == -90)) {\n dst_w = image_h; dst_h = image_w;\n }\n Matrix frameToViewTransform = Transform.getTransformationMatrix(\n image_w, image_h,\n dst_w, dst_h,\n rotation, false);\n // used to map received response rectangles back to handset view\n Matrix viewToFrameTransform = new Matrix();\n frameToViewTransform.invert(viewToFrameTransform);\n\n if (IP==null) {\n // resolve server name to IP address\n try {\n InetAddress names[] = InetAddress.getAllByName(server);\n StringBuilder n = new StringBuilder();\n for (InetAddress name : names) {\n n.append(name);\n if (name instanceof Inet4Address) {IP = name; break;}\n }\n Logger.addln(\"\\nResolved server to: \"+IP);\n if (IP == null) {\n Logger.addln(\"\\nWARN Problem resolving server: \"+n);\n return detects;\n }\n\n } catch (IOException e) {\n Logger.addln(\"\\nWARNProblem resolving server \"+server+\" :\"+e.getMessage());\n return detects;\n }\n }\n\n String req = \"POST /api/edge_app2?r=\" + rotation\n + \"&isYUV=\" + isYUV + \"&w=\"+ image_w + \"&h=\"+image_h\n + \" HTTP/1.1\\r\\nContent-Length: \" + image_bytes.position() + \"\\r\\n\\r\\n\";\n StringBuilder response = new StringBuilder();\n if (useUDP) {\n try {\n Logger.tick(\"url2\");\n // open connection (if not already open) and send request+image\n if (udpsockfd <0) {\n // put the server IP address into a byte buffer to make it easy to pass to jni C\n IPbuf.position(0);\n IPbuf.put(IP.getAddress());\n udpsockfd=socket(IPbuf,port);\n Debug.println(\"sock_fd=\"+udpsockfd);\n }\n Debug.println(\"data len=(\"+req.length()+\",\"+image_bytes.position()+\")\");\n Logger.tick(\"url2a\");\n // copy request to byte buffer so easy to pass to jni C\n req_buf.clear();\n req_buf.put(req.getBytes(),0,req.length());\n String str = sendmmsg(udpsockfd, req_buf, req.length(), image_bytes, image_bytes.position(), MSS);\n Debug.println(\"s: \"+str);\n //Logger.add(\"s: \"+str);\n detects.addTiming(\"url2a\",Logger.tockLong(\"url2a\"));\n detects.addTiming(\"url2\",Logger.tockLong(\"url2\"));\n int count=1+(req.length()+image_bytes.position())/(MSS-2);\n detects.addTiming(\"pkt count\", count*1000);\n\n // read the response ...\n Logger.tick(\"url3\");\n // need to receive on same socket as used for sending or firewall blocks reception\n int resplen = recv(udpsockfd, recvbuf, MSS*LISTSIZE, MSS);\n if (resplen<0) {\n Logger.addln(\"\\nWARN UDP recv error: errno=\"+resplen);\n } else if (resplen==0) {\n Logger.addln(\"\\nWARN UDP timeout\");\n } else {\n response.append(new String(recvbuf.array(), recvbuf.arrayOffset(), resplen));\n }\n if (response.length()<=10) {\n Debug.println(\" received \" + response.length());\n }\n detects.addTiming(\"url3\",Logger.tockLong(\"url3\"));\n Logger.addln(detects.client_timings.toString());\n //String pieces[] = response.split(\"\\n\");\n //response = pieces[pieces.length-1]; // ignore all the headers (shouldn't be any !)\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem with UDP on \"+IP+\":\"+port+\" (\"+e.getMessage()+\")\");\n }\n } else { // use TCP\n try {\n // open connection and send request+image\n Logger.tick(\"url2\");\n if (tcpsock == null) {\n tcpsock = new Socket(IP, port);\n out = new BufferedOutputStream(tcpsock.getOutputStream());\n in = new BufferedReader(new InputStreamReader(tcpsock.getInputStream()));\n }\n try {\n out.write(req.getBytes());\n out.write(image_bytes.array(),image_bytes.arrayOffset(),image_bytes.position());\n out.flush();\n } catch(IOException ee) {\n // legacy server closes TCP connection after each response, in which case\n // we reopen it here.\n Logger.addln(\"Retrying TCP: \"+ee.getMessage());\n tcpsock.close();\n tcpsock = new Socket(IP, port);\n out = new BufferedOutputStream(tcpsock.getOutputStream());\n in = new BufferedReader(new InputStreamReader(tcpsock.getInputStream()));\n out.write(req.getBytes());\n out.write(image_bytes.array());\n out.flush();\n }\n detects.addTiming(\"url2\",Logger.tockLong(\"url2\"));\n\n Logger.tick(\"url3\");\n // read the response ...\n // read the headers, we ignore them all !\n String line;\n while ((line = in.readLine()) != null) {\n if (line.length() == 0) break; // end of headers, stop\n }\n // now read to end of response\n response.append(in.readLine());\n detects.addTiming(\"url3\",Logger.tockLong(\"url3\"));\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem connecting TCP to \"+IP+\":\"+port+\" (\"+e.getMessage()+\")\");\n try {\n tcpsock.close();\n } catch(Exception ee) {};\n tcpsock = null; // reset connection\n }\n }\n if (response.length()==0 || response.toString().equals(\"null\")) {\n Logger.add(\" empty response\");\n Logger.add(\": \"+Logger.tock(\"d\"));\n return detects; // server has dropped connection\n }\n // now parse the response as json ...\n try {\n // testing\n //response = \"{\"server_timings\":{\"size\":91.2,\"r\":0.4,\"jpg\":8.4,\"rot\":34.1,\"yolo\":48.3,\"tot\":0},\"results\":[{\"title\":\"diningtable\",\"confidence\":0.737176,\"x\":343,\"y\":415,\"w\":135,\"h\":296},{\"title\":\"chair\",\"confidence\":0.641756,\"x\":338,\"y\":265,\"w\":75,\"h\":57},{\"title\":\"chair\",\"confidence\":0.565877,\"x\":442,\"y\":420,\"w\":84,\"h\":421}]}\n // [{\"title\":\"diningtable\",\"confidence\":0.737176,\"x\":343,\"y\":415,\"w\":135,\"h\":296},{\"title\":\"chair\",\"confidence\":0.641756,\"x\":338,\"y\":265,\"w\":75,\"h\":57},{\"title\":\"chair\",\"confidence\":0.565877,\"x\":442,\"y\":420,\"w\":84,\"h\":421}]\n // cam: 39 {\"yuvtoJPG\":8,\"url2\":15,\"url3\":128,\"d\":152}\"\n JSONObject json_resp = new JSONObject(response.toString());\n JSONArray json = json_resp.getJSONArray(\"results\");\n int i; JSONObject obj;\n for (i = 0; i < json.length(); i++) {\n obj = json.getJSONObject(i);\n String title = obj.getString(\"title\");\n Float confidence = (float) obj.getDouble(\"confidence\");\n Float x = (float) obj.getInt(\"x\");\n Float y = (float) obj.getInt(\"y\");\n Float w = (float) obj.getInt(\"w\");\n Float h = (float) obj.getInt(\"h\");\n RectF location = new RectF(\n Math.max(0, x - w / 2), // left\n Math.max(0, y - h / 2), // top\n Math.min(dst_w - 1, x + w / 2), //right\n Math.min(dst_h - 1, y + h / 2)); // bottom\n viewToFrameTransform.mapRect(location); // map boxes back to original image co\n Recognition result = new Recognition(title, confidence, location, new Size(image_w, image_h));\n detects.results.add(result);\n }\n detects.server_timings = json_resp.getJSONObject(\"server_timings\");\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem reading JSON: \"+response+\" (\"+e.getMessage()+\")\");\n }\n detects.addTiming(\"d\",Logger.tockLong(\"d\"));\n return detects;\n }", "public List<Result> recognize(IplImage image);", "private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }", "@Override\n public void onLeftDetect(FaceDetectionResult faceResult) {\n leftResult = null;\n if (faceResult != null) {\n leftResult = faceResult;\n\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n } else {\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n }\n calcMatch();\n }", "@Override\n public void initialize() {\n drivetrain.resetEncoders();\n }", "public void initialize() {\r\n }", "private void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"Webcam 1\");\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }", "@Override\r\n public boolean doInitTrackers() {\n boolean result = true;\r\n\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n Tracker tracker;\r\n\r\n // Trying to initialize the image tracker\r\n tracker = tManager.initTracker(ObjectTracker.getClassType());\r\n if (tracker == null) {\r\n Log.e(LOGTAG, \"Tracker not initialized. Tracker already initialized or the camera is already started\");\r\n result = false;\r\n } else {\r\n Log.i(LOGTAG, \"Tracker successfully initialized\");\r\n }\r\n return result;\r\n }", "private void initialize() {\n }", "protected void initialize() {\n \ttarget = (int) SmartDashboard.getNumber(\"target\", 120);\n \ttarget = (int) (target * Constants.TICKS_TO_INCHES);\n\t\tRobot.drive.stop();\n\t\tmaxCount = (int) SmartDashboard.getNumber(\"max count\", 0);\n\t\ttolerance = (int) SmartDashboard.getNumber(\"tolerance\", 0);\n\t\tRobot.drive.left.motor1.setSelectedSensorPosition(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\t\tRobot.drive.right.motor1.setSelectedSensorPosition(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "@Override\n public void onRightDetect(FaceDetectionResult faceResult) {\n if (faceResult != null) {\n rightResult = faceResult;\n } else {\n rightResult = null;\n }\n calcMatch();\n }", "@Override public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {\n VisionAPIManager.this.face = face;\n computeFace(face);\n }", "protected void initialize() {\n \t_finalTickTargetLeft = _ticksToTravel + Robot.driveTrain.getEncoderLeft();\n \t_finalTickTargetRight = _ticksToTravel + Robot.driveTrain.getEncoderRight();\n \t\n }", "@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }", "protected void initialize() {\n \tRobot.driveTrain.arcade(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }", "private void startRecognition() {\n mStatusTextView.setVisibility(View.VISIBLE);\n mStatusTextView.setText(R.string.status_scan_credentials);\n mStatusProgressBar.setVisibility(View.GONE);\n mRescanButton.setVisibility(View.GONE);\n\n mScannerView.setAnimated(true);\n hideMatchView();\n\n mTimeClockBar.setVisibility(View.VISIBLE);\n mTimeClockBar.setProgress(0);\n\n // Start a timeout for the recognition\n startRecognitionTimeout();\n\n mAllPasswords.clear();\n mSSIDMatchCounts.clear();\n mProcessor.setActive(true);\n }", "@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }", "public void inicializarCaptura() {\n try {\n fingerprintSDK = new MatchingContext(); \n //Inicializa la captura de huella digital.\n GrFingerJava.initializeCapture(this); \n objpantprincipal.writeLog(\"**SDK de huella dactilar inicializado con éxito**\");\n } catch (Exception e) {\n //Si ocurre un error se cierra la aplicación.\n //If any error ocurred while initializing GrFinger,\n //writes the error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(e.getMessage());\n //System.exit(1);\n }\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "protected void initialize() {\r\n Robot.driveTrain.resetRangefinder();\r\n }", "@Override\n public void initialize() {\n //m_camera.setDriverMode(true);\n //m_camera.setLED(LEDMode.kOn);\n RobotContainer.m_Drive.auto = true;\n RobotContainer.m_Drive.setLightMode(3);\n }", "public BeaconAnalysis() {\n this.left = BeaconColor.UNKNOWN;\n this.right = BeaconColor.UNKNOWN;\n this.confidence = 0.0f;\n this.location = new Rectangle();\n this.leftButton = null;\n this.rightButton = null;\n }", "public void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "protected void initialize() {\n \ttime.start();\n \tRobot.camera.setExposureManual(20);\n \tzach();\n\t\tSystem.out.println(\"josh\");\n\t\t\n }", "public void initialize() {\n // TODO\n }", "private void resultImgInit() {\n resultImgAndLoadingLayout.setX(cornerPositions.getLeftTop().x);\n resultImgAndLoadingLayout.setY(cornerPositions.getLeftTop().y);\n int wight = cornerPositions.getRightBottom().x - cornerPositions.getLeftTop().x + cornerImgSize;\n int height = cornerPositions.getRightBottom().y - cornerPositions.getLeftTop().y + cornerImgSize;\n resultImgAndLoadingLayout.setLayoutParams(new LayoutParams(wight, height));\n }", "public void initialize() {\n }", "public void initialize() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" starting processor thread\");\n\t\tprocessorThread.start();\n\t\t\n\t\t//logger.debug(processorName+\" initialized\");\n\t}", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "public DefaultResults() {\n this.results = new ArrayList<R>();\n this.totalCc = new ArrayList<Long>();\n this.maximalCc = new ArrayList<Long>();\n this.totalBytes = new ArrayList<Long>();\n this.maximalBytes = new ArrayList<Long>();\n this.maximalMemory = new ArrayList<Long>();\n }", "@Override\n public boolean doInitTrackers() {\n boolean result = true;\n\n TrackerManager tManager = TrackerManager.getInstance();\n Tracker tracker;\n\n // Trying to initialize the image tracker\n tracker = tManager.initTracker(ObjectTracker.getClassType());\n if (tracker == null) {\n Log.e(TAG,\n \"Tracker not initialized. Tracker already initialized or the camera is already started\");\n result = false;\n } else {\n Log.i(TAG, \"Tracker successfully initialized\");\n }\n return result;\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "@Override\n public void initialize() {\n drivetrain.enable();\n }", "protected void initialize() {\n \tRobot.drive.resetEncoder();\n }", "protected void initialize() {\n \t\n }", "public Result() {\r\n super();\r\n System.out.println(\"Result:Constructor\");\r\n }", "public void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_QUAD_ELEMENT, LABEL_SINGLE_ELEMENT);\n }", "@Override\n protected void initialize() {\n gambezi = new Gambezi(\"10.17.47.18:5809\");\n dist = gambezi.get_node(\"pi_vision/output/distance\");\n ang = gambezi.get_node(\"pi_vision/output/angle to target\");\n distance = dist.get_double();\n angle = ang.get_double();\n double[][][] profile = HBRSubsystem.generateSkidSteerPseudoProfile(distance, angle);\n drive.setMode(Drivetrain.Follower.DISTANCE, HBRSubsystem.Mode.FOLLOWER);\n drive.setPIDMode(Drivetrain.Follower.DISTANCE, HBRSubsystem.PIDMode.POSITION);\n drive.setILimit(Drivetrain.Follower.DISTANCE, 0);\n drive.setFeedforward(Drivetrain.Follower.DISTANCE, 0, 0, 0);\n drive.setFeedback(Drivetrain.Follower.DISTANCE, 0, 0, 0);\n drive.resetIntegrator(Drivetrain.Follower.DISTANCE);\n\n // angle PID\n drive.setMode(Drivetrain.Follower.ANGLE, HBRSubsystem.Mode.FOLLOWER);\n drive.setPIDMode(Drivetrain.Follower.ANGLE, HBRSubsystem.PIDMode.POSITION);\n drive.setILimit(Drivetrain.Follower.ANGLE, 0);\n drive.setFeedforward(Drivetrain.Follower.ANGLE, 0, 0, 0);\n drive.setFeedback(Drivetrain.Follower.ANGLE, 0, 0, 0);\n drive.resetIntegrator(Drivetrain.Follower.ANGLE);\n\n drive.setProfile(Drivetrain.Follower.DISTANCE,profile[0]);\n drive.setProfile(Drivetrain.Follower.ANGLE,profile[1]);\n\n drive.resume(Drivetrain.Follower.DISTANCE);\n drive.resume(Drivetrain.Follower.ANGLE);\n drive.setEnabled(true);\n }", "void initVuforia() {\n\n //Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public static void main(String[] args){\n String absolutePath = null;\n try {\n absolutePath = new File(\"./src/main/resources/opencv_contrib/opencv_java420.dll\").getCanonicalPath();\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n System.load(absolutePath);\n\n FaceRecognitionTests test = new FaceRecognitionTests();\n\n //test.treatAllPhotos();\n //test.train();\n //test.save();\n\n test.load();\n\n System.out.println(\"percentage correct : \" + test.testAll() * 100 + \"%\");\n\n /*\n Mat imageTest = Imgcodecs.imread(\"photo\\\\testing\\\\20\\\\20_P04A+000E+00.pgm\", Imgcodecs.IMREAD_GRAYSCALE);\n RecognitionResult testResult = test.recognize(imageTest);\n\n System.out.println(\"suposed result : 20, actual result : \" + testResult.label[0] + \" with confidence : \" + testResult.confidence[0]);\n */\n }", "@Override\n\t\t\t\t\t\t\tpublic void onResult(InitiateMatchResult result) {\n\t\t\t\t\t\t\t\tif (!checkStatusCode(match, result.getStatus()\n\t\t\t\t\t\t\t\t\t\t.getStatusCode())) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGameActivity.gameMachine.reset();\n\t\t\t\t\t\t\t\tmatch = result.getMatch();\n\t\t\t\t\t\t\t\tstartGame(match);\n\t\t\t\t\t\t\t}", "@Override\n public FacialLandmarkResult run(Mat frame) {\n return runByDetections(frame, new ResultList<>(Collections.singletonList(\n new ObjectDetectionResult(0, \"face\", 1.0f, 0, 0, frame.size().width(), frame.size().height())\n ))).get(0);\n }", "private static void init() {\n\t\tguess = 0;\n\t\ttries = 10;\n\t\tlen = Random.getRand(4, 8);\n\t\tcorrectGuesses = 0;\n\t\twordGen = new RandomWordGenerator(len);\n\t\twordGen.generate();\n\t\tword = wordGen.getWord();\n\t\tguessesResult = new boolean[word.length()];\n\n\t}", "@SuppressLint(\"UnsafeExperimentalUsageError\")\n @Override\n public void analyze(@NonNull ImageProxy image_proxy) {\n ArrayList<Recognition> detections = _detector.DetectImage(image_proxy);\n\n // draw the bounding boxes\n _obj_tracker.ObjectTrackerDraw(detections);\n\n image_proxy.close();\n\n }", "protected void initialize() {\n\t\t\n\t\tif (trajectoryToFollow.highGear) {\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}else {\n\t\t\t//Robot.pneumatics.drivetrainShiftDown();\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}\n\n\t\tsetUpTalon(leftTalon);\n\t\tsetUpTalon(rightTalon);\n\n\t\tsetValue = SetValueMotionProfile.Disable;\n\n\t\trightTalon.set(ControlMode.MotionProfileArc, setValue.value);\n\t\tleftTalon.follow(rightTalon, FollowerType.AuxOutput1);\n\n\t\tloadLeftBuffer = new Notifier(\n\t\t\t\tnew BufferLoader(rightTalon, trajectoryToFollow.centerProfile, trajectoryToFollow.flipped,\n\t\t\t\t\t\tRobot.drivetrain.getDistance()));\n\n\t\tloadLeftBuffer.startPeriodic(.005);\n\t}", "@Override\n public void initialize() {\n conveyor.setBallCount(0);\n conveyor.startTime(); \n }" ]
[ "0.6145711", "0.60985464", "0.5928454", "0.58563787", "0.5792697", "0.5775008", "0.5755182", "0.5725333", "0.5721165", "0.5695255", "0.56676584", "0.5647244", "0.56425995", "0.5617441", "0.5572036", "0.55706453", "0.5561605", "0.55536544", "0.5543834", "0.55361646", "0.5514574", "0.549", "0.5486685", "0.54844624", "0.5458582", "0.5456733", "0.544932", "0.54443353", "0.5434824", "0.5434708", "0.5428084", "0.54260635", "0.5415302", "0.541021", "0.5408703", "0.5402846", "0.5398232", "0.53972435", "0.5391852", "0.5385642", "0.53683186", "0.53555936", "0.5353649", "0.53287876", "0.53263223", "0.53207374", "0.5317267", "0.53023887", "0.52907664", "0.528869", "0.5283048", "0.52827156", "0.5281705", "0.5280547", "0.5277413", "0.5276677", "0.52709943", "0.5268661", "0.52597874", "0.5255429", "0.52524906", "0.5247214", "0.5247098", "0.524491", "0.5244802", "0.5244386", "0.5243951", "0.5243025", "0.5241793", "0.5238531", "0.5238011", "0.52336204", "0.5230747", "0.52292895", "0.5226702", "0.5223481", "0.521918", "0.52187574", "0.52183694", "0.52126217", "0.51948816", "0.5193268", "0.5179874", "0.51796967", "0.5172742", "0.5169162", "0.51660985", "0.5163586", "0.51609105", "0.516075", "0.51573145", "0.5153683", "0.51522684", "0.51500064", "0.5149604", "0.5148192", "0.51480794", "0.5142027", "0.5139329", "0.51386404" ]
0.5433643
30
Initialize with detection result.
PersonGroupListAdapter() { personGroupIdList = new ArrayList<>(); Set<String> personGroupIds = StorageHelper.getAllPersonGroupIds(MainActivity.this); for (String personGroupId: personGroupIds) { personGroupIdList.add(personGroupId); if (mPersonGroupId != null && personGroupId.equals(mPersonGroupId)) { personGroupIdList.set( personGroupIdList.size() - 1, mPersonGroupListAdapter.personGroupIdList.get(0)); mPersonGroupListAdapter.personGroupIdList.set(0, personGroupId); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}", "protected void initialize() {\n\t\tRobot.sender_.setSendData(vision);\n\n\t\tinitHeading = Robot.drivetrain.getGyroHeading();\n\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartDepth)) {\n\t\t\tinitDistance = Robot.depth_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartCubeSearch)) {\n\t\t\tinitDistance = Robot.cube_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartRFT)) {\n\t\t\tinitDistance = Robot.rft_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\t\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.PlatformBlueSearch) || vision.equalsIgnoreCase(SocketVisionSender.PlatformRedSearch)) {\n\t\t\tinitDistance = Robot.platform_.get_distance();\n\t\t}\n\t}", "protected void initialize() {\n \tsetTimeout(0.0);\n \t\n \tRobot.vision_.setTargetSnapshot(null);\n \t\n \tpreviousTargetTransform = Robot.vision_.getLatestGearLiftTargetTransform();\n \tRobot.vision_.startGearLiftTracker(trackerFPS_);\n }", "private void setUiAfterDetection(Face[] result, boolean succeed, int checkImage) {\n\n // Detection is done, hide the progress dialog.\n mProgressDialog.dismiss();\n\n // Enable all the buttons.\n setAllButtonsEnabledStatus(true);\n\n // Disable button \"detect\" as the image has already been detected.\n setShareButtonsEnabledStatus(false);\n setShowButtonsEnabledStatus(false);\n if (checkImage == 0) {\n if (succeed) {\n check = 1;\n // The information about the detection result.\n if (result.length != 0) {\n face1 = result;\n foundFace1 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap1, result, true));\n genderFace1 = face1[0].faceAttributes.gender.startsWith(\"male\") ? 0 : 1;\n }\n }\n } else {\n if (succeed) {\n // The information about the detection result.\n check = 0;\n if (result.length != 0) {\n face2 = result;\n foundFace2 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap2, result, true));\n\n }\n }\n checkInputImage(face1, face2);\n count = 0;\n }\n }", "protected void initialize() {\n \tm_cameraThread = new CameraThread();\n \tm_cameraThread.start();\n \tm_onTarget = false;\n \tm_moving = false;\n \tm_desiredYaw = Gyro.getYaw();\n \t\n \t\n \tcount = 0;\n }", "public void initialize()\r\n {\r\n isImageLoaded=false; \r\n isInverted=false;\r\n isBlured=false;\r\n isChanged=false;\r\n isCircularCrop= false;\r\n isRectangularCrop = false;\r\n isReadyToSave = false;\r\n didUndo = false;\r\n brightnessLevel=0.0f;\r\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "protected void initialize() {\n \ttarget = Robot.trackingCamera.getTarget();\n targetX = target[0];\n targetY = target[1];\n \tstopTime = System.currentTimeMillis() + timeOut;\n }", "@Override\n protected void initialize(){\n drivetrain.clearOldMotionProfiles();\n drivetrain.zeroEncoders();\n try{\n drivetrain.loadMotionProfile(name, isInverted);\n } catch (IOException e) {\n done = true;\n }\n drivetrain.startMotionProfile(name);\n }", "private void initResultStorage() {\n\t\tstorage = new ResultStorage();\n\t\t\n\t\tfinal String geom = GeometryNames.RECT;\n\t\tfinal String mix = \"Default\";\n\t\tfinal int steps = 20;\n\t\tfinal double[] segr = new double[] { 0.1, 0.2, 0.3, 0.7, 0.6, 0.8, 0.8,\n\t\t\t\t0.4, 0.9, 0.4, 0.8, 0.2, 0.6, 0.3, 0.7, 0.5, 0.9, 0.4, 0.8, 0.1 };\n\n\t\tfor (int i = startIndex; i < endIndex; i++) {\n\t\t\tdistribution[i] = 255;\n\t\t}\n\t\t\n\t\tstorage.setDistribution(distribution);\n\t\tstorage.setGeometry(geom);\n\t\tstorage.setMixer(mix);\n\t\tstorage.setNrSteps(steps);\n\t\tstorage.setMixingProtocol(protocol);\n\t\tstorage.setSegregation(segr);\n\t}", "@Override\n public void initialize() {\n\n drivetrain = Drivetrain.getInstance();\n \n \n\n }", "@Override\n public void init_loop() {\n telemetry.addData(\"Success: \", success);\n telemetry.addData(\"Calibration Status\", stevens_IMU.getCalibrationStatus());\n telemetry.addData(\"Gyro is Calibrated\", stevens_IMU.isGyroCalibrated());\n telemetry.addData(\"Accelerometer is Calibrated\", stevens_IMU.isAccelerometerCalibrated());\n telemetry.addData(\"Magnetometer is Calibrated\", stevens_IMU.isMagnetometerCalibrated());\n telemetry.addData(\"System is Calibrated\", stevens_IMU.isSystemCalibrated());\n }", "public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }", "static synchronized public void staticInitialize()\n {\n if (!isInitialized)\n {\n if (!startedInitializing)\n {\n startedInitializing = true;\n\n cm = new ConfigurationManager(SphinxSignalInfoProvider.class.getResource(\"hellongram.config.xml\"));\n\n // allocate the recognizer\n System.out.println(\"Loading spinx recognizer...\");\n recognizer = (Recognizer) cm.lookup(\"recognizer\");\n recognizer.allocate();\n\n //speechClassifier = (SpeechClassifier) cm.lookup(\"speechClassifier\");\n //speechClassifier.initialize();\n\n inMindDataProcessor = (InMindDataProcessor) cm.lookup(\"inMindDataProcessor\");\n\n inMindByteDataSource = (InMindByteDataSource) cm.lookup(\"inMindByteDataSource\");\n\n\n isInitialized = true;\n System.out.println(\"Spinx recognizer loaded.\");\n\n recognizerThread = new Thread(() -> {\n try\n {\n while (true)\n {\n recognizer.recognize();\n }\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n });\n recognizerThread.start();\n }\n }\n }", "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "protected void initialize() {\n drivebase.engageOmni();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_detection);\n\n mProgressDialog = new ProgressDialog(this);\n mProgressDialog.setTitle(getString(R.string.progress_dialog_title));\n\n // Disable button \"detect\" as the image to detect is not selected.\n setDetectButtonEnabledStatus(false);\n\n }", "private static native void detect_0(long nativeObj, long inputImage_nativeObj, long Bbox_mat_nativeObj, long confidence_mat_nativeObj);", "public Vision() {\n\n visionCam = CameraServer.getInstance().startAutomaticCapture(\"HatchCam\", 0);\n visionCam.setVideoMode(PixelFormat.kMJPEG, 320, 240, 115200);\n \n int retry = 0;\n while(cam == null && retry < 10) {\n try {\n System.out.println(\"Connecting to jevois serial port ...\");\n cam = new SerialPort(115200, SerialPort.Port.kUSB1);\n System.out.println(\"Success!!!\");\n } catch (Exception e) {\n System.out.println(\"We all shook out\");\n e.printStackTrace();\n sleep(500);\n System.out.println(\"Retry\" + Integer.toString(retry));\n retry++;\n }\n }\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "public void initialize() {\n\t\tdrivetrain.resetGyro();\n\t\tdrivetrain.setAngleTarget(getTargetAngle());\n\t\tLog.debug(this.getClass().toString()+ \".initialize called drivetrain.setAngleTarget(\" + getTargetAngle() + \")\");\n\t\t\n\n\t}", "public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "@Override public void onMissing(FaceDetector.Detections<Face> detectionResults) {\n VisionAPIManager.this.face = null;\n VisionAPIManager.this.rightEye = VisionAPIManager.this.leftEye = null;\n onComputeFaceDone.onNext(lastFrame);\n }", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n if (succeed) {\n // Set the information about the detection result.\n Log.e(LOG_TAG1, \"Identification is done\");\n\n if (result != null) {\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Identified: \"\n + (identifyResult.candidates.size() > 0\n ? StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" with confidence \"+identifyResult.candidates.get(0).confidence\n : \"Unknown Person\")\n + \". \";\n\n if (identifyResult.candidates.size() > 0) {\n face_result = face_result + \" \" + StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" (\" + identifyResult.candidates.get(0).confidence + \") \";\n }\n LogViewer.addLog(\"Face API: \" + face_result);\n\n }\n\n //mIdentifyResults.get(position).candidates.get(0).confidence\n Log.e(LOG_TAG1,logString);\n doneSignal.countDown();\n } else {\n Log.e(LOG_TAG1,\"null result in setUIAfterIdentification\");\n doneSignal.countDown();\n }\n }\n Log.e(LOG_TAG1,\"SUCCESS! DONE!!! face recognition\");\n doneSignal.countDown();\n }", "public CommandLineFSRecognizer() {\n init();\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "public void init(final Context context) {\n AssetManager assetManager = context.getAssets();\n\n// //if(tracker==null)\n// tracker = new MultiBoxTracker(this);\n\n cropSize = TF_OD_API_INPUT_SIZE;\n if (MODE == DetectorMode.YOLO) {\n detector =\n TensorFlowYoloDetector.create(\n assetManager,\n YOLO_MODEL_FILE,\n YOLO_INPUT_SIZE,\n YOLO_INPUT_NAME,\n YOLO_OUTPUT_NAMES,\n YOLO_BLOCK_SIZE);\n cropSize = YOLO_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_YOLO;\n } else if (MODE == DetectorMode.MULTIBOX) {\n detector =\n TensorFlowMultiBoxDetector.create(\n assetManager,\n MB_MODEL_FILE,\n MB_LOCATION_FILE,\n MB_IMAGE_MEAN,\n MB_IMAGE_STD,\n MB_INPUT_NAME,\n MB_OUTPUT_LOCATIONS_NAME,\n MB_OUTPUT_SCORES_NAME);\n cropSize = MB_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_MULTIBOX;\n } else {\n try {\n detector = TensorFlowObjectDetectionAPIModel.create(\n assetManager, TF_OD_API_MODEL_FILE, TF_OD_API_LABELS_FILE, TF_OD_API_INPUT_SIZE);\n cropSize = TF_OD_API_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n } catch (final IOException e) {\n e.printStackTrace();\n }\n }\n\n// croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n }", "protected void initialize() {\n\t\tPreferences prefs = Preferences.getInstance();\n\t\tangleKp = prefs.getDouble(\"GetPeg Kp\", 0.01);\n\t\tangleKi = prefs.getDouble(\"GetPeg Ki\", 0.001);\n\t\tangleKd = prefs.getDouble(\"GetPeg Kd\", 0.0);\n\t\tdriveOutput = prefs.getDouble(\"GetPeg Speed\", 0.5);\n\t\t\n\t\tRobot.drivetrain.reset();\n\t\tRobot.drivetrain.stop();\n\t\tpidAngle.reset();\n\t\tpidAngle.enable();\n\n\t\tRobot.gearIntake.lightOn();\n\n\t\tdouble filterSlopeTime = prefs.getDouble(\"FilterSlopeTime\", 0.2);\n\n\t\tfilter = new LinearAccelerationFilter(filterSlopeTime);\n\t\t\n\t\tSystem.out.println(\"\\n GetPegWithVision Initialized\");\n\t}", "protected void initialize(){\n\t\tRobot.driveTrain.changeTalonControlMode(TalonControlMode.Follower);\n\t\tRobot.driveTrain.setTalonsReversedState(true);\n\t\tRobotMap.visionSensor.startProcessing(PIDVisionSourceType.DistanceFromTarget);\n\t\thasStarted = RobotMap.VisionDistanceLeftPIDController.init(m_setPoint, StaticMembers.ABSOLUTE_TOLERANCE_DISTANCE);\n\t\thasStarted = RobotMap.VisionDistanceRightPIDController.init(m_setPoint, StaticMembers.ABSOLUTE_TOLERANCE_DISTANCE) && hasStarted;\n\t}", "protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }", "public void handleVerificationSuccessResult(ZoomVerificationResult successResult) {\n if (successResult.getFaceMetrics() != null) {\n // this is the raw biometric data which can be uploaded, or may be\n // base64 encoded in order to handle easier at the cost of processing and network usage\n bytes = successResult.getFaceMetrics().getZoomFacemap();\n if (!successResult.getFaceMetrics().getAuditTrail().isEmpty()) {\n face2 = successResult.getFaceMetrics().getAuditTrail().get(0).copy(Bitmap.Config.ARGB_8888, true);\n }\n\n //if (RecogEngine.g_recogResult.faceBitmap != null) {\n if (imageFile != null) {\n //Bitmap nBmp = RecogEngine.g_recogResult.faceBitmap.copy(Bitmap.Config.ARGB_8888, true);\n Bitmap nBmp = decodeFileFromPath(imageFile.getAbsolutePath()).copy(Bitmap.Config.ARGB_8888, true);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectLeftFace(buff.array(), w, h);\n }\n\n if (face2 != null) {\n Bitmap nBmp = face2;\n ivUserProfile2.setImageBitmap(nBmp);\n ivUserProfile2.setVisibility(View.VISIBLE);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n\n sessionId = successResult.getSessionId();\n liveness(successResult);\n }\n }", "FaceListAdapter(Face[] detectionResult) {\n faces = new ArrayList<>();\n faceThumbnails = new ArrayList<>();\n mIdentifyResults = new ArrayList<>();\n\n if (detectionResult != null) {\n faces = Arrays.asList(detectionResult);\n for (Face face: faces) {\n try {\n // Crop face thumbnail with five main landmarks drawn from original image.\n faceThumbnails.add(ImageHelper.generateFaceThumbnail(\n mBitmap, face.faceRectangle));\n } catch (IOException e) {\n // Show the exception when generating face thumbnail fails.\n setInfo(e.getMessage());\n }\n }\n }\n }", "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n //initialize either phone or webcam depending on field set during object initialization\n if(device == Device.Phone){\n parameters.cameraDirection = CameraDirection.BACK;\n }else{\n parameters.cameraName = hwMap.get(WebcamName.class, \"Webcam\");\n\n }\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "private void setDetector() {\n\n try {\n AssetManager assetManager = getAssets();\n String[] fileList = assetManager.list(modelPath);\n String modelType = dlaasD.ReturnModelType(assetManager, modelPath);\n\n if (fileList.length != 0) {\n\n if (modelType.equals(\"mobilenet_1\")) {\n detector = new MobileNet(rs, assetManager, modelPath);\n } else {\n\n detector = new MobileNetSSD(rs, assetManager, modelPath);\n }\n } else {\n if (modelType.equals(\"mobilenet_1\")) {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNet(rs, assetManager, modelDir);\n } else {\n String modelDir = Environment.getExternalStorageDirectory().getPath() + \"/\" + modelPath;\n detector = new MobileNetSSD(rs, assetManager, modelDir);\n }\n\n }\n } catch (IOException e) {\n Log.d(\"onFindModule: \", e.toString());\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "protected void initialize() {\n\t\trequires(simpleVision);\r\n\t}", "public void initialize() {\n // empty for now\n }", "public static void initialize()\n {\n // Initiate election\n Runnable sender = new BullyAlgorithm(\"Sender\",\"election\");\n new Thread(sender).start();\n }", "public void initialize()\n {\n }", "public void InitLoadingInRecognition() {\n Point screen = MainView.GetScreenSize();\n // image setting\n int x = (screen.x - LOADING_IMAGE_SIZE.x) >> 1;\n int y = 100;\n this.m_LoadingImage.InitCharacterEx(\n \"recognizerimages\",\n x, y,\n LOADING_IMAGE_SIZE.x,\n LOADING_IMAGE_SIZE.y,\n 255, 1.0f, 0);\n // animation setting\n this.m_LoadingImage.InitAnimation(\n ANIMATION_LOADING_COUNT_MAX,\n ANIMATION_LOADING_FRAME, 0);\n }", "private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }", "private void onRecognizeAsyncTaskComplete(OcrResult result){\n \t\n \tif(result != null){\n \tLog.v(TAG, \"Recognize complete (\" + result + \"): \" + result.getText());\n\t \tLog.v(TAG,\"recognize: (6) Bitmap is \" + result.getBitmap());\n try {\n \tif(currentRequest == MSG_RECOGNIZE_TXT){\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT_TXT, currentRequest, mState.ordinal(), result.getText()));\t\n \t} else {\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT, currentRequest, mState.ordinal(), result));\n \t}\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n }\n \n \t} else {\n \t\t// We did not receive an OCR result\n \tLog.i(TAG, \"Recognize complete: No result\");\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_recognition));\n \t}\n\n \t// Go back to IDLE (or if the baseApi no longer exists go to UNINITIALIZED\n \tmState = (baseApi != null) ? State.IDLE : State.UNINITIALIZED;\n\t\t\n \t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n }", "public void initialize() {\n //TODO: Initialization steps\n\n initialized = true;\n }", "private void onInitAsyncTaskComplete(boolean success){\n Log.d(TAG, \"onInitAsyncTaskComplete\");\n \n // get rid of the AsyncTask\n initTask = null;\n \n if(success && baseApi != null){\n baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_BLOCK);\n baseApi.setVariable(TessBaseAPI.VAR_SAVE_BLOB_CHOICES, TessBaseAPI.VAR_TRUE);\n baseApi.setVariable(TessBaseAPI.VAR_USE_CJK_FP_MODEL, TessBaseAPI.VAR_TRUE);\n baseApi.setVariable(TessBaseAPI.VAR_EDGES_MAX_CHILD_OUTLINE, String.valueOf(50));\n\n \t\t// If the base API was successfully initialized, put us in the IDLE state (to allow recognition).\n \tsendMessage(currentClient, MSG_REPLY, currentRequest, getString(R.string.success_initialization));\n \t\tmState = State.IDLE;\n\n \t\tif(currentRequest == MSG_RECOGNIZE || currentRequest == MSG_RECOGNIZE_TXT) {\n \t\t\t// Inform the user that we will continue with processing\n \t\t\tsendMessage(currentClient, MSG_PROGRESS, currentRequest, getString(R.string.busy_recognizing));\n \t\t// We still have a recognition pending.\n \t \tLog.v(TAG,\"recognize: (3) Bitmap is \" + currentBitmap);\n \t recognize(currentClient, currentBitmap);\n \t\t} else {\n \t\t// We're done with the current client. Remove any references to the object.\n \t Log.v(TAG, \"onInitAsyncTaskComplete. don't recognize. currentRequest is \" + currentRequest);\n currentClient = null;\n \t\t}\n } else {\n \t\t// If the base API was NOT successfully initialized, release the resource.\n \t\t// NOTE: the releaserOCR() method will put us in the UNINITIALIZED state.\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_initialize));\n \t\treleaseOCR();\n\n \t\t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n \t}\n }", "protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n Log.i(TAG, \"called onCreate\");\n super.onCreate(savedInstanceState);\n\n requestPermissions();\n\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n\n setContentView(R.layout.camera_view);\n\n mOpenCvCameraView = (CameraView) findViewById(R.id.camera_view);\n\n mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);\n\n mOpenCvCameraView.setCvCameraViewListener(this);\n\n DetectProcessor.setContext(this);\n\n try {\n // create either a new ImageClassifierQuantizedMobileNet or an ImageClassifierFloatInception\n classifier = new ImageClassifierFloatInception(this);\n } catch (IOException e) {\n Log.e(TAG, \"Failed to initialize an image classifier.\", e);\n }\n\n // mkdir for debug\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"opencv\");\n System.out.println(\"file\" + file.getAbsolutePath());\n if (file.exists() || !file.mkdirs()) {\n Log.e(\"YCard\", \"Directory not created\");\n }\n }", "@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }", "private void createTrackingPipeline() throws ConfigurationException\n {\n fgDetector = new HSVFGDetector();\n // fgDetector = new DifferenceFGDetector();\n\n blobDetector = opencv_legacy.cvCreateBlobDetectorSimple();\n // blobTracker = opencv_legacy.cvCreateBlobTrackerCCMSPF();\n blobTracker = opencv_legacy.cvCreateBlobTrackerCC();\n trackerPostProcessor = opencv_legacy.cvCreateModuleBlobTrackPostProcKalman();\n trackerFrameCount = 0;\n blobs.Clear();\n badFramesForBlob.clear();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "@Override\n public Detections recognize(byte[] yuv, int image_w, int image_h, int rotation, Bitmap b) {\n System.out.println(image_h + \"......ye height hai\");\n System.out.println(image_w + \"......ye width hai\");\n Detections detects = new Detections();\n\n\n Logger.tick(\"d\");\n Logger.tick(\"yuvtoJPG\");\n int isYUV;\n image_bytes.clear();\n if (jpegQuality>0) {\n // we do rotation server-side, android client too slow (takes around 10ms in both java\n // and c on Huawei P9, while jpeg compression takes around 8ms).\n try {\n image_bytes.put(Transform.YUVtoJPEG(yuv, image_w, image_h, jpegQuality));\n isYUV = 0;\n } catch (Exception e) {\n // most likely encoded image is too big for image_bytes buffer\n Logger.addln(\"WARN: Problem encoding jpg: \"+e.getMessage());\n return detects; // bail\n }\n } else {\n // send image uncompressed\n image_bytes.put(yuv);\n isYUV=1;\n }\n detects.addTiming(\"yuvtoJPG\",Logger.tockLong(\"yuvtoJPG\"));\n\n int dst_w=image_w, dst_h=image_h;\n if ((rotation%180 == 90) || (rotation%180 == -90)) {\n dst_w = image_h; dst_h = image_w;\n }\n Matrix frameToViewTransform = Transform.getTransformationMatrix(\n image_w, image_h,\n dst_w, dst_h,\n rotation, false);\n // used to map received response rectangles back to handset view\n Matrix viewToFrameTransform = new Matrix();\n frameToViewTransform.invert(viewToFrameTransform);\n\n if (IP==null) {\n // resolve server name to IP address\n try {\n InetAddress names[] = InetAddress.getAllByName(server);\n StringBuilder n = new StringBuilder();\n for (InetAddress name : names) {\n n.append(name);\n if (name instanceof Inet4Address) {IP = name; break;}\n }\n Logger.addln(\"\\nResolved server to: \"+IP);\n if (IP == null) {\n Logger.addln(\"\\nWARN Problem resolving server: \"+n);\n return detects;\n }\n\n } catch (IOException e) {\n Logger.addln(\"\\nWARNProblem resolving server \"+server+\" :\"+e.getMessage());\n return detects;\n }\n }\n\n String req = \"POST /api/edge_app2?r=\" + rotation\n + \"&isYUV=\" + isYUV + \"&w=\"+ image_w + \"&h=\"+image_h\n + \" HTTP/1.1\\r\\nContent-Length: \" + image_bytes.position() + \"\\r\\n\\r\\n\";\n StringBuilder response = new StringBuilder();\n if (useUDP) {\n try {\n Logger.tick(\"url2\");\n // open connection (if not already open) and send request+image\n if (udpsockfd <0) {\n // put the server IP address into a byte buffer to make it easy to pass to jni C\n IPbuf.position(0);\n IPbuf.put(IP.getAddress());\n udpsockfd=socket(IPbuf,port);\n Debug.println(\"sock_fd=\"+udpsockfd);\n }\n Debug.println(\"data len=(\"+req.length()+\",\"+image_bytes.position()+\")\");\n Logger.tick(\"url2a\");\n // copy request to byte buffer so easy to pass to jni C\n req_buf.clear();\n req_buf.put(req.getBytes(),0,req.length());\n String str = sendmmsg(udpsockfd, req_buf, req.length(), image_bytes, image_bytes.position(), MSS);\n Debug.println(\"s: \"+str);\n //Logger.add(\"s: \"+str);\n detects.addTiming(\"url2a\",Logger.tockLong(\"url2a\"));\n detects.addTiming(\"url2\",Logger.tockLong(\"url2\"));\n int count=1+(req.length()+image_bytes.position())/(MSS-2);\n detects.addTiming(\"pkt count\", count*1000);\n\n // read the response ...\n Logger.tick(\"url3\");\n // need to receive on same socket as used for sending or firewall blocks reception\n int resplen = recv(udpsockfd, recvbuf, MSS*LISTSIZE, MSS);\n if (resplen<0) {\n Logger.addln(\"\\nWARN UDP recv error: errno=\"+resplen);\n } else if (resplen==0) {\n Logger.addln(\"\\nWARN UDP timeout\");\n } else {\n response.append(new String(recvbuf.array(), recvbuf.arrayOffset(), resplen));\n }\n if (response.length()<=10) {\n Debug.println(\" received \" + response.length());\n }\n detects.addTiming(\"url3\",Logger.tockLong(\"url3\"));\n Logger.addln(detects.client_timings.toString());\n //String pieces[] = response.split(\"\\n\");\n //response = pieces[pieces.length-1]; // ignore all the headers (shouldn't be any !)\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem with UDP on \"+IP+\":\"+port+\" (\"+e.getMessage()+\")\");\n }\n } else { // use TCP\n try {\n // open connection and send request+image\n Logger.tick(\"url2\");\n if (tcpsock == null) {\n tcpsock = new Socket(IP, port);\n out = new BufferedOutputStream(tcpsock.getOutputStream());\n in = new BufferedReader(new InputStreamReader(tcpsock.getInputStream()));\n }\n try {\n out.write(req.getBytes());\n out.write(image_bytes.array(),image_bytes.arrayOffset(),image_bytes.position());\n out.flush();\n } catch(IOException ee) {\n // legacy server closes TCP connection after each response, in which case\n // we reopen it here.\n Logger.addln(\"Retrying TCP: \"+ee.getMessage());\n tcpsock.close();\n tcpsock = new Socket(IP, port);\n out = new BufferedOutputStream(tcpsock.getOutputStream());\n in = new BufferedReader(new InputStreamReader(tcpsock.getInputStream()));\n out.write(req.getBytes());\n out.write(image_bytes.array());\n out.flush();\n }\n detects.addTiming(\"url2\",Logger.tockLong(\"url2\"));\n\n Logger.tick(\"url3\");\n // read the response ...\n // read the headers, we ignore them all !\n String line;\n while ((line = in.readLine()) != null) {\n if (line.length() == 0) break; // end of headers, stop\n }\n // now read to end of response\n response.append(in.readLine());\n detects.addTiming(\"url3\",Logger.tockLong(\"url3\"));\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem connecting TCP to \"+IP+\":\"+port+\" (\"+e.getMessage()+\")\");\n try {\n tcpsock.close();\n } catch(Exception ee) {};\n tcpsock = null; // reset connection\n }\n }\n if (response.length()==0 || response.toString().equals(\"null\")) {\n Logger.add(\" empty response\");\n Logger.add(\": \"+Logger.tock(\"d\"));\n return detects; // server has dropped connection\n }\n // now parse the response as json ...\n try {\n // testing\n //response = \"{\"server_timings\":{\"size\":91.2,\"r\":0.4,\"jpg\":8.4,\"rot\":34.1,\"yolo\":48.3,\"tot\":0},\"results\":[{\"title\":\"diningtable\",\"confidence\":0.737176,\"x\":343,\"y\":415,\"w\":135,\"h\":296},{\"title\":\"chair\",\"confidence\":0.641756,\"x\":338,\"y\":265,\"w\":75,\"h\":57},{\"title\":\"chair\",\"confidence\":0.565877,\"x\":442,\"y\":420,\"w\":84,\"h\":421}]}\n // [{\"title\":\"diningtable\",\"confidence\":0.737176,\"x\":343,\"y\":415,\"w\":135,\"h\":296},{\"title\":\"chair\",\"confidence\":0.641756,\"x\":338,\"y\":265,\"w\":75,\"h\":57},{\"title\":\"chair\",\"confidence\":0.565877,\"x\":442,\"y\":420,\"w\":84,\"h\":421}]\n // cam: 39 {\"yuvtoJPG\":8,\"url2\":15,\"url3\":128,\"d\":152}\"\n JSONObject json_resp = new JSONObject(response.toString());\n JSONArray json = json_resp.getJSONArray(\"results\");\n int i; JSONObject obj;\n for (i = 0; i < json.length(); i++) {\n obj = json.getJSONObject(i);\n String title = obj.getString(\"title\");\n Float confidence = (float) obj.getDouble(\"confidence\");\n Float x = (float) obj.getInt(\"x\");\n Float y = (float) obj.getInt(\"y\");\n Float w = (float) obj.getInt(\"w\");\n Float h = (float) obj.getInt(\"h\");\n RectF location = new RectF(\n Math.max(0, x - w / 2), // left\n Math.max(0, y - h / 2), // top\n Math.min(dst_w - 1, x + w / 2), //right\n Math.min(dst_h - 1, y + h / 2)); // bottom\n viewToFrameTransform.mapRect(location); // map boxes back to original image co\n Recognition result = new Recognition(title, confidence, location, new Size(image_w, image_h));\n detects.results.add(result);\n }\n detects.server_timings = json_resp.getJSONObject(\"server_timings\");\n } catch(Exception e) {\n Logger.addln(\"\\nWARN Problem reading JSON: \"+response+\" (\"+e.getMessage()+\")\");\n }\n detects.addTiming(\"d\",Logger.tockLong(\"d\"));\n return detects;\n }", "public List<Result> recognize(IplImage image);", "private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }", "@Override\n public void onLeftDetect(FaceDetectionResult faceResult) {\n leftResult = null;\n if (faceResult != null) {\n leftResult = faceResult;\n\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n } else {\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n }\n calcMatch();\n }", "@Override\n public void initialize() {\n drivetrain.resetEncoders();\n }", "public void initialize() {\r\n }", "private void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"Webcam 1\");\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }", "@Override\r\n public boolean doInitTrackers() {\n boolean result = true;\r\n\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n Tracker tracker;\r\n\r\n // Trying to initialize the image tracker\r\n tracker = tManager.initTracker(ObjectTracker.getClassType());\r\n if (tracker == null) {\r\n Log.e(LOGTAG, \"Tracker not initialized. Tracker already initialized or the camera is already started\");\r\n result = false;\r\n } else {\r\n Log.i(LOGTAG, \"Tracker successfully initialized\");\r\n }\r\n return result;\r\n }", "private void initialize() {\n }", "protected void initialize() {\n \ttarget = (int) SmartDashboard.getNumber(\"target\", 120);\n \ttarget = (int) (target * Constants.TICKS_TO_INCHES);\n\t\tRobot.drive.stop();\n\t\tmaxCount = (int) SmartDashboard.getNumber(\"max count\", 0);\n\t\ttolerance = (int) SmartDashboard.getNumber(\"tolerance\", 0);\n\t\tRobot.drive.left.motor1.setSelectedSensorPosition(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\t\tRobot.drive.right.motor1.setSelectedSensorPosition(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "@Override\n public void onRightDetect(FaceDetectionResult faceResult) {\n if (faceResult != null) {\n rightResult = faceResult;\n } else {\n rightResult = null;\n }\n calcMatch();\n }", "@Override public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {\n VisionAPIManager.this.face = face;\n computeFace(face);\n }", "protected void initialize() {\n \t_finalTickTargetLeft = _ticksToTravel + Robot.driveTrain.getEncoderLeft();\n \t_finalTickTargetRight = _ticksToTravel + Robot.driveTrain.getEncoderRight();\n \t\n }", "@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }", "protected void initialize() {\n \tRobot.driveTrain.arcade(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }", "private void startRecognition() {\n mStatusTextView.setVisibility(View.VISIBLE);\n mStatusTextView.setText(R.string.status_scan_credentials);\n mStatusProgressBar.setVisibility(View.GONE);\n mRescanButton.setVisibility(View.GONE);\n\n mScannerView.setAnimated(true);\n hideMatchView();\n\n mTimeClockBar.setVisibility(View.VISIBLE);\n mTimeClockBar.setProgress(0);\n\n // Start a timeout for the recognition\n startRecognitionTimeout();\n\n mAllPasswords.clear();\n mSSIDMatchCounts.clear();\n mProcessor.setActive(true);\n }", "@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }", "public void inicializarCaptura() {\n try {\n fingerprintSDK = new MatchingContext(); \n //Inicializa la captura de huella digital.\n GrFingerJava.initializeCapture(this); \n objpantprincipal.writeLog(\"**SDK de huella dactilar inicializado con éxito**\");\n } catch (Exception e) {\n //Si ocurre un error se cierra la aplicación.\n //If any error ocurred while initializing GrFinger,\n //writes the error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(e.getMessage());\n //System.exit(1);\n }\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "protected void initialize() {\r\n Robot.driveTrain.resetRangefinder();\r\n }", "@Override\n public void initialize() {\n //m_camera.setDriverMode(true);\n //m_camera.setLED(LEDMode.kOn);\n RobotContainer.m_Drive.auto = true;\n RobotContainer.m_Drive.setLightMode(3);\n }", "public BeaconAnalysis() {\n this.left = BeaconColor.UNKNOWN;\n this.right = BeaconColor.UNKNOWN;\n this.confidence = 0.0f;\n this.location = new Rectangle();\n this.leftButton = null;\n this.rightButton = null;\n }", "public void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "protected void initialize() {\n \ttime.start();\n \tRobot.camera.setExposureManual(20);\n \tzach();\n\t\tSystem.out.println(\"josh\");\n\t\t\n }", "public void initialize() {\n // TODO\n }", "private void resultImgInit() {\n resultImgAndLoadingLayout.setX(cornerPositions.getLeftTop().x);\n resultImgAndLoadingLayout.setY(cornerPositions.getLeftTop().y);\n int wight = cornerPositions.getRightBottom().x - cornerPositions.getLeftTop().x + cornerImgSize;\n int height = cornerPositions.getRightBottom().y - cornerPositions.getLeftTop().y + cornerImgSize;\n resultImgAndLoadingLayout.setLayoutParams(new LayoutParams(wight, height));\n }", "public void initialize() {\n }", "public void initialize() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" starting processor thread\");\n\t\tprocessorThread.start();\n\t\t\n\t\t//logger.debug(processorName+\" initialized\");\n\t}", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "public DefaultResults() {\n this.results = new ArrayList<R>();\n this.totalCc = new ArrayList<Long>();\n this.maximalCc = new ArrayList<Long>();\n this.totalBytes = new ArrayList<Long>();\n this.maximalBytes = new ArrayList<Long>();\n this.maximalMemory = new ArrayList<Long>();\n }", "@Override\n public boolean doInitTrackers() {\n boolean result = true;\n\n TrackerManager tManager = TrackerManager.getInstance();\n Tracker tracker;\n\n // Trying to initialize the image tracker\n tracker = tManager.initTracker(ObjectTracker.getClassType());\n if (tracker == null) {\n Log.e(TAG,\n \"Tracker not initialized. Tracker already initialized or the camera is already started\");\n result = false;\n } else {\n Log.i(TAG, \"Tracker successfully initialized\");\n }\n return result;\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "@Override\n public void initialize() {\n drivetrain.enable();\n }", "protected void initialize() {\n \tRobot.drive.resetEncoder();\n }", "protected void initialize() {\n \t\n }", "public Result() {\r\n super();\r\n System.out.println(\"Result:Constructor\");\r\n }", "public void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_QUAD_ELEMENT, LABEL_SINGLE_ELEMENT);\n }", "@Override\n protected void initialize() {\n gambezi = new Gambezi(\"10.17.47.18:5809\");\n dist = gambezi.get_node(\"pi_vision/output/distance\");\n ang = gambezi.get_node(\"pi_vision/output/angle to target\");\n distance = dist.get_double();\n angle = ang.get_double();\n double[][][] profile = HBRSubsystem.generateSkidSteerPseudoProfile(distance, angle);\n drive.setMode(Drivetrain.Follower.DISTANCE, HBRSubsystem.Mode.FOLLOWER);\n drive.setPIDMode(Drivetrain.Follower.DISTANCE, HBRSubsystem.PIDMode.POSITION);\n drive.setILimit(Drivetrain.Follower.DISTANCE, 0);\n drive.setFeedforward(Drivetrain.Follower.DISTANCE, 0, 0, 0);\n drive.setFeedback(Drivetrain.Follower.DISTANCE, 0, 0, 0);\n drive.resetIntegrator(Drivetrain.Follower.DISTANCE);\n\n // angle PID\n drive.setMode(Drivetrain.Follower.ANGLE, HBRSubsystem.Mode.FOLLOWER);\n drive.setPIDMode(Drivetrain.Follower.ANGLE, HBRSubsystem.PIDMode.POSITION);\n drive.setILimit(Drivetrain.Follower.ANGLE, 0);\n drive.setFeedforward(Drivetrain.Follower.ANGLE, 0, 0, 0);\n drive.setFeedback(Drivetrain.Follower.ANGLE, 0, 0, 0);\n drive.resetIntegrator(Drivetrain.Follower.ANGLE);\n\n drive.setProfile(Drivetrain.Follower.DISTANCE,profile[0]);\n drive.setProfile(Drivetrain.Follower.ANGLE,profile[1]);\n\n drive.resume(Drivetrain.Follower.DISTANCE);\n drive.resume(Drivetrain.Follower.ANGLE);\n drive.setEnabled(true);\n }", "void initVuforia() {\n\n //Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public static void main(String[] args){\n String absolutePath = null;\n try {\n absolutePath = new File(\"./src/main/resources/opencv_contrib/opencv_java420.dll\").getCanonicalPath();\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n System.load(absolutePath);\n\n FaceRecognitionTests test = new FaceRecognitionTests();\n\n //test.treatAllPhotos();\n //test.train();\n //test.save();\n\n test.load();\n\n System.out.println(\"percentage correct : \" + test.testAll() * 100 + \"%\");\n\n /*\n Mat imageTest = Imgcodecs.imread(\"photo\\\\testing\\\\20\\\\20_P04A+000E+00.pgm\", Imgcodecs.IMREAD_GRAYSCALE);\n RecognitionResult testResult = test.recognize(imageTest);\n\n System.out.println(\"suposed result : 20, actual result : \" + testResult.label[0] + \" with confidence : \" + testResult.confidence[0]);\n */\n }", "@Override\n\t\t\t\t\t\t\tpublic void onResult(InitiateMatchResult result) {\n\t\t\t\t\t\t\t\tif (!checkStatusCode(match, result.getStatus()\n\t\t\t\t\t\t\t\t\t\t.getStatusCode())) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tGameActivity.gameMachine.reset();\n\t\t\t\t\t\t\t\tmatch = result.getMatch();\n\t\t\t\t\t\t\t\tstartGame(match);\n\t\t\t\t\t\t\t}", "@Override\n public FacialLandmarkResult run(Mat frame) {\n return runByDetections(frame, new ResultList<>(Collections.singletonList(\n new ObjectDetectionResult(0, \"face\", 1.0f, 0, 0, frame.size().width(), frame.size().height())\n ))).get(0);\n }", "private static void init() {\n\t\tguess = 0;\n\t\ttries = 10;\n\t\tlen = Random.getRand(4, 8);\n\t\tcorrectGuesses = 0;\n\t\twordGen = new RandomWordGenerator(len);\n\t\twordGen.generate();\n\t\tword = wordGen.getWord();\n\t\tguessesResult = new boolean[word.length()];\n\n\t}", "@SuppressLint(\"UnsafeExperimentalUsageError\")\n @Override\n public void analyze(@NonNull ImageProxy image_proxy) {\n ArrayList<Recognition> detections = _detector.DetectImage(image_proxy);\n\n // draw the bounding boxes\n _obj_tracker.ObjectTrackerDraw(detections);\n\n image_proxy.close();\n\n }", "protected void initialize() {\n\t\t\n\t\tif (trajectoryToFollow.highGear) {\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}else {\n\t\t\t//Robot.pneumatics.drivetrainShiftDown();\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}\n\n\t\tsetUpTalon(leftTalon);\n\t\tsetUpTalon(rightTalon);\n\n\t\tsetValue = SetValueMotionProfile.Disable;\n\n\t\trightTalon.set(ControlMode.MotionProfileArc, setValue.value);\n\t\tleftTalon.follow(rightTalon, FollowerType.AuxOutput1);\n\n\t\tloadLeftBuffer = new Notifier(\n\t\t\t\tnew BufferLoader(rightTalon, trajectoryToFollow.centerProfile, trajectoryToFollow.flipped,\n\t\t\t\t\t\tRobot.drivetrain.getDistance()));\n\n\t\tloadLeftBuffer.startPeriodic(.005);\n\t}", "@Override\n public void initialize() {\n conveyor.setBallCount(0);\n conveyor.startTime(); \n }" ]
[ "0.6145711", "0.60985464", "0.5928454", "0.58563787", "0.5792697", "0.5775008", "0.5755182", "0.5725333", "0.5721165", "0.5695255", "0.56676584", "0.5647244", "0.56425995", "0.5617441", "0.5572036", "0.55706453", "0.5561605", "0.55536544", "0.5543834", "0.55361646", "0.5514574", "0.549", "0.5486685", "0.54844624", "0.5458582", "0.5456733", "0.544932", "0.54443353", "0.5434824", "0.5434708", "0.5433643", "0.5428084", "0.54260635", "0.5415302", "0.541021", "0.5408703", "0.5402846", "0.5398232", "0.53972435", "0.5391852", "0.5385642", "0.53683186", "0.53555936", "0.5353649", "0.53287876", "0.53263223", "0.53207374", "0.5317267", "0.53023887", "0.52907664", "0.528869", "0.5283048", "0.52827156", "0.5281705", "0.5280547", "0.5277413", "0.5276677", "0.52709943", "0.5268661", "0.52597874", "0.5255429", "0.52524906", "0.5247214", "0.5247098", "0.524491", "0.5244802", "0.5244386", "0.5243951", "0.5243025", "0.5241793", "0.5238531", "0.5238011", "0.52336204", "0.5230747", "0.52292895", "0.5226702", "0.5223481", "0.521918", "0.52187574", "0.52183694", "0.52126217", "0.51948816", "0.5193268", "0.5179874", "0.51796967", "0.5172742", "0.5169162", "0.51660985", "0.5163586", "0.51609105", "0.516075", "0.51573145", "0.5153683", "0.51522684", "0.51500064", "0.5149604", "0.5148192", "0.51480794", "0.5142027", "0.5139329", "0.51386404" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7247938", "0.7202959", "0.7196692", "0.71785426", "0.7108701", "0.70417315", "0.70402646", "0.70132303", "0.7011096", "0.69826573", "0.6946997", "0.69409776", "0.6935366", "0.69191027", "0.69191027", "0.6893088", "0.6885528", "0.6877815", "0.68763673", "0.686437", "0.686437", "0.686437", "0.686437", "0.68540627", "0.68493474", "0.68218297", "0.68192774", "0.68153644", "0.68153644", "0.6815331", "0.6808357", "0.680292", "0.68001926", "0.6793566", "0.6790724", "0.6790344", "0.67855906", "0.67613244", "0.67596716", "0.67503935", "0.674636", "0.674636", "0.6743352", "0.6741959", "0.6728363", "0.6725486", "0.67250663", "0.67250663", "0.67230934", "0.67131525", "0.67084885", "0.67067933", "0.6701798", "0.6700826", "0.6699366", "0.6696747", "0.66889644", "0.6685846", "0.6685846", "0.6684866", "0.6682888", "0.66810936", "0.6679739", "0.6670028", "0.6669299", "0.6664124", "0.6659152", "0.6659152", "0.6659152", "0.6658369", "0.66567385", "0.66567385", "0.66567385", "0.66540265", "0.6653653", "0.66526854", "0.66509074", "0.66492856", "0.6648748", "0.6648541", "0.6648053", "0.66467965", "0.66467464", "0.66459095", "0.66453874", "0.66439164", "0.6641125", "0.66372454", "0.663597", "0.6634331", "0.6634331", "0.6634331", "0.66339976", "0.6631227", "0.6630643", "0.6628774", "0.66286343", "0.66267", "0.6621867", "0.6620775", "0.6620775" ]
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.nav_camera) { } else if (id == R.id.nav_gallery) { Intent intent = new Intent(this, PersonGroupListActivity.class); startActivity(intent); } else if (id == R.id.nav_manage) { } else if (id == R.id.nav_share) { } else if (id == R.id.nav_send) { Intent intent = new Intent(this, TestActivity.class); startActivity(intent); } // else if (id == R.id.nav_slideshow) { // // } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}", "@Override\n public void OnItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }", "private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }", "void onMenuItemClicked();", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "@Override\n public void onItemClick(View view, String data) {\n }", "abstract public void onSingleItemClick(View view);", "@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }", "@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }", "@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "public void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }", "@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "void onLinkClicked(@Nullable ContentId itemId);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }", "void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "void onItemClick(int position);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}", "@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }", "void clickItem(int uid);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(View view, int position) {\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }", "public void onItemClick(View view, int position) {\n\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}", "void onClick(View item, View widget, int position, int which);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void menuClicked(MenuItem menuItemSelected);", "@Override\n public void onItemClick(int position) {\n }", "@Override\n public void onItemClick(int position) {\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}" ]
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224", "0.66243863", "0.6624042", "0.66207093", "0.6602551", "0.6602231", "0.6599443", "0.65987265", "0.65935796", "0.6585869", "0.658491", "0.65811735", "0.65765643", "0.65751576", "0.65694076", "0.6561757", "0.65582377", "0.65581614", "0.6552827", "0.6552827", "0.6549224", "0.65389794", "0.65345114", "0.65337104", "0.652419", "0.652419", "0.6522521", "0.652146", "0.6521068", "0.6519354", "0.65165275", "0.65159816", "0.65028816", "0.6498054", "0.6498054", "0.64969087", "0.64937705", "0.6488544", "0.64867324", "0.64866185", "0.64865905", "0.6484047", "0.6481108", "0.6474686", "0.64628965", "0.64551884", "0.6446893", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64386237", "0.643595", "0.64356565", "0.64329195", "0.6432562", "0.6429554", "0.64255124", "0.64255124", "0.64121485", "0.64102405", "0.64095175", "0.64095175", "0.64094734", "0.640727", "0.64060104", "0.640229", "0.6397359", "0.6392996", "0.63921124", "0.63899696", "0.63885015", "0.63885015", "0.63873845", "0.6368818", "0.6368818", "0.63643163", "0.63643163", "0.63643163", "0.6358884" ]
0.0
-1
Show the status of background detection task on screen.
private void setUiDuringBackgroundTask(String progress) { progressDialog.setMessage(progress); setInfo(progress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showProfileBackground();", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "public void enterBackground();", "private void displayTask() {\n this.task = new Task();\n Color color = this.task.getColor();\n this.taskPanel.displayColor(color);\n }", "protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "public void showLoadingScreen() {\n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n getSelectGameScreenIfActive().ifPresent(new Consumer<SelectGameScreen>() {\n @Override\n public void accept(SelectGameScreen gameScreen) {\n gameScreen.setDisabled();\n }\n });\n }", "@Override\n public void onScreenStatus(boolean isAs) {\n }", "public String showStatus();", "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "public void showSystemUI() {\r\n if (PhotoViewActivity.this != null)\r\n PhotoViewActivity.this.runOnUiThread(new Runnable() {\r\n public void run() {\r\n toolbar.animate().translationY(Measure.getStatusBarHeight(getResources())).setInterpolator(new DecelerateInterpolator())\r\n .setDuration(240).start();\r\n photoViewActivity.setSystemUiVisibility(\r\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\r\n fullScreenMode = false;\r\n }\r\n });\r\n\r\n }", "private void showDisplay() {\n this.display.displayScreen();\n }", "@Override\n public void showProgressSync() {\n }", "private void showNotification(LBSBundle lbs,int status){\n\t\tScenario scenario = (Scenario) EntityPool.instance(\r\n\t\t\t\t).forId(lbs.getParentId(), lbs.getParentTag());\r\n\t\t\r\n\t\t\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\tscenario.getName(), System.currentTimeMillis());\r\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL;\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\tintent.setAction(TaskOverViewActivity.TASK_OVERVIEWBY_SCENARIO);\r\n\t\tintent.putExtra(TaskOverViewActivity.IN_SCENAIRO_ID, scenario.getId());\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\tCharSequence text = getText(status);\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, scenario.getName(),\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(\tstatus, notification);\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\ttry {\n\t\t\tboolean foregroud = new ForegroundCheckTask().execute(\n\t\t\t\t\tBaseActivity.this).get();\n\t\t\tLog.i(\"onPause\", String.valueOf(foregroud));\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@DebugLog\n public int goBackground() {\n if(mLocked) return mScanManager.getMode();\n mScanManager.setMode(SCAN_BACKGROUND);\n return mScanManager.getMode();\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\tSystem.out.println(\"task: \"+ task);\n\t}", "public void onTaskComplete(){\n findViewById(R.id.downloadend).setVisibility(View.VISIBLE);\n findViewById(R.id.finito).setBackgroundResource(R.drawable.ok);\n }", "void backgroundRefresh();", "@Override\r\n\tpublic void run(final TaskMonitor taskMonitor) {\n\t\ttaskMonitor.setTitle(\"My Edge View Task\");\r\n\t\t\r\n\t\ttaskMonitor.setProgress(0.1);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Do something here with the view\r\n\t\t\t\r\n\t\t\tThread.sleep(4000);\r\n\t\t}\r\n\t\tcatch ( InterruptedException e){\r\n\t\t}\r\n\t\ttaskMonitor.setProgress(1.0);\r\n }", "@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n gameBoard.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n\n calculateConstants();\n }", "public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }", "public void determineBackgroundTaskVisibility(PageBase pageBase) {\n\t\tif (backgroundTaskOid == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (pageBase.isAuthorized(AuthorizationConstants.AUTZ_ALL_URL)) {\n\t\t\t\tbackgroundTaskVisible = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (SchemaException | ExpressionEvaluationException | ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException e) {\n\t\t\tbackgroundTaskVisible = false;\n\t\t\tLoggingUtils.logUnexpectedException(LOGGER, \"Couldn't determine background task visibility\", e);\n\t\t\treturn;\n\t\t}\n\n\t\tTask task = pageBase.createSimpleTask(OPERATION_CHECK_TASK_VISIBILITY);\n\t\ttry {\n\t\t\tpageBase.getModelService().getObject(TaskType.class, backgroundTaskOid, null, task, task.getResult());\n\t\t\tbackgroundTaskVisible = true;\n\t\t} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|CommunicationException|ConfigurationException|ExpressionEvaluationException e) {\n\t\t\tLOGGER.debug(\"Task {} is not visible by the current user: {}: {}\", backgroundTaskOid, e.getClass(), e.getMessage());\n\t\t\tbackgroundTaskVisible = false;\n\t\t}\n\t}", "public void actionBackground() {\n int num1 = (int) Math.floor(Math.random() * 6 + 1);\n int num2 = (int) Math.floor(Math.random() * 6 + 1);\n MensajeTrayIcon(\"Haciendo algo: \" + num1 + \" + \" + num2 + \" = \" + (num1 + num2), TrayIcon.MessageType.INFO);\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "public void showProgress() {\n img_left_action.setVisibility(View.GONE);\n search_progress.setAlpha(0.0f);\n search_progress.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(search_progress, \"alpha\", 0.0f, 1.0f).start();\n }", "public boolean isInBackground(){\n return isInBackground;\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "void showProgress();", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\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 }", "public void run() {\n while(true)\r\n {\r\n synchronized (this) {\r\n try {\r\n wait(milisecsToWait);\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n if( !monitor_for_ingress_status )\r\n return;\r\n if (ingress_running_in_foreground()) {\r\n if (!overlayView.isVisible()) {\r\n overlayView.setVisible();\r\n overlayView.setText(\"HI!\\nIngress is running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es visible e ingress esta en fg\");\r\n */\r\n }\r\n } else {\r\n if (overlayView.isVisible()) {\r\n overlayView.setInvisible();\r\n overlayView.setText(\"HI!\\nIngress is NOT running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es invisible e ingress no esta en fg\");\r\n try {\r\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.setClassName(\"com.nianticproject.ingress\", \"com.nianticproject.ingress.NemesisActivity\");\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }catch (Exception e){\r\n Log.e(\"julin\", e.getMessage());\r\n }\r\n */\r\n }\r\n }\r\n }\r\n });\r\n handler.sendEmptyMessage(1);\r\n\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n }", "public void showReady();", "public void printStatus();", "public void display() {\n startPreview();\n }", "public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}", "public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }", "private void showSystemUI() {\n photoView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n isShowingSystemUI = true;\n }", "public void backgroundProcess();", "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\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (isActive)\n\t\t\tdisplay.syncExec(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tuptimeLabel.setText(new StringBuilder(\"Uptime: \").append(\n\t\t\t\t\t\t\tgetPrettyDuration()).toString());\n\t\t\t\t\tuptimeLabel.setForeground(getUptimeColor());\n\t\t\t\t\tuptimeLabel.update();\n\t\t\t\t}\n\t\t\t});\n\t}", "@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }", "public void display() {\n System.out.println(\"显示浅蓝色文本框\");\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "void enableBackgroundData();", "@Override\n public void executeAndShow(TaskList taskList, Storage storage) {\n Ui.showMessage(execute(taskList, storage));\n }", "@Override\n\t\t\tpublic void onResume() {\n\t\t\t\tsuper.onResume();\n\t\t\t\tisonshow=true;\n\t\t\t\tMythtead mythread=new Mythtead();\n\t\t\t\tmythread.start();\n\t\t\t\t\n\t\t\t\tcircleprogressbar.setProgress(pro);\n\n\t\t\t}", "@Override\n public void run() {\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }", "protected void startBackgroundThread() {\n mBackgroundThread = new HandlerThread(\"Camera Background\");\n mBackgroundThread.start();\n mBackgroundHandler = new Handler(mBackgroundThread.getLooper());\n }", "private void showBackgroundSurface(HwMagicWinSplitAnimation splitAnimation, int displayId, DisplayContentEx displayContent, boolean isScreenshot) {\n Bitmap screenShot = null;\n DisplayInfoEx displayInfo = displayContent.getDisplayInfoEx();\n Rect screenBounds = new Rect(0, 0, displayInfo.getLogicalWidth(), displayInfo.getLogicalHeight());\n if (!isScreenshot) {\n splitAnimation.showBgColoredSurface(Utils.isNightMode(splitAnimation.mTaskStackContainers.getWmService().getContext()) ? HwMagicWinSplitAnimation.DARK_BG_COLOR : HwMagicWinSplitAnimation.BG_COLOR, screenBounds);\n } else if (displayId == 0 || displayId == HwMagicWinManager.getInstance().getVirtualDisplayId()) {\n if (displayId == 0) {\n try {\n screenShot = SurfaceEx.screenshot(screenBounds, screenBounds.width(), screenBounds.height(), displayContent.getRotation());\n } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException e) {\n } catch (Throwable th) {\n if (0 != 0 && !screenShot.isRecycled()) {\n screenShot.recycle();\n }\n throw th;\n }\n } else {\n screenShot = (Bitmap) Class.forName(\"android.view.SurfaceControl\").getDeclaredMethod(\"screenshot\", IBinder.class, Integer.TYPE, Integer.TYPE).invoke(null, DisplayManagerInternalEx.getInstance().getDisplayToken(displayId), Integer.valueOf(screenBounds.width()), Integer.valueOf(screenBounds.height()));\n }\n if (screenShot != null) {\n splitAnimation.showBgBufferSurface(GraphicBufferEx.createGraphicBufferHandle(screenShot), new Point(screenBounds.left, screenBounds.top));\n } else if (screenShot != null && !screenShot.isRecycled()) {\n screenShot.recycle();\n return;\n } else {\n return;\n }\n } else if (0 != 0 && !screenShot.isRecycled()) {\n screenShot.recycle();\n return;\n } else {\n return;\n }\n if (screenShot == null || screenShot.isRecycled()) {\n return;\n }\n screenShot.recycle();\n }", "String getRemediationBackground();", "void showMainLoadingWheel();", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlblstatus.setText(\"Hardware Problem\");\r\n\t\t\t\t\tToast.makeText(Main.mainstage, \"Hardware Problem\", 1000,\r\n\t\t\t\t\t\t\t100, 100);\r\n\r\n\t\t\t\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "@Override\n public void showProgress() {\n\n }", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "@Override\n\tpublic void Display() {\n\t\tSystem.out.println(\"This is Windows Phone\");\n\t}", "private void showStatus(final String msg, final int time) {\r\n _uiApp.invokeAndWait(new Runnable() {\r\n /**\r\n * @see Runnable#run()\r\n */\r\n public void run() {\r\n Status.show(msg, time);\r\n }\r\n });\r\n }", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "void backgroundProcess();", "public void run() {\n updateSyncStats();\n\n double d = uploadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveUploads() == 0)\n {\n // Hide KB/s when not active uploads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n uploadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_uploads\"));\n } else {\n String s = Format.formatDecimal(d);\n uploadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_uploads_active\", s));\n }\n d = downloadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveDownloads() == 0)\n {\n // Hide KB/s when no active downloads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n downloadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_downloads\"));\n } else {\n String s = Format.formatDecimal(d);\n downloadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_downloads_active\", s));\n }\n }", "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 }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n myrlayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "private void displayStatus(final byte b) {\n\n\t\trunOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tbyte[] output = {b};\n Log.d(TAG, \"status: \" + Utils.bytesToHex2(output)); \n\t\t\t\tString currentTime = \"[\" + formater.format(new Date()) + \"] : \";\n\t\t\t\tif ((byte) (b & 0x01) == 0x01) {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tisUsbDisconnected = false;\n\t\t\t\t\t}\n\t\t\t\t\tledUsb.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x01) == 0x00)\n\t\t\t\t\t\tlog(currentTime + \"usb connected\");\n\t\t\t\t} else {\n\t\t\t\t\tledUsb.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x01) == 0x01)\n\t\t\t\t\t\tlog(currentTime + \"usb disconnected\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ((byte) (b & 0x02) == 0x02) {\n\t\t\t\t\tledWifi.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x02) == 0x00)\n\t\t\t\t\t log(currentTime + \"wifi connected\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tledWifi.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x02) == 0x02)\n\t\t\t\t\tlog(currentTime + \"wifi disconnected\");\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif ((byte) (b & 0x04) == 0x04) {\n\t\t\t\t\tledTelep.setPressed(true);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x04) == 0x00)\n\t\t\t\t log(currentTime + \"telep. connected\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tledTelep.setPressed(false);\n\t\t\t\t\tif ((byte) (mPreviousStatus & 0x04) == 0x04)\n\t\t\t\t\tlog(currentTime + \"telep. disconnected\");\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tmPreviousStatus = b;\n\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n public void onResume()\n {\n super.onResume();\n\n showThing();\n \n blue_jay_animation.start();\n }", "private void QueryScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm1.setIcon(new ImageIcon(images.get(currentFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "void checkCurrentScreen();", "@Override\n\tpublic void show() {\n\t\tGdx.app.log(\"GameScreen\", \"Showing\");\n\n\t}", "private void updateBackground() {\n \t\t\t\ttextRed.setText(\"\" + redBar.getProgress());\n \t\t\t\ttextGreen.setText(\"\" + greenBar.getProgress());\n \t\t\t\ttextBlue.setText(\"\" + blueBar.getProgress());\n \t\t\t\ttextAlpha.setText(\"\" + alphaBar.getProgress());\n \t\t\t\tcolorTest.setBackgroundColor(Color.argb(alphaBar.getProgress(), redBar.getProgress(), greenBar.getProgress(), blueBar.getProgress()));\n \t\t\t}", "public void updateStatusIndicators() {\n // this runs on the UI thread, to avoid conflicting UI updates\n final class statusUpdater implements Runnable {\n @Override\n public void run() {\n boolean phoneCommBusy;\n boolean myConnectedToPhone;\n synchronized(statusLock) {\n phoneCommBusy = waitingForProjectLoad || sendingToPhone;\n myConnectedToPhone = connectedToPhone;\n }\n // comm indicator\n if (phoneCommBusy) { // communicating with phone\n commIndicator.setState(PhoneCommIndicator.IndicatorState.COMMUNICATING);\n } else {\n if (myConnectedToPhone) { // not communicating with phone and repl app is running\n commIndicator.setState(PhoneCommIndicator.IndicatorState.CONNECTED);\n } else { // not communicating and repl app not running\n commIndicator.setState(PhoneCommIndicator.IndicatorState.DISCONNECTED);\n }\n }\n // connect menu enabled/disabled\n // Note: The device selector menu is created with the initial text\n // \"Loading a Project\". This changes to \"Connect to Device\" when the\n // menu is first activated.\n if (!phoneCommBusy\n && WorkspaceControllerHolder.get().haveProject()) {\n deviceSelector.setEnabled(true);\n } else {\n deviceSelector.setEnabled(false);\n }\n // connected device\n if (myConnectedToPhone) {\n deviceSelector.setCurrentDevice(psReplController.getSelectedDevice());\n } else {\n deviceSelector.setCurrentDevice(null);\n }\n }\n }\n if (commIndicator == null) {\n // only expect this to be true during testing\n return;\n }\n if (SwingUtilities.isEventDispatchThread()) {\n new statusUpdater().run();\n } else {\n try {\n SwingUtilities.invokeAndWait(new statusUpdater());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();", "public boolean isRunning();" ]
[ "0.6181879", "0.6007181", "0.5986315", "0.59658796", "0.5947657", "0.5846524", "0.5830389", "0.5830052", "0.5807531", "0.574677", "0.57417226", "0.56773424", "0.56719977", "0.56703025", "0.5662885", "0.56553364", "0.56183404", "0.56183404", "0.56061196", "0.5596096", "0.55822194", "0.5568992", "0.5563531", "0.5509839", "0.55078226", "0.55065507", "0.5503672", "0.5493431", "0.54886717", "0.54765636", "0.54753804", "0.5474158", "0.54655147", "0.5455068", "0.5452257", "0.5382619", "0.53749084", "0.536081", "0.5342995", "0.5342514", "0.5337442", "0.5332435", "0.5331396", "0.53215533", "0.5317315", "0.529575", "0.5294392", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.52941555", "0.5288329", "0.52757275", "0.5275021", "0.526897", "0.5255747", "0.5249667", "0.52454096", "0.5243461", "0.5242669", "0.5238132", "0.5221433", "0.52203834", "0.5218725", "0.52074426", "0.52041596", "0.52000105", "0.52000105", "0.52000105", "0.5199105", "0.5195667", "0.51910156", "0.51876515", "0.51862156", "0.5182744", "0.51715815", "0.5169404", "0.5169404", "0.5169404", "0.5169404", "0.5169404", "0.5169404", "0.5169404", "0.5169404", "0.5169404", "0.51631254", "0.5158463", "0.5153564", "0.5150965", "0.5150696", "0.5150696", "0.5150696", "0.5150696", "0.5150696", "0.5150696" ]
0.0
-1
Show the result on screen when detection is done.
private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) { progressDialog.dismiss(); setAllButtonsEnabledStatus(true); setIdentifyButtonEnabledStatus(false); if (succeed) { // Set the information about the detection result. setInfo("Identification is done"); if (result != null) { mFaceListAdapter.setIdentificationResult(result); String logString = "Response: Success. "; for (IdentifyResult identifyResult: result) { logString += "Face " + identifyResult.faceId.toString() + " is identified as " + (identifyResult.candidates.size() > 0 ? identifyResult.candidates.get(0).personId.toString() : "Unknown Person") + ". "; } addLog(logString); // Show the detailed list of detected faces. ListView listView = (ListView) findViewById(R.id.list_identified_faces); listView.setAdapter(mFaceListAdapter); TextView textView = (TextView) findViewById(R.id.tips); textView.setText("检测结果"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onPostExecute(Face[] result) {\n if (check == 0) {\n setUiAfterDetection(result, mSucceed, 0);\n } else if (check == 1) {\n setUiAfterDetection(result, mSucceed, 1);\n }\n }", "private void setUiAfterDetection(Face[] result, boolean succeed, int checkImage) {\n\n // Detection is done, hide the progress dialog.\n mProgressDialog.dismiss();\n\n // Enable all the buttons.\n setAllButtonsEnabledStatus(true);\n\n // Disable button \"detect\" as the image has already been detected.\n setShareButtonsEnabledStatus(false);\n setShowButtonsEnabledStatus(false);\n if (checkImage == 0) {\n if (succeed) {\n check = 1;\n // The information about the detection result.\n if (result.length != 0) {\n face1 = result;\n foundFace1 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap1, result, true));\n genderFace1 = face1[0].faceAttributes.gender.startsWith(\"male\") ? 0 : 1;\n }\n }\n } else {\n if (succeed) {\n // The information about the detection result.\n check = 0;\n if (result.length != 0) {\n face2 = result;\n foundFace2 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap2, result, true));\n\n }\n }\n checkInputImage(face1, face2);\n count = 0;\n }\n }", "private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n if (succeed) {\n // Set the information about the detection result.\n Log.e(LOG_TAG1, \"Identification is done\");\n\n if (result != null) {\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Identified: \"\n + (identifyResult.candidates.size() > 0\n ? StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" with confidence \"+identifyResult.candidates.get(0).confidence\n : \"Unknown Person\")\n + \". \";\n\n if (identifyResult.candidates.size() > 0) {\n face_result = face_result + \" \" + StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" (\" + identifyResult.candidates.get(0).confidence + \") \";\n }\n LogViewer.addLog(\"Face API: \" + face_result);\n\n }\n\n //mIdentifyResults.get(position).candidates.get(0).confidence\n Log.e(LOG_TAG1,logString);\n doneSignal.countDown();\n } else {\n Log.e(LOG_TAG1,\"null result in setUIAfterIdentification\");\n doneSignal.countDown();\n }\n }\n Log.e(LOG_TAG1,\"SUCCESS! DONE!!! face recognition\");\n doneSignal.countDown();\n }", "public void run() {\n System.out.println(\"main recognition loop started\");\n while (true) {\n try { \n // ask the recognizer to recognize text in the recording\n if(recognizer.getState()==Recognizer.State.READY) {\n Result result = recognizer.recognize(); \n // got a result\n if (result != null) {\n resultText = result.getBestFinalResultNoFiller();\n if(resultText.length()>0) {\n // System.out.println(\"[\"+result.getStartFrame()+\",\"+result.getEndFrame()+\"]\");\n// System.out.println(result.getTimedBestResult(false, true));\n makeEvent();\n }\n }\n }\n }\n catch (Exception e) { \n System.out.println(\"exception Occured \"); \n e.printStackTrace(); \n System.exit(1);\n }\n }\n }", "private void onRecognizeAsyncTaskComplete(OcrResult result){\n \t\n \tif(result != null){\n \tLog.v(TAG, \"Recognize complete (\" + result + \"): \" + result.getText());\n\t \tLog.v(TAG,\"recognize: (6) Bitmap is \" + result.getBitmap());\n try {\n \tif(currentRequest == MSG_RECOGNIZE_TXT){\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT_TXT, currentRequest, mState.ordinal(), result.getText()));\t\n \t} else {\n \t\tcurrentClient.get().send(Message.obtain(null, MSG_RESULT, currentRequest, mState.ordinal(), result));\n \t}\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + result + \" (\" + MSG_RESULT + \")\");\n }\n \n \t} else {\n \t\t// We did not receive an OCR result\n \tLog.i(TAG, \"Recognize complete: No result\");\n \t\tsendMessage(currentClient, MSG_ERROR, currentRequest, getString(R.string.error_failed_recognition));\n \t}\n\n \t// Go back to IDLE (or if the baseApi no longer exists go to UNINITIALIZED\n \tmState = (baseApi != null) ? State.IDLE : State.UNINITIALIZED;\n\t\t\n \t// We're done with the current client. Remove any references to the object.\n currentClient = null;\n }", "private void showResult() {\n if (Utils.isKitkat()) TransitionManager.beginDelayedTransition(llBody);\n if (tvResult != null)\n flSceneFrame.removeView(tvResult);\n tvResult = new TextView(this);\n tvResult.setBackgroundColor(getResources().getColor(R.color.colorRedTranslucent));\n tvResult.setTextColor(getResources().getColor(android.R.color.white));\n tvResult.setText(selectedAnswer.getText());\n tvResult.setPadding(4, 4, 4, 4);\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.setMargins(utils.getQuadrantBasedX(ivScene, selectedAnswer.getRelativeCoordinateX()), utils.getQuadrantBasedY(ivScene, selectedAnswer.getRelativeCoordinateY()), 0, 0);\n flSceneFrame.addView(tvResult, params);\n btNext.setVisibility(View.VISIBLE);\n }", "protected void execute() {\n\t\tBBox bBox = bBoxLocator.getBBox();\n\t\tSmartDashboard.putBoolean(\"Can See With Vision\", wasDetected);\n\n\t\tif (bBox != null) {\n\t\t\twasDetected = true;\n\t\t\tpidAngle.setSetpoint(Robot.drivetrain.getHeading() + bBox.angleDeg);\n\t\t\tSmartDashboard.putNumber(\"PID Vision Setpoint Angle\", pidAngle.getSetpoint());\n\t\t}\n\n\t\tif (!waitForVision || wasDetected) {\n\t\t\tRobot.drivetrain.drive(driveOutput * (useAccelerationFiler ? filter.output() : 1), driveCurve);\n\t\t}\n\t}", "private void displayResults() {\r\n\t\tGImage results;\r\n\t\tif(mehran == null ) {\r\n\t\t\tresults = new GImage(\"WinImage.png\");\r\n\t\t\tresults.scale(.7);\r\n\t\t} else {\r\n\t\t\tresults = new GImage(\"LoseImage.png\");\r\n\t\t\tresults.scale(1.5);\r\n\t\t}\r\n\t\tresults.setLocation((getWidth() - results.getWidth()) / 2.0, (getHeight() - results.getHeight()) / 2.0);\r\n\t\tadd(results);\r\n\t}", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}", "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}", "private void showResults() {\n verifyFCMToken(this);\n progressDialog.cancel();\n Toast.makeText(RegisterActivity.this, \"Welcome!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "private void display() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n// Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n }", "public void handleVerificationSuccessResult(ZoomVerificationResult successResult) {\n if (successResult.getFaceMetrics() != null) {\n // this is the raw biometric data which can be uploaded, or may be\n // base64 encoded in order to handle easier at the cost of processing and network usage\n bytes = successResult.getFaceMetrics().getZoomFacemap();\n if (!successResult.getFaceMetrics().getAuditTrail().isEmpty()) {\n face2 = successResult.getFaceMetrics().getAuditTrail().get(0).copy(Bitmap.Config.ARGB_8888, true);\n }\n\n //if (RecogEngine.g_recogResult.faceBitmap != null) {\n if (imageFile != null) {\n //Bitmap nBmp = RecogEngine.g_recogResult.faceBitmap.copy(Bitmap.Config.ARGB_8888, true);\n Bitmap nBmp = decodeFileFromPath(imageFile.getAbsolutePath()).copy(Bitmap.Config.ARGB_8888, true);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectLeftFace(buff.array(), w, h);\n }\n\n if (face2 != null) {\n Bitmap nBmp = face2;\n ivUserProfile2.setImageBitmap(nBmp);\n ivUserProfile2.setVisibility(View.VISIBLE);\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n\n sessionId = successResult.getSessionId();\n liveness(successResult);\n }\n }", "@Override\r\n public void onResult(boolean result)\r\n {\n if(result){\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Start Calibration ,successful\"));\r\n }\r\n else{\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Start Calibration ,fail\"));\r\n }\r\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tToast.makeText(context, \"Capture completed!\", Toast.LENGTH_SHORT).show();\n\t\t\tloadingAlert.dismiss();\n\t\t\t((SpectroActivity)spectroFragment.getActivity()).updateLibraryFiles();\n\t\t}", "@Override\n public void onGetResult(VoiceRecognizerResult result) {\n mResultTv.setText(\"(\" + result.text + \")\");\n\n if (result.isEnd) {\n mRecoState = 0;\n updateBtn(mRecoState);\n }\n }", "public void onSuccess(Object result) {\n\t\t\tSystem.err.println(\"showing results...\");\n\t\t\tcallStack.remove(\"target\");\n\t\t\trefgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result);\n\t\t}", "void imFinished();", "@Override\n public void done() {\n recognizer.stopRecognition();\n\n }", "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }", "private void notifyFinishGame(GameResult result) {\r\n\t\tfor (Player e : spectators)\r\n\t\t\te.finishGame(result);\r\n\t}", "public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}", "public void display() {\n startPreview();\n }", "@AfterMethod\n\tpublic void end(ITestResult result){\n if(ITestResult.FAILURE==result.getStatus()){\n \t Utility.captureScreenShots(driver, result.getName());\n }\n\t}", "public void displayResults() {\r\n Preferences.debug(\" ******* FitMultiExponential ********* \\n\\n\", Preferences.DEBUG_ALGORITHM);\r\n dumpTestResults();\r\n }", "private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }", "void showResultActivity() {\n\n Intent intent = new Intent();\n intent.setClass(this, ScanResultActivity.class);\n startActivity(intent);\n finish();\n\n playEffect();\n }", "void discoverFinished();", "private void handleRawCaptureResult(CaptureResult result) {\n if (test_wait_capture_result) {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n if (onRawImageAvailableListener != null) {\n onRawImageAvailableListener.setCaptureResult(result);\n }\n }", "public void onSuccess(Object result) {\n\t\t\tSystem.err.println(\"showing results...\");\n\t\t\t//refgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result);\n\n\t\t\trefgview.getSearchPanel().displaySearchTargets((NodeDTO[])result);\n\t\t}", "protected void execute() {\n\t\t\r\n\t\tParticleAnalysisReport[] reports = simpleVision.getFrame();\r\n\t\t for (int i = 0; i < reports.length; i++) { // print results\r\n ParticleAnalysisReport r = reports[i];\r\n SmartDashboard.putString(\"Particle\" + i, r.center_mass_x + \", \" + r.center_mass_y);\r\n\t\t }\r\n\t\t\r\n\t}", "private void showResult(final String textToShow) {\n // Run on UI thread as we'll updating our app UI\n runOnUiThread(\n () -> {\n // Append the result to the UI.\n resultTextView.append(textToShow);\n\n // Clear the input text.\n inputEditText.getText().clear();\n\n // Scroll to the bottom to show latest entry's classification result.\n scrollView.post(() -> scrollView.fullScroll(View.FOCUS_DOWN));\n });\n }", "public void checkFinished() {\n int check = 0;\n for (int i = 0; i < cards.size(); i++) {\n if (cards.get(i).getTurned() == true) {\n check++;\n }\n }\n if (check == cards.size()) {\n clip.stop();\n resultGUI = new ResultGUI(p1Points, p2Points);\n resultGUI.setSize(700, 500);\n resultGUI.setVisible(true);\n setVisible(false);\n }\n }", "@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }", "@Override\r\n public void run() {\n do {\r\n try {\r\n Thread.sleep(100);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n Result result = null;\r\n BufferedImage image = null;\r\n if (webcam.isOpen()) {\r\n if ((image = webcam.getImage()) == null) {\r\n continue;\r\n }\r\n \t//iconlabel\r\n\t ImageIcon icon=new ImageIcon(image);\r\n\t icon.setImage(icon.getImage().getScaledInstance(300,300,Image.SCALE_DEFAULT));\r\n\t iconLabel.setIcon(icon); \r\n\t \r\n \t//qrcode\r\n LuminanceSource source =new BufferedImageLuminanceSource( image) ;\r\n BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));\r\n\r\n try {\r\n result = new MultiFormatReader().decode(bitmap);\r\n } catch (NotFoundException e) {\r\n // fall thru, it means there is no QR code in image\r\n }\r\n }\r\n if (result != null) {\r\n textarea.setText(result.getText());\r\n System.out.println(result.getText());\r\n }\r\n\r\n } while (true);\r\n }", "public static void display(String result){\n\t\tresults.setText(result);\n\t}", "public void printFinishedTarget() {\n try {\n for (; ;) {\n Target target = null;\n synchronized (finishedTargets) {\n while (finishedTargets.size() == 0) {\n finishedTargets.wait();\n }//while\n target= (Target) finishedTargets.removeFirst();\n target.show();\n }\n }//for\n } catch (InterruptedException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public void showResults(String results){\n\t\t\tMessage msg = MainUIHandler.obtainMessage(UI_SHOW_RESULTS);\n\t\t\tmsg.obj=results;\n\t\t\tMainUIHandler.sendMessage(msg);\t\n\t\t}", "@Override\n\t\tprotected void onPostExecute(Boolean result) {\n\t\t\tshowResult(result);\n\t\t}", "private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }", "@Override\n\t\t\t\t\tpublic void onFinish(long time) {\n\t\t\t\t\t\ttextView.append(\"get \" + testPicNum + \" pictures: use \" + time + \"ms\" + \"\\n\");\t\n\t\t\t\t\t}", "@Override\n public void run() {\n SimpleDateFormat todayFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n String todayKey = todayFormat.format(Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()).getTime());\n contactsToday.setText(\"Today's exposure score: \" + prefs.getInt(todayKey, 0));\n if (isVisible) {\n chartView.loadUrl(generateChartString(prefs.getInt(\"chartMode\", 2))); //update the chart\n }\n\n //show the devices contirbuting--this is not visible by default because the textView that holds it is set to GONE but can be turned pn\n String dispResult = \"\";\n for (String i : scanData.getInstance().getData().keySet()) {\n ScanResult temp = scanData.getInstance().getData().get(i);\n if (temp.getRssi() > LIST_THRESH) {\n dispResult = dispResult + temp.getDevice().getAddress() + \" : \" + temp.getDevice().getName() + \" \" + temp.getRssi() + \"\\n\";\n }\n }\n status.setText(dispResult);\n\n handler.postDelayed(this, 30000);\n\n }", "private void showEndGameResults() {\n EndGameDialog endGameDialog = new EndGameDialog(this, stats, playerOne, playerTwo, (e) -> {\n dispose();\n\n this.start();\n });\n\n\n }", "private void showResult() {\n mTvErrorMessage.setVisibility(View.INVISIBLE); // set the visibility of the error message to invisible\n mCryptoRecyclerView.setVisibility(View.VISIBLE); // set the visibility of the recycler to visible\n }", "@Override\n protected void onPostExecute(IdentifyResult[] result) {\n setUiAfterIdentification(result, mSucceed);\n }", "@Override\n protected void onPostExecute(IdentifyResult[] result) {\n setUiAfterIdentification(result, mSucceed);\n }", "@Override public void onMissing(FaceDetector.Detections<Face> detectionResults) {\n VisionAPIManager.this.face = null;\n VisionAPIManager.this.rightEye = VisionAPIManager.this.leftEye = null;\n onComputeFaceDone.onNext(lastFrame);\n }", "@Override\n public void onSuccess(List<FirebaseVisionImageLabel> labels) {\n dialog.dismiss();\n\n float predictions= 0;\n String names = \"\";\n for (FirebaseVisionImageLabel label: labels) {\n String name = label.getText();\n float confidence = label.getConfidence() *100;\n if (predictions == 0){\n predictions = confidence;\n names = name;\n }else if (confidence > predictions){\n predictions = confidence;\n names = name;\n }\n\n //frameImg.setImageBitmap(image.getBitmap());\n }\n Log.d(\"result\", \"onSuccess: prediction: \"+ predictions+\" name: \"+names);\n if (predictions >40){\n\n\n int percentage = (int) predictions;\n chartView.setPercent(predictions);\n text.setText(names +\" \"+percentage+\"%\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Toast.makeText(ObjectDetectionSample.this, \"name \"+names+\" confidence\"+percentage , Toast.LENGTH_SHORT).show();\n\n }else {\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }\n\n isProcessingComplete =true;\n }", "public void showBaby(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output1 = new ByteArrayOutputStream();\n mBitmap1.compress(Bitmap.CompressFormat.JPEG, 100, output1);\n ByteArrayInputStream inputStream1 = new ByteArrayInputStream(output1.toByteArray());\n\n ByteArrayOutputStream output2 = new ByteArrayOutputStream();\n mBitmap2.compress(Bitmap.CompressFormat.JPEG, 100, output2);\n ByteArrayInputStream inputStream2 = new ByteArrayInputStream(output2.toByteArray());\n\n // Start a background task to detect faces in the image.\n new BabyPredictActivity.BabyPredict().execute(inputStream1);\n new BabyPredictActivity.BabyPredict().execute(inputStream2);\n\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "@Override\n public void run() {\n result.setText(\"\"+res);\n }", "@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}", "void onComplete(ResultModel result);", "public void displayResultScreen() {\n displayScreenAdminView = new Result();\n\n\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face)\n {\n int facesFound = detectionResults.getDetectedItems().size();\n\n faceTrackingListener.onFaceDetected(facesFound);\n }", "private void displaySpeechRecognizer() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n // Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, Constants.SPEECH_REQUEST_CODE);\n }", "protected void doPostAlgorithmActions() {\r\n\r\n if (displayLoc == NEW) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "public abstract void displayResult(Result result);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tif(\"false\".equals(result)){\n\t\t\t\t\t\tLog.e(TAG,\"图片没识别出脸\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfacepp.addface2person(sp.getString(facepp.PERSON+\"ddd\", \"\"), result, new CallBack() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "@Override\n public void onSuccess(List<FirebaseVisionImageLabel> labels) {\n dialog.dismiss();\n float predictions= 0;\n String names = \"\";\n for (FirebaseVisionImageLabel label: labels) {\n String name = label.getText();\n float confidence = label.getConfidence() *100;\n if (predictions == 0){\n predictions = confidence;\n names = name;\n }else if (confidence > predictions){\n predictions = confidence;\n names = name;\n }\n\n //frameImg.setImageBitmap(image.getBitmap());\n }\n if (predictions >40){\n\n int percentage = (int) predictions;\n chartView.setPercent(predictions);\n text.setText(names +\" \"+percentage+\"%\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n Toast.makeText(ObjectDetectionSample.this, \"name \"+names+\" confidence\"+percentage , Toast.LENGTH_SHORT).show();\n\n }else {\n chartView.setPercent(0);\n text.setText(\"Sorry! Couldn't predict.\");\n Animation animation = AnimationUtils.loadAnimation(ObjectDetectionSample.this, R.anim.slide_from_bottom);\n llResults.setAnimation(animation);\n llResults.setVisibility(View.VISIBLE);\n }\n\n\n }", "@Override\r\n\tpublic boolean results()\r\n\t{\r\n\t\treturn this.results(this.getRobot());\r\n\t}", "@SuppressWarnings(\"unused\")\n public void handleTestEvent(int result) {\n ApplicationManager.getApplication().invokeLater(() -> {\n checkInProgress = false;\n setStatusAndShowResults(result);\n com.intellij.openapi.progress.Task.Backgroundable task = getAfterCheckTask(result);\n ProgressManager.getInstance().run(task);\n });\n }", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Displaying...\");\r\n\t}", "public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }", "public void doAutoDetect()\r\n {\r\n Graphics g = this.getGraphics(); \r\n // Create the off-screen drawing area\r\n offscreenImage = createImage(getWidth(), getHeight());\r\n offscreenGraphics = offscreenImage.getGraphics();\r\n long start;\r\n long end;\r\n\r\n // Tally the number of times we were able to draw direct and buffered\r\n int directCount = 0;\r\n int bufferedCount = 0;\r\n\r\n g.setColor(getBackground());\r\n // Mark what time we started\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns directly to the screen, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(g);\r\n end = System.currentTimeMillis();\r\n directCount++;\r\n }\r\n g.setColor(getForeground());\r\n\r\n // record the total time spent drawing directly\r\n long directTime = end - start;\r\n\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns to the offscreen graphics, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(offscreenGraphics);\r\n end = System.currentTimeMillis();\r\n bufferedCount++;\r\n }\r\n\r\n long bufferedTime = end - start;\r\n\r\n // If we were able to draw more times using the buffered graphics,\r\n // or if the drawing counts are the same, but the total time for\r\n // the buffering was less, buffering is faster.\r\n if ((bufferedCount > directCount) ||\r\n ((bufferedCount == directCount) &&\r\n (bufferedTime < directTime))) {\r\n drawDirect = false;\r\n } else {\r\n // If we want to draw direct, free the space taken up by the\r\n // offscreen image and graphics context.\r\n offscreenImage.flush();\r\n offscreenImage = null;\r\n offscreenGraphics = null;\r\n drawDirect = true;\r\n }\r\n }", "public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }", "public void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(\"********** \tTest Successfull : \"+result.getName());\n\t\t\n\t\t\n\t}", "@Override\n public void display() {\n display.display();\n }", "void finishMatch() {\n\t\tint playerResult = ParticipantResult.MATCH_RESULT_NONE;\n\t\tint opponentResult = ParticipantResult.MATCH_RESULT_NONE;\n\n\t\tif (!GameActivity.gameMachine.player.isAlive()) {\n\t\t\tLayoutHelper.showResult(resultTextView, false);\n\t\t\tplayerResult = ParticipantResult.MATCH_RESULT_LOSS;\n\t\t\topponentResult = ParticipantResult.MATCH_RESULT_WIN;\n\t\t} else if (!GameActivity.gameMachine.opponent.isAlive()) {\n\t\t\tLayoutHelper.showResult(resultTextView, true);\n\t\t\tplayerResult = ParticipantResult.MATCH_RESULT_WIN;\n\t\t\topponentResult = ParticipantResult.MATCH_RESULT_LOSS;\n\t\t}\n\n\t\tArrayList<ParticipantResult> results = new ArrayList<ParticipantResult>();\n\n\t\tresults.add(new ParticipantResult(GPGHelper.getMyId(\n\t\t\t\tgameHelper.getApiClient(), match), playerResult,\n\t\t\t\tParticipantResult.PLACING_UNINITIALIZED));\n\n\t\tresults.add(new ParticipantResult(GPGHelper.getOpponentId(\n\t\t\t\tgameHelper.getApiClient(), match), opponentResult,\n\t\t\t\tParticipantResult.PLACING_UNINITIALIZED));\n\n\t\tif (match.getStatus() == TurnBasedMatch.MATCH_STATUS_ACTIVE) {\n\t\t\tif (match.getTurnStatus() == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN) {\n\t\t\t\tGames.TurnBasedMultiplayer.finishMatch(\n\t\t\t\t\t\tgameHelper.getApiClient(), match.getMatchId(),\n\t\t\t\t\t\twriteGameState(match), results);\n\t\t\t\tturnUsed = true;\n\t\t\t\tremoveNotification();\n\t\t\t}\n\t\t} else if (match.getStatus() == TurnBasedMatch.MATCH_STATUS_COMPLETE) {\n\t\t\tif (match.getTurnStatus() == TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN) {\n\t\t\t\tGames.TurnBasedMultiplayer.finishMatch(\n\t\t\t\t\t\tgameHelper.getApiClient(), match.getMatchId());\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected boolean isFinished() {\n return drivetrain.isMotionProfileFinished();\n }", "protected void execute() {\n\t\tSystem.out.println(\"Vision error: \" + RobotMap.VisionDistanceLeftPIDController.getError() + \" , \" + RobotMap.VisionDistanceRightPIDController.getError());\n\t\tSystem.out.println(\"vision, pidcontroller output: \" + RobotMap.VisionDistanceLeftPIDController.get() + \" , \" + RobotMap.VisionDistanceRightPIDController.get());\n\n\t}", "public void onTestSuccess(ITestResult result) {\n\t\tlogger.info(\"Test case Done\");\n\t}", "private void announceRoundResult()\n {\n // Last actions of each player, to compare\n GameAction fpAction = firstPlayer.getLastAction();\n GameAction spAction = secondPlayer.getLastAction();\n\n // Display first IA game\n if (!hasHuman)\n {\n if (fpAction instanceof RockAction)\n {\n animateSelectedButton(firstPlayerRock, true);\n }\n else if (fpAction instanceof PaperAction)\n {\n animateSelectedButton(firstPlayerPaper, true);\n }\n else if (fpAction instanceof ScissorsAction)\n {\n animateSelectedButton(firstPlayerScissors, true);\n }\n }\n // Display second IA game\n if (spAction instanceof RockAction)\n {\n animateSelectedButton(secondPlayerRock, false);\n }\n else if (spAction instanceof PaperAction)\n {\n animateSelectedButton(secondPlayerPaper, false);\n }\n else if (spAction instanceof ScissorsAction)\n {\n animateSelectedButton(secondPlayerScissors, false);\n }\n\n\n // First player has played something ==> look at result\n if (firstPlayer.hasAlreadyPlayed())\n {\n switch (fpAction.versus(spAction))\n {\n case WIN:\n updateResultIcons(true, false);\n break;\n case DRAW:\n updateResultIcons(false, true);\n break;\n case LOSE:\n updateResultIcons(false, false);\n break;\n }\n }\n // First player didn't play ==> draw or loose\n else\n {\n // Draw\n if (!secondPlayer.hasAlreadyPlayed())\n {\n updateResultIcons(false, true);\n }\n // Lose\n else\n {\n updateResultIcons(false, false);\n }\n }\n }", "public static void printDoneLoading() {\n System.out.println(Message.DONE_LOADING);\n }", "private void update() {\n\t\tif (needsPreview) return; // gonna happen soon anyway\n\n\t\tTask<Image> task = new Task<Image>() {\n\t\t\t@Override\n\t\t\tprotected Image call() {\n\t\t\t\treturn plotter.get().getOutput();\n\t\t\t}\n\t\t};\n\t\ttask.setOnSucceeded(event -> showImg(task.getValue()));\n\n\t\tThread th = new Thread(task);\n\t\tth.setDaemon(true);\n\t\tth.start();\n\n\t}", "public void showResult(boolean result) {\n\t\tToast.makeText(this, \"The result was: \" + result, Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t}", "private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }", "public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }", "@Override\n\t\t protected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tCameraActivity.setCameraOverlay(result, true);\n\t\t\t\tCameraActivity.taking_picture = false;\n\t\t }", "void onComplete();", "public void onTestSuccess(ITestResult result) {\r\n\t\ttry {\r\n\t\t\t//used to write result details in html\r\n\t\t\tgenerateTestExecution(result);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }", "public void run() {\n\t\t\t\t\t\tif (result!=null){\n\t\t\t\t\t\t\timageview.setImageDrawable(result);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\timageview.setImageResource(R.drawable.icono_ranking);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "protected void end() {\n\t\tRobot.cubeCollector.setCubeCollector(ControlMode.PercentOutput, 0);\n\n\t}", "private void showDisplay() {\n this.display.displayScreen();\n }", "void analysisCompleted();", "public void imFinished() {\n isUserDone = true;\n layoutUserReady.setVisibility(View.VISIBLE);\n\n String userTextToShow = \"\";\n switch (challengeType) {\n case TIME:\n userTextToShow = getString(R.string.user_finished) +\n \"\\n\" +\n getString(R.string.final_distance) +\n (int)((ChallengeSenderFragment)senderFragment).getRun().getTrack().getDistance() +\n getString(R.string.meters);\n break;\n case DISTANCE:\n userTextToShow = getString(R.string.user_completed) +\n challengeGoal + getString(R.string.km) +\n getString(R.string.white_space) + getString(R.string.in) +\n UtilsUI.timeToString((int)((ChallengeSenderFragment)senderFragment).getRun().getDuration(),\n true);\n break;\n }\n userTxt.setText(userTextToShow);\n //noinspection deprecation\n userStatus.setImageDrawable(getResources().getDrawable(R.drawable.finish_icon));\n\n fragmentManager.beginTransaction().remove(senderFragment).commitAllowingStateLoss();\n\n challengeProxy.imFinished();\n\n if (isOpponentDone) {\n isIntendedActivityExit = true;\n endChallenge();\n }\n }", "private void displayProcessedImage(Measurement measurement) {\n DecimalFormat df = new DecimalFormat(\"#0.000\");\n String pupilL_str = df.format(measurement.getPupilLeft()) + \"mm\";\n String pupilR_str = df.format(measurement.getPupilRight()) + \"mm\";\n String diff_str = df.format(measurement.getDifference()) + \"mm\";\n double difference = measurement.getDifference();\n String filepath = measurement.getFilepath();\n Bitmap imgBitmap = translateImgToBitmap(filepath);\n\n textLeftPupil.setText(pupilL_str);\n textRightPupil.setText(pupilR_str);\n textDifference.setText(diff_str);\n if(imgBitmap != null) resultImg.setImageBitmap(imgBitmap);\n\n if(difference > 0.0f) textResult1.setText(\"L > R\");\n if(difference < 0.0f) textResult1.setText(\"L < R\");\n if(difference == 0.0f) textResult1.setText(\"L = R\");\n\n showLayout(resultLayout);\n }", "public void showSuccess() {\n ViewFlipper vf = findViewById(R.id.register_viewFlipper);\n vf.showNext();\n }", "void onPictureCompleted();" ]
[ "0.66124755", "0.6551317", "0.6440604", "0.63673246", "0.6293871", "0.616984", "0.6108688", "0.60680586", "0.599148", "0.5961114", "0.5959931", "0.5959931", "0.5943728", "0.59284085", "0.592348", "0.5890804", "0.588436", "0.58545333", "0.5840926", "0.582503", "0.5810926", "0.5804801", "0.5799999", "0.5792836", "0.5787017", "0.5783913", "0.57748055", "0.5759678", "0.57579035", "0.5753504", "0.5753024", "0.5741707", "0.5740777", "0.5721994", "0.5698485", "0.56929606", "0.5684992", "0.56804913", "0.5672363", "0.56481874", "0.5639864", "0.5639378", "0.5630635", "0.5630545", "0.5626617", "0.56245595", "0.55832607", "0.5581584", "0.5572424", "0.55664384", "0.5558702", "0.55361265", "0.55361265", "0.55300057", "0.5527724", "0.55240786", "0.55139506", "0.5512549", "0.5512101", "0.550882", "0.55080885", "0.5504616", "0.55034035", "0.54993576", "0.5494104", "0.5494091", "0.5491987", "0.54858285", "0.54852885", "0.54830897", "0.54804075", "0.5465438", "0.5463939", "0.54600143", "0.5455358", "0.54524004", "0.544806", "0.5440706", "0.5439094", "0.5438055", "0.5434536", "0.54338676", "0.5432533", "0.5431201", "0.5429488", "0.54252505", "0.5420809", "0.54198205", "0.5416622", "0.54153204", "0.5413924", "0.54089725", "0.5402599", "0.54006785", "0.5399192", "0.5386746", "0.5385088", "0.53775483", "0.53735864", "0.53668696" ]
0.61560154
6
Start detecting in image.
private void detect(Bitmap bitmap) { // Put the image into an input stream for detection. ByteArrayOutputStream output = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, output); ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray()); setAllButtonsEnabledStatus(false); // Start a background task to detect faces in the image. new DetectionTask().execute(inputStream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startDetectFaceInfo() {\n mProgressDialog.show();\n mFaceExecutor.submit(() -> {\n // first begin the face morphing\n FaceImage faceImage = FaceUtils.getFaceFromPath(\n mSelectPath, mImageSize.x, mImageSize.y);\n // each time detect the image, we should send it to the global value\n mFaceImages.set(mCurrentIndex, faceImage);\n // modify the progressDialog\n runOnUiThread(() -> {\n mProgressDialog.dismiss();\n if (faceImage == null) {\n mImageViews.get(mCurrentIndex).setImageResource(R.drawable.ic_head);\n // snakeBarShow can replace Toast\n snakeBarShow(getString(R.string.no_face_detected));\n }\n });\n });\n }", "public void startDetect(){\n\n EventHandle[] start = ECAAgent.getEventHandles(startDetectEventName);\n ECAAgent.raiseEndEvent(start,this);\n }", "public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }", "public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }", "public void identify() {\n // Start detection task only if the image to detect is selected.\n if (detected && mPersonGroupId != null) {\n // Start a background task to identify faces in the image.\n List<UUID> faceIds = new ArrayList<>();\n for (Face face: faces) {\n faceIds.add(face.faceId);\n }\n\n new IdentificationTask(mPersonGroupId).execute(\n faceIds.toArray(new UUID[faceIds.size()]));\n } else {\n // Not detected or person group exists.\n Log.e(LOG_TAG1,\"Please select an image and create a person group first.\");\n doneSignal.countDown();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult detect = mFacePlus.detect(fileSrc);\n//\t\t\t\t\tResult detect = mFacePlus.detectByPicUrl(\"http://a4.att.hudong.com/86/42/300000876508131216423466864_950.jpg\");\n\t\t\t\tif(detect.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + detect.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tDetectReturn data = (DetectReturn) detect.data;\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\tFace face = data.faceList.get(i);\n\t\t\t\t\tfaceid = face.getId();\n\t\t\t\t\tLog.e(TAG,faceid);\n\t\t\t\t}\n\t\t\t}", "public void detect(View view) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new MainActivity.DetectionTask().execute(inputStream);\n\n // Prevent button click during detecting.\n setAllButtonsEnabledStatus(false);\n }", "private void startRecognition() {\n mStatusTextView.setVisibility(View.VISIBLE);\n mStatusTextView.setText(R.string.status_scan_credentials);\n mStatusProgressBar.setVisibility(View.GONE);\n mRescanButton.setVisibility(View.GONE);\n\n mScannerView.setAnimated(true);\n hideMatchView();\n\n mTimeClockBar.setVisibility(View.VISIBLE);\n mTimeClockBar.setProgress(0);\n\n // Start a timeout for the recognition\n startRecognitionTimeout();\n\n mAllPasswords.clear();\n mSSIDMatchCounts.clear();\n mProcessor.setActive(true);\n }", "private void detectAndFrame(final Bitmap imageBitmap) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n ByteArrayInputStream inputStream =\n new ByteArrayInputStream(outputStream.toByteArray());\n\n DetectTask detectTask = new DetectTask();\n\n try{\n ImageView imageView = findViewById(R.id.imageView1);\n Face[] faces = detectTask.execute(inputStream).get();\n if (faces.length == 0){\n Log.d(TAG, \"Detection Failed, nobody is detected\");\n }else{\n imageView.setImageBitmap(\n drawFaceRectanglesOnBitmap(imageBitmap, faces));\n facialID = faces[0].faceId;\n }\n }catch (Exception e){\n Log.d(TAG, e.toString());\n }\n }", "public void startProcessingImage() {\n if (loadBitmap()) {\n this.mImageProcessHelper.start(this.mBitmap);\n }\n }", "public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult recognize = mFacePlus.recognize(groupid_long, fileSrc);\n\t\t\t\tLog.e(TAG,fileSrc);\n//\t\t\t\t\tRecognizeReturn result = (RecognizeReturn) recognize.data;\n\t\t\t\tif(recognize.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + recognize.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tRecognizeReturn data = (RecognizeReturn) recognize.data;\n\t\t\t\t//一张图片里有几张脸\n\t\t\t\tint size = data.faceList.size();\n\t\t\t\tif(size==0){\n\t\t\t\t\tLog.e(TAG,\"图片没能识别出脸\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,\"识别出\"+size+\"张脸\");\n\t\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\t//第i张脸在group中的置信度 ,第0个置信度最高\n\t\t\t\t\tList<Person> personList = data.faceList.get(i).getCandidatePersonList();\n\t\t\t\t\tPerson person = personList.get(0);\n\t\t\t\t\tLog.e(TAG,\"该图片第\"+i+\"张脸最有可能是\"+person.getName());\n\t\t\t\t}\n\t\t\t\tLog.e(TAG,data.toString());\n\t\t\t}", "private void detect(Bitmap bitmap) {\n // Put the image into an input stream for detection.\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);\n ByteArrayInputStream inputStream = new ByteArrayInputStream(output.toByteArray());\n\n // Start a background task to detect faces in the image.\n new DetectionTask().execute(inputStream);\n }", "public List<Result> recognize(IplImage image);", "@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }", "private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }", "public void start() {\n\t\tint pixelNum = 0;\n\n\t\tfor (int y = 0; y < camera.height(); y++) {\n\t\t\tfor (int x = 0; x < camera.width(); x++) {\n\t\t\t\tcamera.setPixel(pixelNum++, trace(camera.shootRay(x, y)));\n\t\t\t}\n\t\t}\n\n\t\tcamera.writePPM();\n\t}", "@Override\r\n\t\t\tpublic void recognizerStarted() {\n\r\n\t\t\t}", "private static native boolean detect_0(long nativeObj, long img_nativeObj, long points_nativeObj);", "private void performOCR(){\n }", "public RecognitionResult recognize(Mat inputImage){\n return recoApp.recognition(inputImage);\n }", "public void run() {\n System.out.println(\"main recognition loop started\");\n while (true) {\n try { \n // ask the recognizer to recognize text in the recording\n if(recognizer.getState()==Recognizer.State.READY) {\n Result result = recognizer.recognize(); \n // got a result\n if (result != null) {\n resultText = result.getBestFinalResultNoFiller();\n if(resultText.length()>0) {\n // System.out.println(\"[\"+result.getStartFrame()+\",\"+result.getEndFrame()+\"]\");\n// System.out.println(result.getTimedBestResult(false, true));\n makeEvent();\n }\n }\n }\n }\n catch (Exception e) { \n System.out.println(\"exception Occured \"); \n e.printStackTrace(); \n System.exit(1);\n }\n }\n }", "private void startEyeTracking() {\n if (!mFaceAnalyser.isTrackingRunning()) {\n mFaceAnalyser.startFaceTracker();\n mUserAwarenessListener.onEyeTrackingStarted(); //notify caller\n }\n }", "private static native void detect_0(long nativeObj, long inputImage_nativeObj, long Bbox_mat_nativeObj, long confidence_mat_nativeObj);", "public void startTracking()\n {\n if(!pixyThread.isAlive())\n {\n pixyThread = new Thread(this);\n pixyThread.start();\n leds.setMode(LEDController.Mode.ON);\n }\n }", "@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "public void recognize(){\n\t String dirOfFace =\".\\\\Faces\";\n\t String dirOfTestFaces =\".\\\\TestFaces\";\n\t \n\t File root = new File(dirOfFace);\n File Testfaces = new File(dirOfTestFaces);\n FilenameFilter imgFilter = new FilenameFilter() {\n\n public boolean accept(File dir, String name) {\n\n name = name.toLowerCase();\n\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n\n }\n\n };\n \n File[] imageFiles = Testfaces.listFiles(imgFilter);\n for (File image : imageFiles) {\n Recognizer fd = new Recognizer();\n int rollno=0;\n rollno = fd.returnPredict(image,root);\n System.out.println(rollno);\n try {\n db.AttendenceTable(rollno);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n\n\n }", "private void startCropImage() {\n }", "public void identify(View view) {\n // Start detection task only if the image to detect is selected.\n if (detected && mPersonGroupId != null) {\n // Start a background task to identify faces in the image.\n List<UUID> faceIds = new ArrayList<>();\n for (Face face: mFaceListAdapter.faces) {\n faceIds.add(face.faceId);\n }\n\n setAllButtonsEnabledStatus(false);\n\n new IdentificationTask(mPersonGroupId).execute(\n faceIds.toArray(new UUID[faceIds.size()]));\n } else {\n // Not detected or person group exists.\n setInfo(\"Please select an image and create a person group first.\");\n }\n }", "@SuppressLint(\"UnsafeExperimentalUsageError\")\n @Override\n public void analyze(@NonNull ImageProxy image_proxy) {\n ArrayList<Recognition> detections = _detector.DetectImage(image_proxy);\n\n // draw the bounding boxes\n _obj_tracker.ObjectTrackerDraw(detections);\n\n image_proxy.close();\n\n }", "public void InitLoadingInRecognition() {\n Point screen = MainView.GetScreenSize();\n // image setting\n int x = (screen.x - LOADING_IMAGE_SIZE.x) >> 1;\n int y = 100;\n this.m_LoadingImage.InitCharacterEx(\n \"recognizerimages\",\n x, y,\n LOADING_IMAGE_SIZE.x,\n LOADING_IMAGE_SIZE.y,\n 255, 1.0f, 0);\n // animation setting\n this.m_LoadingImage.InitAnimation(\n ANIMATION_LOADING_COUNT_MAX,\n ANIMATION_LOADING_FRAME, 0);\n }", "public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }", "@Override\r\n\t\tpublic void process(Mat image) {\n\t\t\tMat thresh = new Mat(), hierarchy = new Mat();\r\n\t\t\tList<MatOfPoint> points = new ArrayList<>();\r\n\t\t\tImgproc.threshold(image, thresh, 200, 255, Imgproc.THRESH_BINARY);\r\n\t\t\tImgproc.findContours(thresh, points, hierarchy, Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_SIMPLE);\r\n//\t\t\tList<MatOfInt> ints = new ArrayList<>();\r\n//\t\t\tImgproc.convexHull(points.get(0), ints.get(0));\r\n\t\t\tImgproc.drawContours(image, points, 1, new Scalar(255, 0, 0));\r\n\t\t\tresult = image;\r\n\t\t\ttry {\r\n\t\t\t\tThread.currentThread().sleep(50);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "public void onDouyinDetectStart() {\n HwAPPStateInfo curAppInfo = getCurStreamAppInfo();\n if (curAppInfo != null && 100501 == curAppInfo.mScenceId) {\n curAppInfo.mIsVideoStart = true;\n }\n }", "@Override\n public FacialLandmarkResult run(Mat frame) {\n return runByDetections(frame, new ResultList<>(Collections.singletonList(\n new ObjectDetectionResult(0, \"face\", 1.0f, 0, 0, frame.size().width(), frame.size().height())\n ))).get(0);\n }", "void startCalibration();", "private AugmentedImage detectMarker(Frame frame) {\n for (AugmentedImage augmentedImage : frame.getUpdatedTrackables(AugmentedImage.class)) {\n if (augmentedImage.getTrackingState() == TrackingState.PAUSED || augmentedImage.getTrackingMethod() == AugmentedImage.TrackingMethod.FULL_TRACKING)\n {\n Log.d(\"SCAN_ACTIVITY_DETECT\", String.valueOf(augmentedImage.getIndex()));\n return augmentedImage;\n }\n }\n return null;\n }", "@Override\n\tprotected void startEverything() {\n\t\ttracker.dropAllTracks();\n\t\tcreateAssistedTracker(maxIterations,4);\n\t\tdistortAlg = new MotionMosaicPointKey<I,T>(trackerModel,fitModel,40,0.3,pruneThreshold,0.8);\n\t\tT initTran = ConvertTransform_F64.convert(createInitialTransform(), fitModel.createInstance());\n\t\tdistortAlg.setInitialTransform(initTran);\n\t\ttotalKeyFrames = 0;\n\t\tmotionRender.clear();\n\n\t\tstartWorkerThread();\n\t}", "private static native boolean detectMulti_0(long nativeObj, long img_nativeObj, long points_nativeObj);", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n callBackService.failed(new Error(e.getMessage(),imageFace.getRequestTake()));\n return null;\n }\n }", "public void processImage(BufferedImage currentCameraImage) {\n isCatDetected = imageService.imageContainsCat(currentCameraImage, 50.0f);\n catDetected(isCatDetected);\n System.out.println(\"=> Debug: processImage: \");\n System.out.println(securityRepository.getAlarmStatus());\n System.out.println(securityRepository.getArmingStatus());\n }", "public static void main(String[] args) {\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\n VideoCapture VC = new VideoCapture();\n if(!VC.open(0)) {\n System.out.println(\"Open Video Error\");\n }\n while (true){\n Mat img = new Mat();\n if(!VC.read(img)){\n return;\n }\n Mat rgb = new Mat();\n Mat gray = new Mat();\n Imgproc.cvtColor(img,rgb,Imgproc.COLOR_BGRA2RGB);\n Imgproc.cvtColor(rgb,gray,Imgproc.COLOR_BGR2GRAY);\n CascadeClassifier CC = new CascadeClassifier(\"E:/2020/opencv/opencv/build/etc/haarcascades/haarcascade_frontalface_default.xml\");\n MatOfRect rect = new MatOfRect();\n CC.detectMultiScale(gray,rect);\n for(Rect r : rect.toArray()){\n Imgproc.rectangle(img,new Point(r.x,r.y),new Point(r.x + r.width,r.y + r.height),new Scalar(255,0,0));\n }\n HighGui.imshow(\"imshow\",img);\n HighGui.waitKey(10);\n }\n }", "private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }", "public void startCamera() throws SQLException {\n\n\t\tif (!database.init()) {\n\n\t\t\tgui.putOnLog(\"Error: Database Connection Failed ! \");\n\t\t} else {\n\t\t\tisDBready = true;\n\t\t\tgui.putOnLog(\"Success: Database Connection Succesful ! \");\n\t\t}\n\n\t\t// *******************************************************************************************\n\n\t\tif (isDBready) {\n\t\t\tgui.getRecogniseBtn().setEnabled(true);\n\t\t\tgui.getSaveBtn().setEnabled(true);\n\t\t}\n\n\t\tfillListOfFaceImages();\n\n\t\tif (FOLDER.isDirectory()) {\n\t\t\tfor (final File f : FOLDER.listFiles()) {\n\t\t\t\tBufferedImage img = null;\n\t\t\t\ttry {\n\t\t\t\t\timg = ImageIO.read(f);\n\t\t\t\t\tImageIcon imageIcon = new ImageIcon(img);\n\t\t\t\t\tImage image = imageIcon.getImage();\n\t\t\t\t\tImage newimg = image.getScaledInstance(80, 80, java.awt.Image.SCALE_SMOOTH);\n\t\t\t\t\timageIcon = new ImageIcon(newimg);\n\t\t\t\t\tJLabel label = new JLabel(imageIcon);\n\t\t\t\t\tgui.tile.add(label);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tgui.putOnLog(\"Real Time WebCam Stream Started !\");\n\t\ttheFaceDetector.start();\n\t\t// **********************************************************************************************\n\t}", "@Override\n public void start() {\n //start eye tracking if it is not running already\n startEyeTracking();\n\n super.start();\n\n //start light sensor\n mLightIntensityManager.startLightMonitoring();\n }", "private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }", "@Override\r\n\t\tpublic void run() {\r\n\t\t\t/* face detector only needs grayscale image */\r\n\t\t\tgrayToRgb(graybuff_,rgbs_);\t\t\t\t\t\t\t\t\t\t// jni method\r\n//\t\t\tgray8toRGB32(graybuff_,previewWidth_,previewHeight_,rgbs);\t\t// java method\r\n\t\t\tfloat aspect = (float)previewHeight_/(float)previewWidth_;\r\n\t\t\tint w = prevSettingWidth_;\r\n\t\t\tint h = (int)(prevSettingWidth_*aspect);\r\n\t\t\tfloat xScale = (float)previewWidth_/(float)prevSettingWidth_;\r\n\t\t\tfloat yScale = (float)previewHeight_/(float)prevSettingHeight_;\r\n\t\t\tBitmap bmp = Bitmap.createScaledBitmap(\r\n\t\t\t\t\t\tBitmap.createBitmap(rgbs_,previewWidth_,previewHeight_,Bitmap.Config.RGB_565),\r\n\t\t\t\t\t\tw,h,false);\r\n//\t\t\tLog.i(TAG,\"downscale w=\"+bmp.getWidth()+\",h=\"+bmp.getHeight());\r\n\t\t\tint prevfound=0,trackfound=0;\r\n\t\t\tfor(int i=0; i<MAX_FACE; i++){\r\n\t\t\t\tFaceResult face = faces_[i];\r\n\t\t\t\tfloat eyedist = face.eyesDistance();\r\n\t\t\t\tif(eyedist==0.0f)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tPointF midEyes = new PointF(); \r\n\t\t\t\tface.getMidPoint(midEyes);\r\n\t\t\t\tprevfound++;\r\n\t\t\t\tPointF lt = new PointF(midEyes.x-eyedist*2.5f,midEyes.y-eyedist*2.5f);\r\n\t\t\t\tRect rect = new Rect((int)(lt.x),(int)(lt.y),(int)(lt.x+eyedist*5.0f),(int)(lt.y+eyedist*5.0f));\r\n\t\t\t\t/* fix to fit */\r\n\t\t\t\trect.left = rect.left < 0 ? 0 : rect.left;\r\n\t\t\t\trect.right = rect.right > w ? w : rect.right;\r\n\t\t\t\trect.top = rect.top < 0 ? 0 : rect.top;\r\n\t\t\t\trect.bottom = rect.bottom > h ? h : rect.bottom;\r\n\t\t\t\tif(rect.left >= rect.right || rect.top >= rect.bottom )\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t/* crop */\r\n\t\t\t\tBitmap facebmp = Bitmap.createBitmap(bmp,rect.left,rect.top,rect.width(),rect.height());\r\n\t\t\t\tFaceDetector.Face[] trackface = new FaceDetector.Face[1];\r\n\t\t\t\tFaceDetector tracker = new FaceDetector( facebmp.getWidth(),facebmp.getHeight(),1); \r\n\t\t\t\tint found = tracker.findFaces(facebmp, trackface);\r\n\t\t\t\tif(found!=0){\r\n\t\t\t\t\tPointF ptTrack = new PointF();\r\n\t\t\t\t\ttrackface[0].getMidPoint(ptTrack);\r\n\t\t\t\t\tptTrack.x += (float)rect.left;\r\n\t\t\t\t\tptTrack.y += (float)rect.top;\r\n\t\t\t\t\tptTrack.x *= xScale;\r\n\t\t\t\t\tptTrack.y *= yScale;\r\n\t\t\t\t\tfloat trkEyedist = trackface[0].eyesDistance()*xScale;\r\n\t\t\t\t\tfaces_[i].setFace(ptTrack,trkEyedist);\r\n\t\t\t\t\ttrackfound++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(prevfound==0||prevfound!=trackfound){\r\n\t\t\t\tFaceDetector.Face[] fullResults = new FaceDetector.Face[MAX_FACE];\r\n\t\t\t\tfdet_.findFaces(bmp, fullResults);\r\n\t\t\t\t/* copy result */\r\n\t\t\t\tfor(int i=0; i<MAX_FACE; i++){\r\n\t\t\t\t\tif(fullResults[i]==null)\r\n\t\t\t\t\t\tfaces_[i].clear();\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tPointF mid = new PointF();\r\n\t\t\t\t\t\tfullResults[i].getMidPoint(mid);\r\n\t\t\t\t\t\tmid.x *= xScale;\r\n\t\t\t\t\t\tmid.y *= yScale;\r\n\t\t\t\t\t\tfloat eyedist = fullResults[i].eyesDistance()*xScale;\r\n\t\t\t\t\t\tfaces_[i].setFace(mid,eyedist);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/* post message to UI */\r\n\t\t\thandler_.post(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\toverlayLayer_.postInvalidate();\r\n\t\t\t\t\t// turn off thread lock\r\n\t\t\t\t\tisThreadWorking_ = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "public void startFrontCam() {\n }", "@Override\n public void onImage(CameraKitImage cameraKitImage) {\n mBitmap = cameraKitImage.getBitmap();\n mBitmap = Bitmap.createScaledBitmap(mBitmap, mCameraView.getWidth(), mCameraView.getHeight(), false);\n mCameraView.stop();\n if (mDevice)\n //Make text recognition on device\n runTextRecognition(mBitmap);\n else\n //Make text recognition on cloud\n runCloudTextRecognition(mBitmap);\n\n }", "public void startImage() {\r\n\t\tm_blocks = new Vector<BlockList>();\r\n\t\tm_feature.clear();\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tBlockList blockList = new BlockList();\r\n\t\t\tm_blocks.add(blockList);\r\n\t\t}\r\n\t}", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try{\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n publishProgress(e.getMessage());\n return null;\n }\n }", "DetectionResult getObjInImage(Mat image);", "public void InitiateSegmentation()\n\t{\n\t\ti1.setOverlay(null);\n\t\ti1.killRoi();\n\t\tToolbar Tb = Toolbar.getInstance();\n\t\tTb.setTool(Toolbar.HAND);\n\n\n\t\tif (i1.getType() != i1.GRAY8) {\n\t\t\tIJ.error(\"Sorry, this plugin currently works with 8bit grey scale images!\");\n\t\t\tdispose();\n\t\t\treturn;\n\t\t}\n\n\n\t\tImageStack stack1 = i1.getStack();\n\t\tpopSequence = new BalloonSequence(i1);\n\t\tcurrentStage = new int[i1.getStackSize()];\n\t\tIJ.showStatus(\"Loading\");\n\t\tIJ.showProgress(0.0);\n\n\t\tfor (int i=0; i<i1.getStackSize();i++){\n\t\t\tIJ.showProgress( ((double)i)/((double)i1.getStackSize()) );\n\t\t\tIJ.showStatus(\"Slice/Image-file: \" + i + \"/\" +\n\t\t\t\t\ti1.getStackSize()) ;\n\t\t\tInitiateImageData (3, i+1);\n\t\t\tif (ipWallSegment != null)\n\t\t\t{\n\t\t\t\tipWallSegment.setProgressBar(null);\n\t\t\t\t// Initiate the population\n\t\t\t\tpopSequence.setSequence(i, ipWallSegment, 3);\n\t\t\t}\n\t\t}\n\t\tIJ.showStatus(\"\");\n\t\tIJ.showProgress(1.0);\n\t\t//IJ.run(\"Close\");\n\t\tcurrentSlice = i1.getCurrentSlice();\n\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\tpop = popSequence.PopList[currentSlice-1];\n\t}", "void startCapturing() {\n //YOUR CODE HERE\n\t if (hasCaptured() == false) {\n\t\t pieceCaptured = true;\n\t }\n }", "protected void execute() {\n\t\tBBox bBox = bBoxLocator.getBBox();\n\t\tSmartDashboard.putBoolean(\"Can See With Vision\", wasDetected);\n\n\t\tif (bBox != null) {\n\t\t\twasDetected = true;\n\t\t\tpidAngle.setSetpoint(Robot.drivetrain.getHeading() + bBox.angleDeg);\n\t\t\tSmartDashboard.putNumber(\"PID Vision Setpoint Angle\", pidAngle.getSetpoint());\n\t\t}\n\n\t\tif (!waitForVision || wasDetected) {\n\t\t\tRobot.drivetrain.drive(driveOutput * (useAccelerationFiler ? filter.output() : 1), driveCurve);\n\t\t}\n\t}", "public void startTracking()\n\t{\t\n\t\tProcessBuilder starterProcess = new ProcessBuilder(\"ssh\", \n\t\t\t\t\t\t\t\t\t\t\"pi@\" + RASPBERRY_PI_LOCATION,\n\t\t\t\t\t\t\t\t\t\t\"\\\"sudo /home/pi/code/stop_vision.sh && /home/pi/code/start_vision.sh \" + \n\t\t\t\t\t\t\t\t\t\tFPS + \" \" + \n\t\t\t\t\t\t\t\t\t\tIMAGE_WIDTH + \"x\" + IMAGE_HEIGHT + \"\\\"\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tstarterProcess.start();\n\t\t\ttracking = true;\n\t\t\tSystem.out.println(\"Started vision tracking on Pi\");// + startedProcess + \" (Error:\" + startedProcess.getErrorStream() + \")\");\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"Could not start process to commence Raspberry Pi GRIP program: \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void start() {\r\n\t\tif (animationFigure instanceof TrainFigure) {\r\n\t\t\t((TrainFigure) animationFigure).setBusyColor(org.eclipse.draw2d.ColorConstants.red);\r\n\t\t}\r\n\t\tcounter = 1;\r\n\t\t//notify Listeners\r\n\t\tanimationFigure.notifyAnimationListener(new AnimationStartedEvent(animationFigure, AnimationStartedEvent.BUSY_STARTED));\r\n\t\tthis.stopped=false;\r\n\t\tmap.getDisplay().asyncExec(this);\r\n\t}", "void imReady();", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try{\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n false, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n null);\n } catch (Exception e) {\n Log.e(LOG_TAG1,\"error in background in DetectionTask\");\n doneSignal.countDown();\n return null;\n }\n }", "public void doAutoDetect()\r\n {\r\n Graphics g = this.getGraphics(); \r\n // Create the off-screen drawing area\r\n offscreenImage = createImage(getWidth(), getHeight());\r\n offscreenGraphics = offscreenImage.getGraphics();\r\n long start;\r\n long end;\r\n\r\n // Tally the number of times we were able to draw direct and buffered\r\n int directCount = 0;\r\n int bufferedCount = 0;\r\n\r\n g.setColor(getBackground());\r\n // Mark what time we started\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns directly to the screen, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(g);\r\n end = System.currentTimeMillis();\r\n directCount++;\r\n }\r\n g.setColor(getForeground());\r\n\r\n // record the total time spent drawing directly\r\n long directTime = end - start;\r\n\r\n start = System.currentTimeMillis();\r\n end = start;\r\n\r\n // Paint patterns to the offscreen graphics, but only for 500 milliseconds\r\n while ((end-start) < 500) {\r\n paintDetectionDesign(offscreenGraphics);\r\n end = System.currentTimeMillis();\r\n bufferedCount++;\r\n }\r\n\r\n long bufferedTime = end - start;\r\n\r\n // If we were able to draw more times using the buffered graphics,\r\n // or if the drawing counts are the same, but the total time for\r\n // the buffering was less, buffering is faster.\r\n if ((bufferedCount > directCount) ||\r\n ((bufferedCount == directCount) &&\r\n (bufferedTime < directTime))) {\r\n drawDirect = false;\r\n } else {\r\n // If we want to draw direct, free the space taken up by the\r\n // offscreen image and graphics context.\r\n offscreenImage.flush();\r\n offscreenImage = null;\r\n offscreenGraphics = null;\r\n drawDirect = true;\r\n }\r\n }", "public void startGearCam() {\n }", "public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}", "public static void main(String[] args) {\n\t\tString datasource=trainer();\n\t\tMat testImage2=new Mat();\n\t\t\n\t\t// VideoCapture capture = new VideoCapture(0);\n\t//\topencv_imgproc.cvtColor(testImage2,testImage2,Imgproc.COLOR_GRAY2RGB);\n \n // Mat testImage = imread(\"C:\\\\Users\\\\Nikki singh\\\\Downloads\\\\nikki's_sample\\\\nikki#1_6.png\", IMREAD_GRAYSCALE); //THIS S STATIC FUNCTION\n\n File root = new File(datasource);\n\n FilenameFilter imgFilter = new FilenameFilter() {\n public boolean accept(File dir, String name) {\n name = name.toLowerCase();\n return name.endsWith(\".jpg\") || name.endsWith(\".pgm\") || name.endsWith(\".png\");\n }\n };\n\n File[] imageFiles = root.listFiles(imgFilter);\n\n MatVector images = new MatVector(imageFiles.length);\n\n Mat labels = new Mat(imageFiles.length, 1, CV_32SC1);\n IntBuffer labelsBuf = labels.createBuffer();\n //System.out.println(labelsBuf.arrayOffset());\n int counter = 0;\n for (File image : imageFiles) {\n Mat img =imread(image.getAbsolutePath(),IMREAD_GRAYSCALE);\n // Imgproc.resize(img, img, new Size(500,500)); //WE WILL SORT IT OUT LATER\n System.out.println(image.getName().replace(\".png\", \"\"));\n int label = Integer.parseInt(image.getName().replace(\".png\", \"\").split(\"#\")[1].split(\"_\")[0]);\n\n images.put(counter, img);\n \n labelsBuf.put(counter, label);\n\n counter++;\n }\n // System.out.println(labelsBuf.asReadOnlyBuffer().arrayOffset());\n // FaceRecognizer faceRecognizer = FisherFaceRecognizer.create();\n // FaceRecognizer faceRecognizer = EigenFaceRecognizer.create();\n FaceRecognizer faceRecognizer = LBPHFaceRecognizer.create();\n\n faceRecognizer.train(images, labels);\n test(faceRecognizer);\n \n\t}", "@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }", "private native int applyFaceDetection2(byte[] data,int len,int width,int height);", "public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }", "public native final void startPreview();", "@Override\n public void run(){\n store.phaser.arriveAndAwaitAdvance();\n //System.out.println(Thread.currentThread().getName() + \" is started.\");\n for(int y = startLine; y < endLine; y++){\n for(int x = 0; x < store.image.getWidth(); x++){\n Color c = new Color(store.image.getRGB(x, y));\n int grayScale = (int) ((c.getRed() * 0.299) + (c.getGreen() * 0.587) + (c.getBlue() * 0.114));\n Color newColor = new Color(grayScale, grayScale, grayScale);\n store.image.setRGB(x, y, newColor.getRGB());\n }\n }\n store.phaser.arriveAndAwaitAdvance();\n }", "void onCaptureStart();", "private void setUiAfterDetection(Face[] result, boolean succeed, int checkImage) {\n\n // Detection is done, hide the progress dialog.\n mProgressDialog.dismiss();\n\n // Enable all the buttons.\n setAllButtonsEnabledStatus(true);\n\n // Disable button \"detect\" as the image has already been detected.\n setShareButtonsEnabledStatus(false);\n setShowButtonsEnabledStatus(false);\n if (checkImage == 0) {\n if (succeed) {\n check = 1;\n // The information about the detection result.\n if (result.length != 0) {\n face1 = result;\n foundFace1 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_0);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap1, result, true));\n genderFace1 = face1[0].faceAttributes.gender.startsWith(\"male\") ? 0 : 1;\n }\n }\n } else {\n if (succeed) {\n // The information about the detection result.\n check = 0;\n if (result.length != 0) {\n face2 = result;\n foundFace2 = true;\n // Show the detected faces on original image.\n ImageView imageView = (ImageView) findViewById(R.id.image_1);\n imageView.setImageBitmap(ImageHelper.drawFaceRectanglesOnBitmap(\n mBitmap2, result, true));\n\n }\n }\n checkInputImage(face1, face2);\n count = 0;\n }\n }", "protected Mat detect(Mat gray, Mat rgba) {\n \n if (MainInterface.DEBUG_FRAME_LOGGING)\n log.pushTimer(this, \"frame\");\n contours.clear();\n contoursAll.clear();\n markerCandidates = new ArrayList<Marker>();\n \n if (USE_CANNY) {\n // best\n Imgproc.Canny(gray, out, BINARY_THRESHOLD - 50, BINARY_THRESHOLD + 50);\n } else if (USE_ADAPTIVE) {\n // speed: ~88ms\n Imgproc.adaptiveThreshold(gray, out, 255,\n Imgproc.ADAPTIVE_THRESH_MEAN_C,\n Imgproc.THRESH_BINARY, 7, 7);\n } else {\n // Standard\n // Speed: ~8ms\n Imgproc.threshold(gray, out, BINARY_THRESHOLD, 255, Imgproc.THRESH_BINARY);\n }\n \n if (DEBUG_PREP_FRAME)\n return out;\n \n // Speed: ~22ms\n Imgproc.findContours(out, contoursAll, new Mat(),\n Imgproc.RETR_LIST,\n Imgproc.CHAIN_APPROX_NONE);\n \n // Remove too small contours:\n // Speed: ~0ms\n for (MatOfPoint contour : contoursAll) {\n if (contour.total() <= 300)\n continue;\n contours.add(contour);\n }\n \n compositeFrameOut = rgba;\n \n // DEBUG_LOGGING\n if (DEBUG_CONTOURS) {\n Imgproc.drawContours(compositeFrameOut, contours, -1, new Scalar(255, 0, 0), 2);\n return compositeFrameOut;\n }\n \n // Do candidate processing:\n // Speed: ~100ms for one marker (+- 50ms)\n for (MatOfPoint contour : contours) {\n MatOfPoint2f input = new MatOfPoint2f(contour.toArray());\n // speed: ~2ms\n Imgproc.approxPolyDP(input, result, input.total() * 0.10,\n true);\n // Only take contours with ==4 points\n // speed: ~1ms\n if (result.total() != 4 || !Imgproc.isContourConvex(new\n MatOfPoint(result.toArray()))) {\n continue;\n }\n // Calculate perspective transform\n // speed: ~0ms\n Mat tempPerspective = Imgproc.getPerspectiveTransform(result,\n standardMarker);\n // Apply to get marker texture\n // speed: ~12ms\n Imgproc.warpPerspective(rgba, out, tempPerspective,\n new Size(MARKER_SIZE, MARKER_SIZE));\n // Check if marker\n // speed: ~9ms (range: 5ms to 30ms!)\n Marker mark = isMarker(result, out);\n if (mark == null)\n continue;\n // Save area\n int area = (int) Imgproc.contourArea(contour);\n mark.setArea(area);\n // Save marker candidate\n markerCandidates.add(mark);\n }\n \n // Remove double markers that arise from using Canny or adaptive\n // threshold (inside & outside contour are found,\n // we remove inside to keep only one contour)\n ArrayList<Marker> toRemove = new ArrayList<Marker>();\n for (int i = 0; i < markerCandidates.size(); i++) {\n Marker mark = markerCandidates.get(i);\n for (int j = i + 1; j < markerCandidates.size(); j++) {\n Marker two = markerCandidates.get(j);\n if (!markersClose(mark, two))\n continue;\n if (mark.getArea() > two.getArea())\n toRemove.add(two);\n else\n toRemove.add(mark);\n }\n }\n for (Marker mark : toRemove)\n markerCandidates.remove(mark);\n \n // Now calculate the perspective transform for all markers:\n // Speed: ~2ms per detected marker\n for (Marker marker : markerCandidates) {\n Calib3d.solvePnP(objectPoints, marker.getCorners(), camMatrix,\n distCoeff, Rvec, Tvec);\n // Now to convert from OpenCV to OpenGL coordinates:\n // Convert rotation:\n Rvec.put(0, 1, Rvec.get(1, 0)[0] * -1.0f);\n Rvec.put(0, 2, Rvec.get(2, 0)[0] * -1.0f);\n // Calculate rotation matrix:\n Calib3d.Rodrigues(Rvec, rotMat);\n // Build OpenGL ready matrix:\n float[] translation = new float[]{\n (float) rotMat.get(0, 0)[0], (float) rotMat.get(1, 0)[0],\n (float) rotMat.get(2, 0)[0], 0.0f,\n (float) rotMat.get(0, 1)[0], (float) rotMat.get(1, 1)[0],\n (float) rotMat.get(2, 1)[0], 0.0f,\n (float) rotMat.get(0, 2)[0], (float) rotMat.get(1, 2)[0],\n (float) rotMat.get(2, 2)[0], 0.0f,\n (float) Tvec.get(0, 0)[0], -(float) Tvec.get(1, 0)[0],\n -(float) Tvec.get(2, 0)[0], 1.0f\n };\n \n marker.setRotTranslation(translation);\n }\n \n if (DEBUG_POLY) {\n ArrayList<MatOfPoint> temp = new ArrayList<MatOfPoint>();\n for (Marker mark : markerCandidates) temp.add(mark.getMOPCorners());\n Core.polylines(compositeFrameOut, temp, true, new Scalar(255, 0, 0), 2);\n }\n \n if ((DEBUG_DRAW_MARKERS || DEBUG_DRAW_MARKER_ID) && !markerCandidates\n .isEmpty()) {\n int RENDER_SCALE = 3;\n if (DEBUG_DRAW_MARKERS) {\n int count = 0;\n for (Marker mark : markerCandidates) {\n Mat tempText = mark.grayTexture;\n // Might, but shouldn't be null\n if (tempText == null) {\n log.debug(TAG, \"DEBUG_DRAW_MARKERS: Texture NULL!\");\n continue;\n }\n int xoffset = RENDER_SCALE * MARKER_SIZE * count;\n count++;\n for (int i = 0; i < RENDER_SCALE * MARKER_SIZE; i++)\n for (int j = 0; j < RENDER_SCALE * MARKER_SIZE; j++) {\n compositeFrameOut.put(i, xoffset + j,\n tempText.get(i / RENDER_SCALE,\n j / RENDER_SCALE));\n }\n }\n }\n if (DEBUG_DRAW_MARKER_ID) {\n int count = 0;\n for (Marker mark : markerCandidates) {\n boolean[][] tempBool = mark.getPattern();\n // Might, but shouldn't happen\n if (tempBool == null) {\n log.debug(TAG, \"DEBUG_DRAW_MARKER_ID: Pattern NULL!\");\n continue;\n }\n int yoffset = RENDER_SCALE * MARKER_SIZE *\n (DEBUG_DRAW_MARKERS ? 1 : 0);\n int xoffset = RENDER_SCALE * MARKER_SIZE * count;\n count++;\n for (int i = 0; i < RENDER_SCALE * MARKER_SIZE; i++)\n for (int j = 0; j < RENDER_SCALE * MARKER_SIZE; j++) {\n int x = i / MARKER_SQUARE / RENDER_SCALE,\n y = j / MARKER_SQUARE / RENDER_SCALE;\n if (x == 0 || y == 0 || x == MARKER_GRID - 1 || y ==\n MARKER_GRID - 1)\n compositeFrameOut.put(yoffset + i, xoffset + j,\n BLACK);\n else\n compositeFrameOut.put(yoffset + i, xoffset + j,\n tempBool[x - 1][y - 1] ?\n WHITE : BLACK);\n }\n }\n }\n }\n \n if (MainInterface.DEBUG_FRAME_LOGGING) {\n TimerResult timer = log.popTimer(this);\n log.debug(TAG, \"Detected \" + markerCandidates.size() + \" markers \" +\n \"in \" + timer.time + \"ms.\");\n }\n \n // Pass detected markers up\n mainInterface.updateList(markerCandidates);\n \n // Return frame (only used in frame debugging mode)\n return compositeFrameOut;\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[]{\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n\n\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\t\n\t\tthis.alternarImagens();\n\t\t\n\t\t\n\t}", "@Override\n public void init() {\n startCamera();\n }", "void trackFilteredObject(com.ilos.wiser.ILOSDataCollection.Object theObject, Mat threshold, Mat HSV, Mat cameraFeed, String colour, int counter) {\n ArrayList<com.ilos.wiser.ILOSDataCollection.Object> Objects = new ArrayList<>();\n Mat temp = new Mat();\n threshold.copyTo(temp);\n //Contours track the edges of the binary image\n List<MatOfPoint> contours = new ArrayList<>();\n Mat hierarchy = new Mat();\n boolean redFound = false;\n boolean blueFound = false;\n //Copies contours to the list contours\n Imgproc.findContours(temp,contours,hierarchy,Imgproc.RETR_EXTERNAL,Imgproc.CHAIN_APPROX_SIMPLE);\n boolean objectFound = false;\n if (!hierarchy.empty()) {\n for (int i = 0; i >=0; i = (int)hierarchy.get(i, 0)[1]) {\n MatOfPoint contour = contours.get(i);\n Moments moment = Imgproc.moments(contour);\n double area = moment.m00;\n if(area > MIN_AREA) {\n com.ilos.wiser.ILOSDataCollection.Object object = new com.ilos.wiser.ILOSDataCollection.Object(counter);\n //sets fields for the object based on the moment class\n object.setXPos(moment.m10/area);\n object.setYPos(moment.m01/area);\n object.type = theObject.type;\n object.colour = theObject.colour;\n //Tags if each object has been found to track how long it has been off screen for\n if(object.colour == new Scalar(255,0,0)){\n redFound = true;\n }\n if(object.colour == new Scalar(0,255,0)){\n blueFound = true;\n }\n //Appends a list of the object that are seen on the current frame\n Objects.add(object);\n\n objectFound = true;\n\n }else {objectFound = false;}\n }\n if(!redFound){\n if(redStart==1) {\n redStart = System.currentTimeMillis();\n }\n else{\n redEnd = System.currentTimeMillis();\n }\n if(redStart!=1 && redEnd!=0) {\n redGone = redEnd - redStart;\n if(redGone > 300) {\n System.out.println(\"RED OFF SCREEN: \" + redGone);\n }\n redStart = 1;\n redEnd = 0;\n }\n\n }\n if(!blueFound){\n if(blueStart==1) {\n blueStart = System.currentTimeMillis();\n }\n else{\n blueEnd = System.currentTimeMillis();\n }\n if(blueStart!=1 && blueEnd!=0) {\n blueGone = blueEnd - blueStart;\n if(blueGone > 300) {\n System.out.println(\"BLUE OFF SCREEN\" + blueGone);\n }\n blueStart = 1;\n blueEnd = 0;\n }\n }\n if(objectFound == true && collectData) {\n //This does all of the highlighting of the circles on the scren\n drawObject(Objects, mRgba, temp, contours, hierarchy);\n }\n //If collection is finished\n if(!collectData && redList.size()>0 && blueList.size()>0){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n coordText.setText(\"Press back to select a new path!\");\n }\n });\n }\n }\n }", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "public void start() {\n this.f3567pI.start();\n }", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n if (!BoardUtils.isSameBoard(CurrentData.REAL.board, CurrentData.CALCULATED.board)) {\n this.boardChangeDetected++;\n if (this.boardChangeDetected == 3) {\n throw new UnexpectedBoardChangeException(\"找到变动!\");\n }\n }\n CurrentData.REAL.reset();\n QQRobot.findTetromino(RGB_MY_SPACE, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks, 5);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n boolean valid = false;\n if (CurrentData.REAL.tetromino.isValid()) {\n if (CurrentData.REAL.nextBlocks[1] == null) {\n this.missingFutures++;\n if (this.missingFutures == 3) {\n throw new NoFuturesFoundException(\"没找到预知块!\");\n }\n } else {\n valid = true;\n }\n } else {\n this.missingTetromino++;\n if (this.missingTetromino == 2000 / this.delayMillis) {\n throw new NoTetrominoFoundException(\"没找到游戏块!\");\n }\n }\n if (valid) {\n return true;\n } else {\n return false;\n }\n }", "public void runAlgorithm() {\r\n \r\n // Algorithm to determine the outer abdominal and inner subcutaneous boundary \r\n if (!initializedFlag) {\r\n init();\r\n }\r\n if (!initializedFlag) {\r\n return;\r\n }\r\n \r\n if (srcImage.getNDims() == 2) {\r\n calc2D();\r\n \r\n } else if (srcImage.getNDims() == 3) {\r\n calc25D();\r\n \r\n }\r\n\r\n ViewUserInterface.getReference().getMessageFrame().append(\"directory: \" +imageDir+\"\\n\", ViewJFrameMessage.DEBUG);\r\n \r\n \tViewJFrameImage frame = new ViewJFrameImage(srcImage);\r\n \tsrcImage.unregisterAllVOIs();\r\n \tsrcImage.registerVOI(abdomenVOI);\r\n \tsrcImage.registerVOI(subcutaneousVOI);\r\n \tframe.saveAllVOIsTo(imageDir);\r\n \t\r\n \tframe.dispose();\r\n \r\n }", "@Override\n public StartPiiEntitiesDetectionJobResult startPiiEntitiesDetectionJob(StartPiiEntitiesDetectionJobRequest request) {\n request = beforeClientExecution(request);\n return executeStartPiiEntitiesDetectionJob(request);\n }", "public boolean detect(Mat img, Mat points) {\n return detect_0(nativeObj, img.nativeObj, points.nativeObj);\n }", "private void startScan()throws Exception {\n\t\t//System.out.println(\"locking until \"+endCharOffset);\n\t\tif(provideFeedback)\n\t\t\tdocument.setCharacterAttributes(0,endCharOffset,locked,false);\n\t\t\n\t\tstatus.setForeground(Color.green);\n\t\tstatus.setText(\"processing input ...\");\n\t\tstatus.setEnabled(true);\n\t\t\n\t\t//System.out.println(\"Starting thread \"+Thread.currentThread().getName());\t\t\t\n\t}", "public void vision()\n {\n NIVision.IMAQdxGrab(session, colorFrame, 1);\t\t\t\t\n RETRO_HUE_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro hue min\", RETRO_HUE_RANGE.minValue);\n\t\tRETRO_HUE_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro hue max\", RETRO_HUE_RANGE.maxValue);\n\t\tRETRO_SAT_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro sat min\", RETRO_SAT_RANGE.minValue);\n\t\tRETRO_SAT_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro sat max\", RETRO_SAT_RANGE.maxValue);\n\t\tRETRO_VAL_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro val min\", RETRO_VAL_RANGE.minValue);\n\t\tRETRO_VAL_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro val max\", RETRO_VAL_RANGE.maxValue);\n\t\tAREA_MINIMUM = SmartDashboard.getNumber(\"Area min %\");\n\t\t//MIN_RECT_WIDTH = SmartDashboard.getNumber(\"Min Rect Width\", MIN_RECT_WIDTH);\n\t\t//MAX_RECT_WIDTH = SmartDashboard.getNumber(\"Max Rect Width\", MAX_RECT_WIDTH);\n\t\t//MIN_RECT_HEIGHT = SmartDashboard.getNumber(\"Min Rect Height\", MIN_RECT_HEIGHT);\n\t\t//MAX_RECT_HEIGHT= SmartDashboard.getNumber(\"Max Rect Height\", MAX_RECT_HEIGHT);\n\t\t\n\t\t//SCALE_RANGE.minValue = (int)SmartDashboard.getNumber(\"Scale Range Min\");\n\t\t//SCALE_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Scale Range Max\");\n\t\t//MIN_MATCH_SCORE = (int)SmartDashboard.getNumber(\"Min Match Score\");\n //Look at the color frame for colors that fit the range. Colors that fit the range will be transposed as a 1 to the binary frame.\n\t\t\n\t\tNIVision.imaqColorThreshold(binaryFrame, colorFrame, 255, ColorMode.HSV, RETRO_HUE_RANGE, RETRO_SAT_RANGE, RETRO_VAL_RANGE);\n\t\t//Send the binary image to the cameraserver\n\t\tif(cameraView.getSelected() == BINARY)\n\t\t{\n\t\t\tCameraServer.getInstance().setImage(binaryFrame);\n\t\t}\n\n\t\tcriteria[0] = new NIVision.ParticleFilterCriteria2(NIVision.MeasurementType.MT_AREA_BY_IMAGE_AREA, AREA_MINIMUM, 100.0, 0, 0);\t\t\n\t\t\n NIVision.imaqParticleFilter4(binaryFrame, binaryFrame, criteria, filterOptions, null);\n\n // NIVision.RectangleDescriptor rectangleDescriptor = new NIVision.RectangleDescriptor(MIN_RECT_WIDTH, MAX_RECT_WIDTH, MIN_RECT_HEIGHT, MAX_RECT_HEIGHT);\n// \n// //I don't know\n// NIVision.CurveOptions curveOptions = new NIVision.CurveOptions(NIVision.ExtractionMode.NORMAL_IMAGE, 0, NIVision.EdgeFilterSize.NORMAL, 0, 1, 1, 100, 1,1);\n// NIVision.ShapeDetectionOptions shapeDetectionOptions = new NIVision.ShapeDetectionOptions(1, rectAngleRanges, SCALE_RANGE, MIN_MATCH_SCORE);\n// NIVision.ROI roi = NIVision.imaqCreateROI();\n//\n// NIVision.DetectRectanglesResult result = NIVision.imaqDetectRectangles(binaryFrame, rectangleDescriptor, curveOptions, shapeDetectionOptions, roi);\n// //Dummy rectangle to start\n// \n// NIVision.RectangleMatch bestMatch = new NIVision.RectangleMatch(new PointFloat[]{new PointFloat(0.0, 0.0)}, 0, 0, 0, 0);\n// \n// //Find the best matching rectangle\n// for(NIVision.RectangleMatch match : result.array)\n// {\n// \tif(match.score > bestMatch.score)\n// \t{\n// \t\tbestMatch = match;\n// \t}\n// }\n// SmartDashboard.putNumber(\"Rect height\", bestMatch.height);\n// SmartDashboard.putNumber(\"Rect Width\", bestMatch.width);\n// SmartDashboard.putNumber(\"Rect rotation\", bestMatch.rotation);\n// SmartDashboard.putNumber(\"Rect Score\", bestMatch.score);\n \n //Report how many particles there are\n\t\tint numParticles = NIVision.imaqCountParticles(binaryFrame, 1);\n\t\tSmartDashboard.putNumber(\"Masked particles\", numParticles);\n\t\t\n \n\t\tif(numParticles > 0)\n\t\t{\n\t\t\t//Measure particles and sort by particle size\n\t\t\tVector<ParticleReport> particles = new Vector<ParticleReport>();\n\t\t\tfor(int particleIndex = 0; particleIndex < numParticles; particleIndex++)\n\t\t\t{\n\t\t\t\tParticleReport par = new ParticleReport();\n\t\t\t\tpar.Area = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_AREA);\n\t\t\t\tpar.AreaByImageArea = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_AREA_BY_IMAGE_AREA);\n\t\t\t\tpar.BoundingRectTop = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_TOP);\n\t\t\t\tpar.BoundingRectLeft = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_LEFT);\n\t\t\t\tpar.BoundingRectHeight = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_HEIGHT);\n\t\t\t\tpar.BoundingRectWidth = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_WIDTH);\n\t\t\t\tparticles.add(par);\n\n\t\t\t}\n\t\t\tparticles.sort(null);\n\n\t\t\t//This example only scores the largest particle. Extending to score all particles and choosing the desired one is left as an exercise\n\t\t\t//for the reader. Note that this scores and reports information about a single particle (single L shaped target). To get accurate information \n\t\t\t//about the location of the tote (not just the distance) you will need to correlate two adjacent targets in order to find the true center of the tote.\n//\t\t\tscores.Aspect = AspectScore(particles.elementAt(0));\n//\t\t\tSmartDashboard.putNumber(\"Aspect\", scores.Aspect);\n//\t\t\tscores.Area = AreaScore(particles.elementAt(0));\n//\t\t\tSmartDashboard.putNumber(\"Area\", scores.Area);\n//\t\t\tboolean isTote = scores.Aspect > SCORE_MIN && scores.Area > SCORE_MIN;\n//\n\t\t\tParticleReport bestParticle = particles.elementAt(0);\n\t\t NIVision.Rect particleRect = new NIVision.Rect((int)bestParticle.BoundingRectTop, (int)bestParticle.BoundingRectLeft, (int)bestParticle.BoundingRectHeight, (int)bestParticle.BoundingRectWidth);\n\t\t \n\t\t //NIVision.imaqOverlayRect(colorFrame, particleRect, new NIVision.RGBValue(0, 0, 0, 255), DrawMode.PAINT_VALUE, \"a\");//;(colorFrame, colorFrame, particleRect, DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 20);\n\t\t NIVision.imaqDrawShapeOnImage(colorFrame, colorFrame, particleRect, NIVision.DrawMode.DRAW_VALUE, ShapeMode.SHAPE_RECT, 0.0f);\n\t\t SmartDashboard.putNumber(\"Rect Top\", bestParticle.BoundingRectTop);\n\t\t SmartDashboard.putNumber(\"Rect Left\", bestParticle.BoundingRectLeft);\n\t\t SmartDashboard.putNumber(\"Rect Width\", bestParticle.BoundingRectWidth);\n\t\t SmartDashboard.putNumber(\"Area by image area\", bestParticle.AreaByImageArea);\n\t\t SmartDashboard.putNumber(\"Area\", bestParticle.Area);\n\t\t double bestParticleMidpoint = bestParticle.BoundingRectLeft + bestParticle.BoundingRectWidth/2.0;\n\t\t double bestParticleMidpointAimingCoordnates = pixelCoordnateToAimingCoordnate(bestParticleMidpoint, CAMERA_RESOLUTION_X);\n\t\t angleToTarget = aimingCoordnateToAngle(bestParticleMidpointAimingCoordnates, VIEW_ANGLE);\n\t\t \n\t\t}\n\t\telse\n\t\t{\n\t\t\tangleToTarget = 0.0;\n\t\t}\n\n if(cameraView.getSelected() == COLOR)\n {\n \tCameraServer.getInstance().setImage(colorFrame);\n }\n\t SmartDashboard.putNumber(\"Angle to target\", angleToTarget);\n\n }", "@Override\n protected Face[] doInBackground(InputStream... params) {\n FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient();\n try {\n publishProgress(\"Detecting...\");\n\n // Start detection.\n return faceServiceClient.detect(\n params[0], /* Input stream of image to detect */\n true, /* Whether to return face ID */\n true, /* Whether to return face landmarks */\n /* Which face attributes to analyze, currently we support:\n age,gender,headPose,smile,facialHair */\n new FaceServiceClient.FaceAttributeType[] {\n FaceServiceClient.FaceAttributeType.Age,\n FaceServiceClient.FaceAttributeType.Gender,\n FaceServiceClient.FaceAttributeType.Smile,\n FaceServiceClient.FaceAttributeType.Glasses,\n FaceServiceClient.FaceAttributeType.FacialHair,\n FaceServiceClient.FaceAttributeType.Emotion,\n FaceServiceClient.FaceAttributeType.HeadPose,\n FaceServiceClient.FaceAttributeType.Accessories,\n FaceServiceClient.FaceAttributeType.Blur,\n FaceServiceClient.FaceAttributeType.Exposure,\n FaceServiceClient.FaceAttributeType.Hair,\n FaceServiceClient.FaceAttributeType.Makeup,\n FaceServiceClient.FaceAttributeType.Noise,\n FaceServiceClient.FaceAttributeType.Occlusion\n });\n } catch (Exception e) {\n mSucceed = false;\n publishProgress(e.getMessage());\n return null;\n }\n }", "public interface IClassifierService {\n\n List<String> detectImage(byte[] pixels) throws IOException;\n}", "void matchStart();", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "@Override\n\t\tpublic void run() {\n\t\t\tif (cancel == true)\n\t\t\t\tupdateBarHandler.removeCallbacks(updateThread);\n\t\t\telse {\n\t\t\t\tnbm = Bitmap.createBitmap(bm);\n\t\t\t\t/* 人脸检测(人脸双眼间距必须在20pix以上) */\n\t\t\t\t// 检测器对象\n\t\t\t\tFaceDetector detector = new FaceDetector(nbm.getWidth(),\n\t\t\t\t\t\tnbm.getHeight(), 1);\n\t\t\t\t// 存放人脸信息\n\t\t\t\tFaceDetector.Face[] face = new FaceDetector.Face[1];\n\t\t\t\t// 人脸数目\n\t\t\t\tint Number = detector.findFaces(nbm, face);\n\t\t\t\tif (Number > 0) {\n\t\t\t\t\t// 双眼距离\n\t\t\t\t\tdist = face[0].eyesDistance();\n\t\t\t\t\t// 双眼中点\n\t\t\t\t\tface[0].getMidPoint(point);\n\t\t\t\t\t/* 归一化裁剪 */\n\t\t\t\t\tint x = (int) (point.x - dist);\n\t\t\t\t\tint y = (int) (point.y - dist);\n\t\t\t\t\tint width = (int) (point.x + dist) - x;\n\t\t\t\t\tif (width > nbm.getWidth() - x) {\n\t\t\t\t\t\twidth = nbm.getWidth() - x;\n\t\t\t\t\t}\n\t\t\t\t\tint height = (int) (point.y + dist * 1.5) - y;\n\t\t\t\t\tif (height > nbm.getHeight() - y) {\n\t\t\t\t\t\theight = nbm.getHeight() - y;\n\t\t\t\t\t}\n\t\t\t\t\tnbm = Bitmap.createBitmap(nbm, x, y, width, height);\n\n\t\t\t\t\t// 图像放大至相片尺寸\n\t\t\t\t\tMatrix mMatrix = new Matrix();\n\t\t\t\t\tfloat scalex = (float) myCamrActivity.ImageWidth / width;\n\t\t\t\t\tfloat scaley = (float) myCamrActivity.ImageHeight / height;\n\t\t\t\t\tmMatrix.postScale(scalex, scaley);\n\t\t\t\t\tnbm = Bitmap.createBitmap(nbm, 0, 0, nbm.getWidth(),\n\t\t\t\t\t\t\tnbm.getHeight(), mMatrix, false);\n\t\t\t\t\tbm = nbm;\n\n\t\t\t\t\t// 图片存入SD卡\n\t\t\t\t\tFile file = new File(\"./sdcard/mikepic.png\");\n\t\t\t\t\tBufferedOutputStream bos = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!file.exists())\n\t\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t\tbos = new BufferedOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\t\tfile));\n\t\t\t\t\t\tbm.compress(Bitmap.CompressFormat.PNG, 100, bos);\n\t\t\t\t\t\tbos.close();\n\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException 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\n\t\t\t\t\t// logout\n\t\t\t\t\tSystem.out.println(bm.getWidth() + \" \" + bm.getHeight());\n\n\t\t\t\t\t// 定位眼睛\n\t\t\t\t\tFeature.EyesLocate(leftEye, rightEye, dist, point, x, y,\n\t\t\t\t\t\t\tscalex, scaley);\n\t\t\t\t\t// 相关变量归一化变换\n\t\t\t\t\tpoint.x = (point.x - x) * scalex;\n\t\t\t\t\tpoint.y = (point.y - y) * scaley;\n\t\t\t\t\tdist = dist * scalex;\n\t\t\t\t} else {\n\t\t\t\t\t// 显示浮动窗口\n\t\t\t\t\tToast.makeText(MainActivity.this, R.string.error,\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbar.setProgress(100 / N * 1);\n\t\t\t\t// myImageView.setImageBitmap(bm);\n\t\t\t\tupdateBarHandler.post(updateThread);\n\t\t\t}\n\t\t}", "private void startPreview() {\n if (cameraConfigured && camera!=null) {\n camera.startPreview();\n inPreview=true;\n }\n }", "@Override\n public StartEntitiesDetectionJobResult startEntitiesDetectionJob(StartEntitiesDetectionJobRequest request) {\n request = beforeClientExecution(request);\n return executeStartEntitiesDetectionJob(request);\n }", "public void start() {\n dialogContainer.getChildren().addAll(\n DialogBox.getDukeDialog(Messages.START, dukeImage)\n );\n }", "public boolean needFaceDetection() {\n return true;\n }", "boolean detect(Point p, MapLayer layer);", "private void startAPICall() {\n if (currentBitMap == null) {\n TextView textView = findViewById(R.id.showCal);\n textView.setText(\"Please take a photo / select a photo\");\n return;\n }\n new ProcessPhoto.ProcessImageTask(TakePhotoActivity.this, requestQueue).execute(currentBitMap);\n }", "private void searchImages()\n {\n searchWeb = false;\n search();\n }", "public void processWorking_JustReminders(Mat rgbaImage) {\n\n centerXContour = new TreeMap<>();\n //rgbaImage = rgbaImage.submat(ColorBlobDetectionActivity.scannedRect);\n\n rgbaImage.copyTo(mPyrDownMat);\n Imgproc.cvtColor(mPyrDownMat, mPyrDownMat, Imgproc.COLOR_RGBA2GRAY);\n Imgproc.blur(mPyrDownMat,mPyrDownMat,new Size(25,25));\n Imgproc.adaptiveThreshold(mPyrDownMat,mPyrDownMat,maxTreshold,Imgproc.ADAPTIVE_THRESH_MEAN_C,Imgproc.THRESH_BINARY_INV,501,50);\n\n List<MatOfPoint> contours = new ArrayList<MatOfPoint>();\n\n mMask = mPyrDownMat.clone();\n\n Imgproc.findContours(mMask, contours, new Mat(), Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_SIMPLE);\n\n Iterator<MatOfPoint> each = contours.iterator();\n mContours.clear();\n Log.e(\"Contours\",contours.size()+\"\");\n\n while (each.hasNext()) {\n MatOfPoint contour = each.next();\n Log.e(\"Contours\",Imgproc.boundingRect(contour).size().height +\"\");\n if (Imgproc.boundingRect(contour).size().height > 65 ) {\n mContours.add(contour);\n\n //Draw bounding rect ------------------\n Rect temp_rec = Imgproc.boundingRect(contour);\n Imgproc.rectangle(rgbaImage,temp_rec.tl(),temp_rec.br(),ColorBlobDetectionActivity.CONTOUR_COLOR,6);\n\n\n //Draw mid\n Moments p = Imgproc.moments(contour, false);\n int x = (int) (p.get_m10() / p.get_m00());\n\n centerXContour.put(x,contour);\n\n }\n }//end while all contours\n\n\n }", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n CurrentData.REAL.reset();\n QQRobot.findBoard(RGB_MY_SPACE, CurrentData.REAL.board);\n QQRobot.findAndCleanBoard(CurrentData.REAL.board, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n\n if (CurrentData.REAL.tetromino.isValid()) {\n return true;\n } else {\n return false;\n }\n }" ]
[ "0.6836086", "0.65971464", "0.64867866", "0.64799374", "0.64387465", "0.6435355", "0.64084905", "0.62955207", "0.6287073", "0.62463033", "0.6201134", "0.6186747", "0.61803484", "0.6123359", "0.610224", "0.60951746", "0.60883445", "0.6078035", "0.60349995", "0.59610665", "0.59442514", "0.5936097", "0.5935278", "0.59245443", "0.5900506", "0.5882583", "0.58322406", "0.5827782", "0.58024925", "0.5741026", "0.5721734", "0.56885964", "0.568779", "0.56622434", "0.5645098", "0.56441826", "0.5640769", "0.56274176", "0.5620195", "0.5617345", "0.561714", "0.55932444", "0.55850726", "0.5580743", "0.5570944", "0.5562852", "0.5558689", "0.5552974", "0.55478036", "0.5544604", "0.5543159", "0.553972", "0.5519054", "0.5517369", "0.5510243", "0.5507452", "0.55061233", "0.5499889", "0.54760426", "0.5456725", "0.5445444", "0.54395026", "0.54382807", "0.54275775", "0.5413938", "0.5405313", "0.5379481", "0.5378867", "0.5374092", "0.5373544", "0.5371794", "0.5353641", "0.5321726", "0.53183603", "0.5310124", "0.5299652", "0.5289446", "0.52877223", "0.52868176", "0.5275559", "0.5272953", "0.52719367", "0.5264735", "0.52630574", "0.5261736", "0.52587426", "0.52517265", "0.5250082", "0.5246301", "0.52452415", "0.52419364", "0.52340454", "0.5230864", "0.52269626", "0.5225056", "0.52176005", "0.52173835", "0.5216429", "0.5208642", "0.5207607" ]
0.62161934
10
Called when the "Identify" button is clicked.
public void identify(View view) { // Start detection task only if the image to detect is selected. if (detected && mPersonGroupId != null) { // Start a background task to identify faces in the image. List<UUID> faceIds = new ArrayList<>(); for (Face face: mFaceListAdapter.faces) { faceIds.add(face.faceId); } setAllButtonsEnabledStatus(false); new IdentificationTask(mPersonGroupId).execute( faceIds.toArray(new UUID[faceIds.size()])); } else { // Not detected or person group exists. setInfo("Please select an image and create a person group first."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void identify() {\n\n\t}", "public void addIdentifyListener(ActionListener actionListener) {\r\n jIdentify.addActionListener(actionListener);\r\n }", "@FXML\n public void interviewClicked() {\n try {\n Interview selectedInterview = this.listInterview.getSelectionModel().getSelectedItem();\n if (selectedInterview != null)\n this.populateInterviewInfo(selectedInterview);\n } catch (Exception ex) {\n AlertHelper.showErrorAlert(\"Unable to load interview: \" + ex.getLocalizedMessage());\n }\n }", "@ReactMethod\n public void identify(String id) {\n mixpanel.identify(id);\n mixpanel.getPeople().identify(id);\n }", "public String getIdentifyCode() {\n return identifyCode;\n }", "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}", "private void identification(JFrame frame) {\r\n\t\t// Recognito code\r\n\t\trecognito = new Recognito<>(16000.0f);\r\n\t\ttry {\r\n\t\t\tList<File> filesInFolder = Files.walk(Paths.get(\"sounds/patterns\")).filter(Files::isRegularFile).map(Path::toFile).collect(Collectors.toList());\r\n\t\t\tfor (File file : filesInFolder) {\r\n\t\t\t\tString name = file.getName().replaceFirst(\"[.][^.]+$\", \"\");\r\n\t\t\t\trecognito.createVoicePrint(name, file);\r\n\t\t\t}\r\n\t\t\tList<MatchResult<String>> matches;\r\n\t\t\tmatches = recognito.identify(new File(\"sounds/samples/Person\" + MainWindow.identificationCount + \".wav\"));\r\n\t\t\tMatchResult<String> match = matches.get(0);\r\n\t\t\tfor (File file : filesInFolder) {\r\n\t\t\t\tString name = file.getName().replaceFirst(\"[.][^.]+$\", \"\");\r\n\t\t\t\tif(match.getKey().equals(name)) {\r\n\t\t\t\t\tResultWindow rw = new ResultWindow(name, match, frame);\r\n\t\t\t\t\trw.setVisible(true);\r\n\t\t\t\t\tframe.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (UnsupportedAudioFileException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tSet <IRI> individuals = controller.getKnownIndividuals();\n\t\t\t\tfor (IRI item : individuals){\n\t\t\t\t\tcontroller.logappendInfo(item.toString());\n\t\t\t\t}\n\t\t\t}", "public void handleInhouseButton() {\n machineIdOrCompanyLabel.setText(\"Machine Id\");\n }", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "public void ClickPartnerInformationPage() {\r\n\t\tpartnerinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Partner Information\\\" button on the Birthdays page\");\r\n\t}", "@When(\"user clicks on find details\")\r\n\t\tpublic void user_clicks_on_find_details() {\n\t\t}", "public Identification identify() throws OAIException {\n try {\n \tString query = builder.buildIdentifyQuery();\n \tDocument document = reader.read(query);\n return new Identification(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n } \n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n adaptee.btnIDSearch_actionPerformed(e);\r\n\t}", "protected void doColonyInfoClick() {\r\n\t\tuiSound.playSound(\"ColonyInformation\");\r\n\t\tif (onInformationClicked != null) {\r\n\t\t\tonInformationClicked.invoke();\r\n\t\t}\r\n\t}", "public void setIdentifyKind(String identifyKind) {\n this.identifyKind = identifyKind;\n }", "@Override\n protected void onPostExecute(IdentifyResult[] result) {\n setUiAfterIdentification(result, mSucceed);\n }", "@Override\n protected void onPostExecute(IdentifyResult[] result) {\n setUiAfterIdentification(result, mSucceed);\n }", "public void identify() {\n // Start detection task only if the image to detect is selected.\n if (detected && mPersonGroupId != null) {\n // Start a background task to identify faces in the image.\n List<UUID> faceIds = new ArrayList<>();\n for (Face face: faces) {\n faceIds.add(face.faceId);\n }\n\n new IdentificationTask(mPersonGroupId).execute(\n faceIds.toArray(new UUID[faceIds.size()]));\n } else {\n // Not detected or person group exists.\n Log.e(LOG_TAG1,\"Please select an image and create a person group first.\");\n doneSignal.countDown();\n }\n }", "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 void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}", "public void clickOnEditIcon()\r\n\t\t{\r\n\t\t\treceiptsetup.clickOnEditIcon();\r\n\t\t}", "public String getIdentifyKind() {\n return identifyKind;\n }", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}", "@Override\n\tpublic void onPreferenceClick(long simid) {\n\t\t\n\t\tBundle extras = new Bundle();\n\t\textras.putLong(GeminiUtils.EXTRA_SIMID, simid);\n\t\tstartFragment(this, SimInfoEditor.class.getCanonicalName(), -1, extras, R.string.gemini_sim_info_title);\n\t\tXlog.i(TAG, \"startFragment \"+ SimInfoEditor.class.getCanonicalName());\n\t}", "public void ClickOnConfirmCertificateInformationButton()\n\t\t{\n\t\t\tConfirmCertificateInformation.click();\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t//String userId = fields[PRODUCT_NAME].getText();\n\t\t}", "public void clickAutoInsurance() {\n\t\tselectAutoInsurance.click();\n\t}", "public void onIndividualSelected(Individual individual) {\n\t\t\n\t}", "@FXML\r\n void ClickUserInformation(MouseEvent event) throws IOException {\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"UserInformation.fxml\"));\r\n //Load user information page\r\n loader.load();\r\n UserInformationController controller = loader.getController();\r\n controller.setUser(user);\r\n //Set user details in the user information page\r\n Parent root = loader.getRoot();\r\n Scene scene = new Scene(root);\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\topenInterestDialog();\n\t\t\t}", "@Override\n\tpublic void setIdentification(String identification) {\n\n\t}", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'R'));\r\n\t\t\t}", "public void onClick(View arg0) {\n\n int i = arg0.getId();\n // login button was pressed\n\n }", "@When(\"user clicks on find details\")\r\n\tpublic void user_clicks_on_find_details() {\n\t driver.findElement(By.xpath(\"/html/body/div[1]/form/input\")).click();\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "public void patientsCredentials() {\n\t\tutil.ClickElement(prop.getValue(\"locators.register.click\"));\n\t\tlogreport.info(\"Patient registration is clicked\");\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 select_details(int icon, String text);", "void userPressConnectButton();", "@FXML public void showInfo(ActionEvent e){\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\talert.setTitle(\"Picture Information\");\n\t\talert.setHeaderText(\"Current Photo Information\");\n\t\talert.setContentText(listOfPhotos.get(photoNumber).printAttributes());\n\n\t\talert.showAndWait();\n\t}", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n progressDialog.dismiss();\n\n setAllButtonsEnabledStatus(true);\n setIdentifyButtonEnabledStatus(false);\n\n if (succeed) {\n // Set the information about the detection result.\n setInfo(\"Identification is done\");\n\n if (result != null) {\n mFaceListAdapter.setIdentificationResult(result);\n\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Face \" + identifyResult.faceId.toString() + \" is identified as \"\n + (identifyResult.candidates.size() > 0\n ? identifyResult.candidates.get(0).personId.toString()\n : \"Unknown Person\")\n + \". \";\n }\n addLog(logString);\n\n // Show the detailed list of detected faces.\n ListView listView = (ListView) findViewById(R.id.list_identified_faces);\n listView.setAdapter(mFaceListAdapter);\n\n TextView textView = (TextView) findViewById(R.id.tips);\n textView.setText(\"检测结果\");\n }\n }\n }", "public static void capturePersonalDetails(){\r\n\t\ttestInfo.log(Status.INFO, \"Capture Personal Details\");\r\n\t\tIWanna.selectFromDropdown(\"ddClientType\", red.getCellData(\"TestData\", \"ClientType\", currentRow));\r\n\t\tString vatIndicator = red.getCellData(\"TestData\", \"IndicatorVatVendor\", currentRow);\t\t\r\n\t\tif (vatIndicator.equalsIgnoreCase(\"No\")){\t\r\n\t\t\tIWanna.click(\"cbVatVendorNo\");\r\n\t\t}\r\n\t\telse if (vatIndicator.equalsIgnoreCase(\"Yes\")){\r\n\t\t\tIWanna.click(\"cbVatVendorYes\");\r\n\t\t}\r\n\t\t\r\n\t\tIWanna.type(\"tbVendorNumber\", red.getCellData(\"TestData\", \"VATVendorNumber\", currentRow));\r\n\t\tString indicatorInsolvent = red.getCellData(\"TestData\", \"IndicatorInsolvent\", currentRow);\t\r\n\t\tif (indicatorInsolvent.equalsIgnoreCase(\"No\")){\t\r\n\t\t\tIWanna.click(\"rbInsolventNo\");\r\n\t\t}\r\n\t\telse if (indicatorInsolvent.equalsIgnoreCase(\"Yes\")){\r\n\t\t\tIWanna.click(\"rbInsolventYes\");\r\n\t\t}\t\t\r\n\t\tIWanna.selectFromDropdown(\"ddTitle\", red.getCellData(\"TestData\", \"Title\", currentRow));\r\n\t\tIWanna.type(\"tbFirstNames\", red.getCellData(\"TestData\", \"FirstName\", currentRow));\r\n\t\tIWanna.type(\"tbSurname\", red.getCellData(\"TestData\", \"Surname\", currentRow));\r\n\t\t\r\n\t\tString saResident = red.getCellData(\"TestData\", \"IndicatorSACitizen\", currentRow);\t\r\n\t\tif (saResident.equalsIgnoreCase(\"No\")){\t\r\n\t\t\tIWanna.click(\"cbSAResNo\");\r\n\t\t\tIWanna.type(\"tbIdNumber\", red.getCellData(\"TestData\", \"IdNumber\", currentRow));\r\n\t\t\tIWanna.type(\"tbPassportValidFromDate\", red.getCellData(\"TestData\", \"PassportValidFrom\", currentRow));\r\n\t\t\tIWanna.type(\"tbPassportExpiryDate\", red.getCellData(\"TestData\", \"PassportExpiry\", currentRow));\r\n\t\t\t//capture temporary residence information\r\n\t\t\tif (red.getCellData(\"TestData\", \"TemporaryResident\", currentRow).equalsIgnoreCase(\"Yes\")){\r\n\t\t\t\tIWanna.click(\"rbTempResYes\");\r\n\t\t\t\tIWanna.type(\"tbPermitNumber\", red.getCellData(\"TestData\", \"PermitNumber\", currentRow));\r\n\t\t\t\tIWanna.type(\"tbPermitExpiryDate\", red.getCellData(\"TestData\", \"PermitExpiryDate\", currentRow));\r\n\t\t\t}\r\n\t\t\telse if (red.getCellData(\"TestData\", \"PassportExpiry\", currentRow).equalsIgnoreCase(\"No\")){\r\n\t\t\t\tIWanna.click(\"rbTempResNo\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (saResident.equalsIgnoreCase(\"Yes\")){\r\n\t\t\tIWanna.click(\"cbSAResYes\");\r\n\t\t\tIWanna.type(\"tbIdNumber\", red.getCellData(\"TestData\", \"IdNumber\", currentRow));\r\n\t\t}\t\t\t\r\n\t\t//select gender\r\n\t\tif (red.getCellData(\"TestData\", \"Gender\", currentRow).equalsIgnoreCase(\"Male\")){\r\n\t\t\tIWanna.click(\"rbGenderMale\");\r\n\t\t}\r\n\t\telse if(red.getCellData(\"TestData\", \"Gender\", currentRow).equalsIgnoreCase(\"female\")){\r\n\t\t\tIWanna.click(\"rbGenderFemale\");\t\t\t\r\n\t\t}\r\n\t\tIWanna.selectFromDropdown(\"ddRaceIndicator\", red.getCellData(\"TestData\", \"Race\", currentRow));\r\n\t\tIWanna.type(\"tbDateOfBirth\", red.getCellData(\"TestData\", \"DOB\", currentRow));\r\n\t\tIWanna.selectFromDropdown(\"ddNationality\", red.getCellData(\"TestData\", \"Nationality\", currentRow));\r\n\t\tIWanna.selectFromDropdown(\"ddCountryOfOrigin\", red.getCellData(\"TestData\", \"CountryOfOrigin\", currentRow));\r\n\t\tIWanna.selectFromDropdown(\"ddMaritalStatus\", red.getCellData(\"TestData\", \"MaritalStatus\", currentRow));\r\n\t\tIWanna.selectFromDropdown(\"ddLanguage\", red.getCellData(\"TestData\", \"Language\", currentRow));\r\n\t\t\r\n\t\t//capture post matric qualification\r\n\t\tif (red.getCellData(\"TestData\", \"PostMatricQualification\", currentRow).equalsIgnoreCase(\"Yes\")){\r\n\t\t\tIWanna.click(\"rbPostMatricQualificationYes\");\r\n\t\t\tIWanna.selectFromDropdown(\"ddHighestQualification\", red.getCellData(\"TestData\", \"Qualification\", currentRow));\r\n\t\t}\r\n\t\telse if(red.getCellData(\"TestData\", \"PostMatricQualification\", currentRow).equalsIgnoreCase(\"No\")){\r\n\t\t\tIWanna.click(\"rbPostMatricQualificationNo\");\t\t\t\r\n\t\t}\r\n\t\tAssert.assertTrue(IWanna.getElementValue(\"tbDateOfBirth\").equalsIgnoreCase(red.getCellData(\"TestData\", \"DOB\", currentRow)));\r\n\t}", "public void gotoCenter(){\n String id = identification.getText();\n if (id.equals(\"Label\")){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(null);\n alert.setContentText(\"Please login first!\");\n alert.showAndWait();\n }else{\n if (id.equals(\"admin\")){\n application.gotoUserMangement();\n }else if (id.equals(\"coach\")){\n application.gotoCoachCenter();\n }\n }\n }", "@OnClick(R.id.documents_button)\n protected void onPickFromDocumentsClicked() {\n EasyImage.openDocuments(this);\n }", "private void refreshIdentifyButtonEnabledStatus() {\n if (detected && mPersonGroupId != null) {\n setIdentifyButtonEnabledStatus(true);\n } else {\n setIdentifyButtonEnabledStatus(false);\n }\n }", "@When(\"User clicks on Find Details button\")\r\n\tpublic void user_clicks_on_find_details_button() \r\n\t{\n\t driver.findElement(By.xpath(\"//input[@type='submit']\")).click();\r\n\t}", "public void askForEventID() {\n System.out.println(\"What is the event ID?\");\n }", "@FXML\r\n void actionInHouseRadioButton(ActionEvent event) {\r\n\r\n labelPartIdName.setText(\"Machine ID\");\r\n }", "public boolean isIdentification() {\n \treturn model.isIdentification();\n }", "public void onChangedAdBtnPressed() {\n String uniqueID = advertisement.getUniqueID();\n view.showEditView(uniqueID);\n }", "private void FortifyButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_FortifyButtonMouseClicked\r\n\t\trisk.setState(RiskGameModel.FORTIFY);\r\n\t\trisk.notifyPhaseViewChange();\r\n\t\tstatusLabel.setText(\"Select a country move armies from\");\r\n\t\tUtility.writeLog(\"Fortify Phase entered\");\r\n\t}", "public void clickedPresentationNew() {\n\t\t\n\t}", "private void clickContactLookup() {\n contactLookupIcon.click();\n }", "public void clickOnVINButton() {\n if(VINButton.isDisplayed()) {\n\t\twaitAndClick(VINButton);\n\t }\n }", "public void clickOnRegisterButton() {\n Reporter.addStepLog(\" Click on register button \" + _registerBtn.toString());\n clickOnElement(_registerBtn);\n log.info(\" Click on register button \" + _registerBtn.toString());\n }", "protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {\n/* 95 */ super.mouseClicked(mouseX, mouseY, mouseButton);\n/* 96 */ this.ipEdit.mouseClicked(mouseX, mouseY, mouseButton);\n/* */ }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew IINAndDividentsView().view(frameDBView);\n\t\t\t}", "public void enterLoginID() throws Exception {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\n\t\tlog.info(\"Verifying the Login ID is available or not\");\n\t\tAssert.assertTrue(enterLoginID.isDisplayed());\n\t\tenterLoginID.sendKeys(BasePage.getCellData(xlsxName, sheetName, 0, 0));\n\t}", "public void ButtonClicked(View view) {\n Intent intentInput = new Intent(DetailActivity.this, InputActivity.class);\n startActivity(intentInput);\n }", "void onTapToRegister();", "void onConfigureClick(long id);", "@FXML\n\tprivate void MainEnterBt() throws IOException {\n\n\t\tmain.showSelectionPage(); // #1\n\n\t}", "@FXML\n void onActionInHouse(ActionEvent event){\n labelPartSource.setText(\"Machine ID\");\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tconfirm(ObservationDetails.this, R.string.details, R.string.view_on_inat_confirmation, \n\t\t\t\t\t\tR.string.yes, R.string.no, \n\t\t\t\t\t\tnew Runnable() { public void run() {\n\t\t\t\t\t\t\tString inatNetwork = mApp.getInaturalistNetworkMember();\n\t\t\t\t\t\t\tString inatHost = mApp.getStringResourceByName(\"inat_host_\" + inatNetwork);\n\n\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ti.setData(Uri.parse(\"http://\" + inatHost + \"/observations/\" + mObservation.getInt(\"id\")));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}, \n\t\t\t\t\t\tnull);\n\n\t\t\t}", "@FXML\n private void btnShowInfoPressed() {\n Tournament t = tblTournaments.getSelectionModel().getSelectedItem();\n\n // Pass in some way the tournament name to the tournament info scene\n stateManager.TournamentName = t.tournamentName.get();\n\n Renderer.getInstance().show(\"tournamentInfoScene\");\n }", "void showPatients() {\n\t\t\t\n\t}", "private void displayByID() { \n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you would like displayed:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayBySICID(sic_idHolder));\n\t\tgetUserInfo();\n\t}", "public void sendIdentify(boolean onJoin) {\n if (!hasShardInfo() || !onJoin) {\n System.out.println(\"IDENTIFYING TO PROXY AS >> \" + currentShard);\n sender.sendProxy(new PacketRequestShards(currentShard));\n }\n }", "private void setUiAfterIdentification(IdentifyResult[] result, boolean succeed) {\n if (succeed) {\n // Set the information about the detection result.\n Log.e(LOG_TAG1, \"Identification is done\");\n\n if (result != null) {\n String logString = \"Response: Success. \";\n for (IdentifyResult identifyResult: result) {\n logString += \"Identified: \"\n + (identifyResult.candidates.size() > 0\n ? StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" with confidence \"+identifyResult.candidates.get(0).confidence\n : \"Unknown Person\")\n + \". \";\n\n if (identifyResult.candidates.size() > 0) {\n face_result = face_result + \" \" + StorageHelper.getPersonName(identifyResult.candidates.get(0).personId.toString(), mPersonGroupId, bingVisionService.this) + \" (\" + identifyResult.candidates.get(0).confidence + \") \";\n }\n LogViewer.addLog(\"Face API: \" + face_result);\n\n }\n\n //mIdentifyResults.get(position).candidates.get(0).confidence\n Log.e(LOG_TAG1,logString);\n doneSignal.countDown();\n } else {\n Log.e(LOG_TAG1,\"null result in setUIAfterIdentification\");\n doneSignal.countDown();\n }\n }\n Log.e(LOG_TAG1,\"SUCCESS! DONE!!! face recognition\");\n doneSignal.countDown();\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}", "private void jtMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtMouseClicked\n selectDetailWithMouse();\n }", "public void clickDetailViewButton() {\n\t\tfilePicker.stickyButton(locDetailBtn);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t if(e.getActionCommand().equals(\"提交UID\")){\n\t\t\t\t\tif(!UserID.useruidtext.getText().equals(\"\")) {\n\t\t\t\t\t\tBILIBILIAPI.Userid=UserID.useruidtext.getText();\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"不能为空\");\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(BILIBILIAPI.Userid);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent returnToPressHelp = new Intent(getApplicationContext(), PressHelp.class);\n startActivity(returnToPressHelp);\n\n\n //Tell the phone that the medication was taken.\n\n }", "public void clickYes ();", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "public void handleOutsourcedButton() {\n machineIdOrCompanyLabel.setText(\"Company Name\");\n\n }", "@FXML\n\tvoid AddVisitor_Button_Clicked(ActionEvent event) { // could the visitor be for different parks? time? date ?\n\t\tString ordererId = PopUp.getUserInput(\"Private Group Order\", \"Enter ID of the visitor\", \"ID or Subscriber ID\");\n\n\t\tif (!CheckID(ordererId)) {\n\t\t\tPopUp.showInformation(\"Please enter appropriate ID\", \"Please enter appropriate ID\",\n\t\t\t\t\t\"Please enter appropriate ID\");\n\t\t} else if (visitorsIDArray.contains(ordererId) || visitorsIDArray.contains(\"S\" + ordererId)\n\t\t\t\t|| visitorsIDArray.contains(ordererId.substring(1, ordererId.length()))) {\n\t\t\tPopUp.showInformation(\"This ID already is added\", \"This ID already is added\", \"This ID already is added\");\n\t\t} else {\n\t\t\tvisitorsIDArray.add(ordererId);\n\t\t\tPopUp.showInformation(\"Visitor Added\", \"Visitor Added\", \"Visitor Added\");\n\t\t\tvisitorsCounter++;\n\t\t\tlistViewVisitors.getItems().add(\"visitor #\" + visitorsCounter + \" \" + \"(\" + ordererId + \")\");\n\t\t\tPlaceOrder_Button.setDisable(false);\n\t\t\tRemoveVisitor_Button.setDisable(false);\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'H'));\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\r\n JTextField ownerTf;\r\n String mes;\r\n\r\n String record[] = getRecordOnPan();\r\n\r\n try {\r\n int match[] = data.find(record);\r\n \r\n if (match.length > 1) {\r\n updateStatus(\"More than one match record.\");\r\n return;\r\n } else if (match.length == 0) {\r\n updateStatus(\"Record not found.\");\r\n return;\r\n }\r\n \r\n ownerTf = new JTextField();\r\n ownerTf.setText(record[5]);\r\n mes = \"Enter customer id\";\r\n \r\n int result = JOptionPane.showOptionDialog(\r\n frame, new Object[] {mes, ownerTf},\r\n \"Booking\", JOptionPane.OK_CANCEL_OPTION,\r\n JOptionPane.PLAIN_MESSAGE,\r\n null, null, null);\r\n\r\n if (result == JOptionPane.OK_OPTION) {\r\n record[5] = ownerTf.getText();\r\n bc.handleUpdateGesture(match[0], record);\r\n updateStatus(\"Subcontractor booked.\");\r\n }\r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "@Test\n public void identify() {\n\n Identify response = serviceProvider.identify();\n\n assertThat(\"Identity verb send a RepositoryName\", response.getRepositoryName(), Matchers.not(Matchers.isEmptyOrNullString()));\n assertThat(\"Identity verb send a baseUrl\", response.getBaseURL(), Matchers.not(Matchers.isEmptyOrNullString()));\n assertEquals(DeletedRecord.PERSISTENT, response.getDeletedRecord());\n }", "public void btn_medical_information_On_click(View v) {\n Intent i = new Intent(MainActivity.this, Medical_information.class);\n startActivity(i);\n }", "public void qvikieClicked() {\n String qvikieId = getQvikieId();\n if (qvikieId == null) {\n // Click happened before qvikie was loaded, no-op.\n return;\n }\n if (mNavigator != null && mNavigator.get() != null) {\n mNavigator.get().openQvikieDetails(qvikieId);\n }\n }", "@Override\r\n\tprotected void initListener() {\n\t\trly_personal_info.setOnClickListener(this);\r\n\t}", "@FXML \n public void handleSelected() throws Exception{\n \n TablePosition pos = (TablePosition) table.getSelectionModel().getSelectedCells().get(0);\n int index = pos.getRow();\n String selected = table.getItems().get(index).toString();\n String sn = selected.substring(0, selected.indexOf(\",\"));\n String cc =selected.substring(selected.indexOf(\",\")+1, selected.length());\n \n StudentMarkClick.Activate(sn, cc, lastclicked);\n //switch to detail view\n content.getChildren().clear();\n content.getChildren().add(FXMLLoader.load(getClass().getResource(\"viewMarks.fxml\")));\n \n //selected = selected.substring(1, selected.indexOf(\",\")); //only get username\n System.out.println(sn+\"|\"+cc); \n \n }", "public void clickOnLogo() {\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 }", "private void updateInfoBarOnClick() {\n\t\tif (!selectedList.isEmpty()) {\n\t\t\tStringBuilder label = new StringBuilder(\"Se selecciono: \");\n\t\t\tfor (Render<? extends MovableDrawing> selectedDrawing : selectedList) {\n\t\t\t\tlabel.append(selectedDrawing.getFigure().toString()).append(\", \");\n\t\t\t}\n\t\t\tlabel.setLength(label.length() - 2);\n\t\t\tstatusPane.updateStatus(label.toString());\n\t\t} else {\n\t\t\tstatusPane.updateStatus(\"Ninguna figura encontrada\");\n\t\t}\n\t}", "private void u_interestActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void setIdentifyButtonEnabledStatus(boolean isEnabled) {\n Button button = (Button) findViewById(R.id.identify);\n button.setEnabled(isEnabled);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (info != null && info.uid != null) {\n\t\t\t\t\tmSearch.poiDetailSearch(info.uid);\n\t\t\t\t}\n\t\t\t}", "public void setIdentifyCode(String identifyCode) {\n this.identifyCode = identifyCode == null ? null : identifyCode.trim();\n }", "public void actionPerformed(ActionEvent e) {\r\n String record[] = getRecordOnPan();\r\n String searchKey[] = new String[6];\r\n System.arraycopy(record, 0, searchKey, 0, 2);\r\n searchKey[0] = searchKey[0].trim();\r\n searchKey[1] = searchKey[1].trim();\r\n\r\n try {\r\n int match[] = data.find(searchKey);\r\n\r\n if (match.length > 1) {\r\n updateStatus(\"More than one match record.\");\r\n return;\r\n } else if (match.length == 0) {\r\n updateStatus(\"Record not found.\");\r\n return;\r\n }\r\n\r\n bc.handleUpdateGesture(match[0], record);\r\n updateStatus(\"Record updated.\"); \r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "public void clickedRepMD(Button button) {\r\n textShape.setText(\"MD Case Fatality Ratios by Race\");\r\n this.updateRace(2);\r\n this.updateCFR(2);\r\n this.updateBar(2);\r\n }", "public void Click_defineSetupPage_Alert() {\r\n\t\tclickOn(SensorConfiguration_Btn);\r\n\t}", "private void retrieveLocationClicked() {\n locationClikedId = getIntent().getIntExtra(GeneralConstants.EDIT_LOCATION_DETAILS_KEY, 0);\n }" ]
[ "0.6835461", "0.63223547", "0.59997815", "0.58440083", "0.5834206", "0.57874703", "0.5766578", "0.57396114", "0.5729518", "0.565009", "0.5644025", "0.56367993", "0.5624003", "0.5612344", "0.56105256", "0.55796665", "0.55617076", "0.55617076", "0.54697865", "0.54434836", "0.5430003", "0.5413272", "0.54122704", "0.5401173", "0.5401173", "0.5394555", "0.5361442", "0.5351215", "0.53385735", "0.5333164", "0.5318947", "0.53014636", "0.5278491", "0.5264397", "0.52380264", "0.5225613", "0.52152115", "0.5214606", "0.5212388", "0.52100354", "0.5201779", "0.51938224", "0.518537", "0.51715523", "0.5166715", "0.5166414", "0.5155525", "0.51545614", "0.51397365", "0.51385593", "0.5123474", "0.51221126", "0.5118975", "0.511816", "0.50972825", "0.50932145", "0.5093203", "0.50919574", "0.5091027", "0.50896865", "0.5087665", "0.50770396", "0.5074368", "0.5073541", "0.5073231", "0.5072721", "0.506942", "0.5058245", "0.50577164", "0.50516975", "0.50499153", "0.5042278", "0.50324595", "0.50287837", "0.50264263", "0.50165087", "0.5016354", "0.5012117", "0.5006503", "0.50027895", "0.5002744", "0.49754605", "0.49742052", "0.49678248", "0.49675772", "0.49662587", "0.49635267", "0.49580002", "0.49557194", "0.49486253", "0.4948102", "0.49422225", "0.49388006", "0.4937989", "0.49360117", "0.49274027", "0.49227628", "0.49192727", "0.4919035", "0.4918352" ]
0.5568388
16
Add a log item.
private void addLog(String log) { LogHelper.addIdentificationLog(log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addLog(String item) {\n\t\tlong itemTime = System.currentTimeMillis();\r\n\r\n\t\t// Measure total time\r\n\t\tlong itemTotalTime = (itemTime - start) / 1000;\r\n\t\tReporter.log(\"<td> - \" + item + itemTotalTime + \" </td>\");\r\n\t}", "public void addLog(Log p) {\n logs.add(p);\n }", "void addLogEntry(LogEntry entry) throws LogEntryOperationFailedException;", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public boolean add( TPMTransportLogEntry logEntry )\r\n {\n return log.add( logEntry );\r\n }", "void addItem(DataRecord record);", "void add(Item item);", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public static void addLogEntry(LogEntry logEntry, Context context) {\n if (log != null) log.add(0, logEntry);\n try {\n FileOutputStream fos = context.openFileOutput(FILENAME_LOG, Context.MODE_APPEND);\n PrintWriter writer = new PrintWriter(fos);\n writer.println(logEntry.toTextLine());\n writer.close();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public synchronized long addLog(final Log log) {\n if (log == null\n || TextUtils.isEmpty(log.getUrl())\n || TextUtils.isEmpty(log.getToken())\n || log.getJSON() == null) {\n Logger.e(\"Cannot add log without args.\");\n return getCount();\n }\n\n queryExecutor(new QueryExecCallback<Void>() {\n @Override\n public Void execute(SQLiteDatabase db) {\n ContentValues values = new ContentValues();\n values.put(Columns.URL, log.getUrl());\n values.put(Columns.TOKEN, log.getToken());\n values.put(Columns.LOG, log.getJSON().toString());\n values.put(Columns.CREATED_AT, System.currentTimeMillis());\n\n db.insert(TABLE_NAME, null, values);\n return null;\n }\n });\n\n return getCount();\n }", "public static void addLog(int _sid, String _query, int _did, String _action){\n Logger log = new Logger(_sid, _query, _did, _action);\n if(_logs.containsKey(_sid) == false){\n _logs.put(_sid, new Vector<Logger>());\n }\n _logs.get(_sid).add(log);\n }", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public void addItem(Item item) {\n _items.add(item);\n }", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "public void add(SignLog log) {\n ContentValues values = new ContentValues();\n values.put(DatabaseSQLiteHelper.LOGS_NAME, log.getName());\n values.put(DatabaseSQLiteHelper.LOGS_PASSWORD, log.getPassword());\n values.put(DatabaseSQLiteHelper.LOGS_USER_ID, log.getUserId());\n values.put(DatabaseSQLiteHelper.LOGS_DAY, log.getDay());\n values.put(DatabaseSQLiteHelper.LOGS_TIME, log.getTime());\n values.put(DatabaseSQLiteHelper.LOGS_TYPE, log.getType());\n\n database.insert(DatabaseSQLiteHelper.TABLE_SIGN_LOGS, null, values);\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "@Override\r\n\tpublic void addLog(Log log) throws RuntimeException {\n\t\tlogMapper.addLog(log);\r\n\t}", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void addItem(LineItem lineItem){\n\t\t\n\t\tlineItems.add(lineItem);\n\t}", "public void addRecord(LogRecord entry)\n\t{\n\t\tint newIndex = m_records.size();\n\t\tm_records.add(entry);\n\t\tfireTableRowsInserted(newIndex, newIndex);\n\t}", "@Override\r\n\tpublic ItemLog createItemLog() {\n\t\treturn new HpLog();\r\n\t}", "public void add(MenuItem item) {\n this.items.add(item);\n }", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public void addItem(Object obj) {\n items.add(obj);\n }", "private void addLog(final String key, final Log logger) {\r\n this.logs.put(key, logger);\r\n }", "@Override\n\t\tpublic void add(int index, LogCate element) {\n\t\t\tsuper.add(index, element);\n\t\t\tLogCateManager.getInstance().onLogsChanged();\n\t\t}", "public abstract void addItem(AbstractItemAPI item);", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "public void addEntryToList(String entry){\n\t\tlogList.add(entry);\n\t}", "private void addEntranceLog(String logType) {\n if(ticketTrans == null || checkedItems.size() == 0) return;\n\n Entrance entrance = new Entrance(EntranceStep2Activity.this);\n\n Log.d(EntranceStep2Activity.class.toString(), logType);\n\n try {\n entrance.add(encryptRefNo, checkedItems, logType);\n } catch (Exception e) {\n String reason = e.getMessage();\n Toast.makeText(getApplicationContext(), reason, Toast.LENGTH_SHORT).show();\n } finally {\n loading.dismiss();\n }\n }", "public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}", "public void addItem(CSVItem item)\n\t{\n\t\titemList.add(item);\n\t}", "private void addItem(UndoItem item, RefactoringSession session) {\n if (wasUndo) {\n LinkedList<UndoItem> redo = redoList.get(session);\n redo.addFirst(item);\n } else {\n if (transactionStart) {\n undoList.put(session, new LinkedList<UndoItem>());\n descriptionMap.put(undoList.get(session), description);\n transactionStart = false;\n }\n LinkedList<UndoItem> undo = this.undoList.get(session);\n undo.addFirst(item);\n }\n if (!(wasUndo || wasRedo)) {\n redoList.clear();\n }\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public void addLogModel(LogModel param) {\n if (localLogModel == null) {\n localLogModel = new LogModel[] { };\n }\n\n //update the setting tracker\n localLogModelTracker = true;\n\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localLogModel);\n list.add(param);\n this.localLogModel = (LogModel[]) list.toArray(new LogModel[list.size()]);\n }", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "public boolean addLog(LogBean log) {\n\t\treturn ld.addLog(log);\n\t}", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "boolean appendEntry(final LogEntry entry);", "Item addItem(IDAOSession session, String title, String description,\n\t\t\tint userId);", "public void store(Item item) {\n this.items.add(item);\n }", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }", "public static boolean add(String logMessage) {\n\n\t\t// Take care just in case nasty stuff happens adding to the file. \n\t\ttry {\n\t\t\ttrail.append(logMessage);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }", "public void append(Object item);", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "private static void addToLog(String message) {\n\t\ttry {\n\t\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yy HH:mm:ss:SS\");\n\t\t\tDate dateobj = new Date();\n\t\t\tlog.write(df.format(dateobj) + \": \" + message + \"\\n\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error With the Log File\");\n\t\t\tSystem.err.println(\"Exiting...\");\n\t\t\tSystem.exit(1);\n\t\t};\n\t}", "public void add(DirectoryComponent item) {\r\n\t\tthis.DirectoryList.add(item);\r\n\r\n\t}", "public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "private void _addMessage(LogMessage logMessage) {\n\t\tString realmName = logMessage.getRealm();\n\t\tLinkedHashSet<LogMessage> logMessages = this.logMessagesByRealmAndId.computeIfAbsent(realmName,\n\t\t\t\tOperationsLog::newHashSet);\n\t\tlogMessages.add(logMessage);\n\n\t\t// store under locator\n\t\tLinkedHashMap<Locator, LinkedHashSet<LogMessage>> logMessagesLocator = this.logMessagesByLocator.computeIfAbsent(\n\t\t\t\trealmName, this::newBoundedLocatorMap);\n\t\tLinkedHashSet<LogMessage> messages = logMessagesLocator.computeIfAbsent(logMessage.getLocator(),\n\t\t\t\tOperationsLog::newHashSet);\n\t\tmessages.add(logMessage);\n\n\t\t// prune if necessary\n\t\tList<LogMessage> messagesToRemove = _pruneMessages(realmName, logMessages);\n\n\t\t// persist changes for non-transient realms\n\t\tStrolchRealm realm = getContainer().getRealm(realmName);\n\t\tif (!realm.getMode().isTransient())\n\t\t\tpersist(realm, logMessage, messagesToRemove);\n\t}", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\n }", "void addRecord(HistoryRecord record) throws IOException;", "public void addItem(Item i) {\r\n assert (ic != null);\r\n \r\n ic.setItem(i);\r\n ic.setHandler(handler);\r\n items.add(ic.getItem());\r\n }", "public void add(E item);", "public void add(E item) {\n\t\tDblListnode<E> tmp = lastNode;\n\t\tlastNode.setNext(new DblListnode<E>(item));\n\t lastNode = lastNode.getNext();\n\t lastNode.setPrev(tmp);\n\t numItems++;\n\t}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "@SuppressWarnings (\"unchecked\") public void add(String item){\n if(item==null)\n return;\n items.add(item.trim());\n }", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "void add(E item);", "void add(E item);", "void add(E item);", "public void add(ItemInfo item) {\n\t\tsynchronized (mContents) {\n\t\t\titem.registerObserver(this);\n\t\t\tmContents.add(item);\n\t\t\tif (item instanceof ShortCutInfo) {\n\t\t\t\tif (((ShortCutInfo) item).getRelativeItemInfo() == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmTotleUnreadCount += ((ShortCutInfo) item).getRelativeItemInfo().getUnreadCount();\n\t\t\t}\n\t\t}\n\t}", "void add(T item);", "public void add(int index, Object item)\n {\n items[index] = item;\n numItems++;\n }", "public void add(String nameItem)\n\t{\n\t\tmenu.add(nameItem);\n\t}", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public void addFileUploaderItem(FileUploaderItem item) {\n m_items.addView(item, new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n ));\n }", "public void add_to_log(String s){\n }", "public void add(T item) {\n\t\tcounts.put(item, counts.getOrDefault(item, 0) + 1);\n\t}", "public void addAccessRequestHistory(AccessRequestHistoryItem item) {\n if (!getAccessRequestHistory().contains(item)) {\n getAccessRequestHistory().add(item);\n }\n }", "void addLog(String beforeChange, String afterChange, String time) {\r\n ArrayList<String> logItem = new ArrayList<>();\r\n logItem.add(beforeChange);\r\n logItem.add(afterChange);\r\n logItem.add(time);\r\n allLogs.add(logItem);\r\n writeToFile(\"Save.bin\",allLogs);\r\n }", "public void addItem(String key, Item item) throws IOException {\n\n itemMap.get(key).add(item);\n\n if(item.getImportance().equals(\"yes\")) importantItemList.add(item);\n\n notifyObservers(item);\n\n fileWrite.saveItemMap(this, file);\n\n }", "public void addLog(int type)\n {\n m_Log.addFirst(new SecurityLog(type));\n //truncate log list to 6 entries\n if(m_Log.size() > 6)\n m_Log.removeLast();\n }", "void addLogToBatch(TelemetryData log) throws IOException;", "void addVersionedItemWritten( AbstractVersionedItem versionedItem ) {\n\n // Sanity check the input.\n Objects.requireNonNull( versionedItem );\n\n // Track all versioned items written by this transaction.\n this.versionedItemsWritten.add( versionedItem );\n\n // If we have already seen a write conflict, fail early.\n if ( this.newerRevisionSeen ) {\n throw new WriteConflictException();\n }\n\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void addItem(String item){\n adapter.add(item);\n }", "public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "private void addToHistory(String msg){\n\t\ttry{\n\t\t\tlockHistory.writeLock().lock();\n\t\t\thistory.add(msg);\n\t\t\tlogOut.write(msg);\n\t\t\tlogOut.newLine();\n\t\t\tlogOut.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tlockHistory.writeLock().unlock();\n\t\t}\n\t}", "private void addItem(Movie item) {\n mDataset.add(item);\n notifyItemInserted(mDataset.size() );\n notifyDataSetChanged();\n }", "public void Add(String item) {\n byte[] bites = Utils.hexToBytes(item);\n mpBuffer += Utils.bytesToHex(bites);\n mLenght += bites.length;\n mBackOffset = mLenght;\n }", "public void add(food entry)\n\t{\n\t\titems.add(entry);\n\t\t//updates isChanged to show changes\n\t\tisChanged = true;\n\t}", "public void addEntry(String itemName, double itemPrice, boolean addToCart, double itemQuantity) {\n ItemEntry entry = new ItemEntry(itemName, itemPrice, addToCart, itemQuantity);\n itemList.add(entry);\n }" ]
[ "0.7098763", "0.7080977", "0.68204725", "0.6570685", "0.6548045", "0.6451395", "0.6447023", "0.64438033", "0.64438033", "0.63819486", "0.6335727", "0.6299928", "0.6286575", "0.6281328", "0.6245021", "0.62225974", "0.62214935", "0.6216328", "0.62147194", "0.6173257", "0.61652225", "0.6159683", "0.6156366", "0.6125011", "0.61168236", "0.6101281", "0.60975", "0.6075876", "0.6075691", "0.6065179", "0.60635835", "0.6059891", "0.6052964", "0.60316503", "0.60059977", "0.59944904", "0.599305", "0.5983601", "0.59725904", "0.59666353", "0.59620863", "0.5958974", "0.5955182", "0.59528583", "0.5945945", "0.5944819", "0.5940348", "0.593461", "0.59221476", "0.5921045", "0.590839", "0.5896765", "0.5889524", "0.5881041", "0.58768594", "0.58574975", "0.5856772", "0.5854232", "0.584753", "0.5830404", "0.58287966", "0.5827063", "0.58263236", "0.5819433", "0.5808767", "0.58051765", "0.57926226", "0.5788184", "0.5785951", "0.57815087", "0.57544106", "0.5753589", "0.57532066", "0.57498884", "0.5740937", "0.5740937", "0.5740937", "0.57348174", "0.57338643", "0.5713328", "0.57094926", "0.5702691", "0.5687821", "0.5684649", "0.56792516", "0.5672492", "0.56507206", "0.56500506", "0.56401026", "0.5639279", "0.5630751", "0.5618767", "0.56150556", "0.5607835", "0.5602847", "0.5587752", "0.557991", "0.55783933", "0.5573399", "0.55708337" ]
0.6376923
10
Set whether the buttons are enabled.
private void setAllButtonsEnabledStatus(boolean isEnabled) { Button identifyButton = (Button) findViewById(R.id.identify); identifyButton.setEnabled(isEnabled); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setButtonsEnable(boolean b){\n addButton.setEnabled(b);\n clearButton.setEnabled(b);\n peelOffButton.setEnabled(b);\n buttonControlPanel.setEnabled(b);\n progressCheckBox.setEnabled(b);\n }", "private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(true);\r\n\t\tselect.setEnabled(true);\r\n\t\tfilter.setEnabled(true);\r\n\t}", "protected void enableButtons() {\n if (mPrevious_question.isPressed() || mNext_question.isPressed()) {\n mFalseButton.setEnabled(true);\n mTrueButton.setEnabled(true);\n }\n }", "public void enableButtons() {\n //a loop to go through all buttons\n for (int i = 0; i < currentBoard.getSizeX(); i++) {\n Inputbuttons[i].setEnabled(true);\n }\n }", "protected void setEnabledButtons( final boolean b )\r\n {\r\n jButtonSource.setEnabled( b );\r\n jButtonDestination.setEnabled( b );\r\n jButtonClearFileList.setEnabled( b );\r\n jButtonDoAction.setEnabled( b );\r\n }", "private void setButtonsEnabledState() {\n if (mBroadcastingLocation) {\n mStartButton.setEnabled(false);\n mStopButton.setEnabled(true);\n } else {\n mStartButton.setEnabled(true);\n mStopButton.setEnabled(false);\n }\n }", "private void toggleButtonsEnabled() {\r\n final Button headsBtn = findViewById(R.id.b_heads);\r\n final Button tailsBtn = findViewById(R.id.b_tails);\r\n final Button startBtn = findViewById(R.id.b_startGame);\r\n\r\n headsBtn.setEnabled(false);\r\n tailsBtn.setEnabled(false);\r\n startBtn.setEnabled(true);\r\n }", "private void setButtonsEnabledState() {\n if (mRequestingLocationUpdates) {\n mStartUpdatesButton.setEnabled(false);\n mStopUpdatesButton.setEnabled(true);\n } else {\n mStartUpdatesButton.setEnabled(true);\n mStopUpdatesButton.setEnabled(false);\n }\n }", "private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }", "public void enableAllButtons(){\n\t\tbtnConfirmOrNext.setEnabled(true);\n\t\tbtnStop.setEnabled(true);\n\t\tbtnListenAgain.setEnabled(true);\t\t\n\t}", "private void enableButtons(boolean enabled) {\n saveUserButton.setEnabled(enabled);\n deleteUserButton.setEnabled(enabled);\n resetPassButton.setEnabled(enabled);\n }", "private void setAllButtonsEnabledStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n Button loadImg1 = (Button) findViewById(R.id.loadImg1);\n Button loadImg2 = (Button) findViewById(R.id.loadImg2);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n loadImg1.setEnabled(isEnabled);\n loadImg2.setEnabled(isEnabled);\n }", "private void setShowButtonsEnabledStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n showBaby.setEnabled(isEnabled);\n }", "void enableBtn() {\n findViewById(R.id.button_play).setEnabled(true);\n findViewById(R.id.button_pause).setEnabled(true);\n findViewById(R.id.button_reset).setEnabled(true);\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "private void setAllButtonsEnabledStatus(boolean isEnabled) {\n Button selectImageButton = (Button) findViewById(R.id.select_image);\n selectImageButton.setEnabled(isEnabled);\n\n Button detectButton = (Button) findViewById(R.id.detect);\n detectButton.setEnabled(isEnabled);\n\n //Button ViewLogButton = (Button) findViewById(R.id.view_log);\n //ViewLogButton.setEnabled(isEnabled);\n }", "private void setEnabled(JButton a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "private void buttonEnable(){\n\t\t\taddC1.setEnabled(true);\n\t\t\taddC2.setEnabled(true);\n\t\t\taddC3.setEnabled(true);\n\t\t\taddC4.setEnabled(true);\n\t\t\taddC5.setEnabled(true);\n\t\t\taddC6.setEnabled(true);\n\t\t\taddC7.setEnabled(true);\n\t\t}", "public void enable()\n\t{\n\t\tplayButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tbigTwoPanel.setEnabled(true);\n\t}", "public void enableButtons (boolean enabled)\n\t{\n\t\tfor (int i = 1; i <= 9; ++ i)\n\t\t\ttileButton[i].setEnabled (enabled);\n\t\tfor (int i = 0; i <= 1; ++ i)\n\t\t\tdieButton[i].setEnabled (enabled);\n\t\tdoneButton.setEnabled (enabled);\n\t}", "private void enableButton(Button b) {\n b.setEnabled(true);\n }", "protected void disableButtons() {\n if (mFalseButton.isPressed() || mTrueButton.isPressed())\n mFalseButton.setEnabled(false);\n mTrueButton.setEnabled(false);\n }", "private void setBtnUsability(boolean enable){\n pushButton.setEnabled(enable);\n popButton.setEnabled(enable);\n }", "public void setButtons(\r\n boolean enableOpenButton, boolean enableCheckHealthButton, boolean enableCloseButton,\r\n boolean enableClaimButton, boolean enableReleaseButton,\r\n boolean enableDeviceEnableButton, boolean enableDeviceDisableButton,\r\n boolean enableClearDataButton,\r\n boolean enableBeginEnrollCaptureButton, boolean enableEndCatureButton, boolean enableBeginVerifyCaptureButton,\r\n boolean enableIdentifyMatchButton, boolean enableVerifyMatchButton,\r\n boolean enableIdentifyButton, boolean enableVerifyButton\r\n ) {\r\n jOpen.setEnabled(enableOpenButton);\r\n jCheckHealth.setEnabled(enableCheckHealthButton);\r\n jClose.setEnabled(enableCloseButton);\r\n jClaim.setEnabled(enableClaimButton);\r\n jRelease.setEnabled(enableReleaseButton);\r\n jDeviceEnable.setEnabled(enableDeviceEnableButton);\r\n jDeviceDisable.setEnabled(enableDeviceDisableButton);\r\n jClearData.setEnabled(enableClearDataButton);\r\n jBeginEnrollCapture.setEnabled(enableBeginEnrollCaptureButton);\r\n jEndCapture.setEnabled(enableEndCatureButton);\r\n jBeginVerifyCapture.setEnabled(enableBeginVerifyCaptureButton);\r\n jIdentifyMatch.setEnabled(enableIdentifyMatchButton);\r\n jVerifyMatch.setEnabled(enableVerifyMatchButton);\r\n jIdentify.setEnabled(enableIdentifyButton);\r\n jVerify.setEnabled(enableVerifyButton);\r\n }", "private void disableButtons()\r\n {\r\n }", "private void enableControls(boolean b) {\n\n\t}", "private void enableButtons(){\n \n if (this.geselecteerdeStageplaats != null && this.geselecteerdeStageplaats.getBedrijfID() != null){\n this.jButtonSaveStageplaats.setEnabled(true);\n this.jButtonDeleteStageplaats.setEnabled(true);\n\n }\n else{\n this.jButtonSaveStageplaats.setEnabled(false);\n this.jButtonDeleteStageplaats.setEnabled(false);\n }\n if (this.jComboBoxGekendeBedrijven.getSelectedItem() != null){\n this.jButtonBedrijfSelecteren.setEnabled(true);\n }\n else {\n this.jButtonBedrijfSelecteren.setEnabled(false);\n }\n \n }", "private void setBtnState(){\n recordBtn.setEnabled(!recording);\n stopBtn.setEnabled(recording);\n pauseBtn.setEnabled(playing & !paused);\n resumeBtn.setEnabled(paused);\n }", "private void setEnabledBP(boolean a) {\n\t\tsetEnabled(btnNewButton_1, a);\r\n\t}", "@Override\n public void setEnabled(boolean b)\n {\n btnDeselectAll.setEnabled(b);\n btnExport.setEnabled(b);\n btnSelectAll.setEnabled(b);\n checkBoxList1.setEnabled(b);\n\n }", "public void enableProductionButtons(){\n for(int i = 0; i < 3; i++){\n productionButtons[i].setText(\"Activate\");\n if (gui.getViewController().getGame().getProductionCard(i) != null){\n productionButtons[i].setEnabled(true);\n } else {\n productionButtons[i].setEnabled(false);\n }\n productionButtons[i].setToken(true);\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i], i));\n }\n\n baseProductionPanel.enableButton();\n }", "private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }", "private void setButton(boolean a) {\n//Vo hieu hoac co hieu luc cho cac JButton\n this.btnCourseAdd.setEnabled(a);\n this.btnCourseDelete.setEnabled(a);\n this.btnCourseEdit.setEnabled(a);\n this.btnCourseSave.setEnabled(!a);\n this.btnCourseReport.setEnabled(!a);\n this.btnCourseReset.setEnabled(!a);\n this.btnCourseClose.setEnabled(a);\n }", "private void setIdentifyButtonEnabledStatus(boolean isEnabled) {\n Button button = (Button) findViewById(R.id.identify);\n button.setEnabled(isEnabled);\n }", "public void setEnabled(boolean b) {\n // Not supported for MenuComponents\n }", "private void setShareButtonsEnabledStatus(boolean isEnabled) {\n Button share = (Button) findViewById(R.id.share);\n share.setEnabled(isEnabled);\n }", "private void disableButtons() {\n for (DeployCommand cmd : DeployCommand.values()){\n setButtonEnabled(cmd, false);\n }\n butDone.setEnabled(false);\n setLoadEnabled(false);\n setUnloadEnabled(false);\n setAssaultDropEnabled(false);\n }", "private void setDetectButtonEnabledStatus(boolean isEnabled) {\n Button detectButton = (Button) findViewById(R.id.detect);\n detectButton.setEnabled(isEnabled);\n }", "public void setEnabled(boolean b) {\n setFocusable(b);\n other.setEnabled(b);\n }", "@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }", "public void disableButtons() {\n //a loop to go through all buttons\n for (int i = 0; i < currentBoard.getSizeX(); i++) {\n Inputbuttons[i].setEnabled(false);\n }\n }", "public void resetButtons() {\n\t\tboolean bool = selectedLesson.isEnable();\n\t\tview.getTestButton().setEnabled(bool);\n\t\tview.getLearnButton().setEnabled(bool);\n\t}", "public void setEnabled(boolean is_enabled){\n\t\tswingComponent.setEnabled(is_enabled);\n\t}", "private void toggleButtons(boolean enableFlag)\r\n {\r\n for (JButton btn : btnList)\r\n {\r\n btn.setEnabled(enableFlag);\r\n }\r\n }", "public boolean setEnabled(boolean enable);", "private void configureEnableButtons() {\r\n\t\ttglbtnBirthdays.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == tglbtnBirthdays) {\r\n\t\t\t\t\tif (tglbtnBirthdays.isSelected()) {\r\n\t\t\t\t\t\ttglbtnBirthdays.setText(\"Disable\");\r\n\t\t\t\t\t\ttheSender.setBirthdayTemplate(emailStorage.getTemplate(templateBirthday));\r\n\t\t\t\t\t\ttheSender.runBirthdaySetUp();\r\n\t\t\t\t\t\ttheSender.resumeSendingBirthdays();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tglbtnBirthdays.isSelected()) {\r\n\t\t\t\t\t\ttglbtnBirthdays.setText(\"Enable\");\r\n\t\t\t\t\t\ttheSender.stopSendingBirthdays();\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\ttglbtnAnniv.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == tglbtnAnniv) {\r\n\t\t\t\t\tif (tglbtnAnniv.isSelected()) {\r\n\t\t\t\t\t\ttglbtnAnniv.setText(\"Disable\");\r\n\t\t\t\t\t\ttheSender.setAnnivTemplate(emailStorage.getTemplate(templateAnniv));\r\n\t\t\t\t\t\ttheSender.runAnnivSetUp();\r\n\t\t\t\t\t\ttheSender.resumeSendingAnniv();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tglbtnAnniv.isSelected()) {\r\n\t\t\t\t\t\ttglbtnAnniv.setText(\"Enable\");\r\n\t\t\t\t\t\ttheSender.stopSendingAnniv();\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\t\r\n\t}", "public void setEnabled(boolean enabled);", "public void setEnabled(boolean enabled);", "void setEditButtonEnabled(boolean isEnabled);", "public void disableButtons() {\n\t\t\r\n\t\tcapture.setEnabled(false);\r\n\t\tstop.setEnabled(false);\r\n\t\tfilter.setEnabled(false);\r\n\t\tsave.setEnabled(false);\r\n\t\t//load.setEnabled(false);\r\n\t}", "private void enableRadioButtons(){\n\n this.acOffRadioButton.setEnabled(true);\n\n this.heatOffRadioButton.setEnabled(true);\n\n this.lightsOnRadioButton.setEnabled(true);\n this.lightsOffRadioButton.setEnabled(true);\n\n this.leftDoorsOpenRadioButton.setEnabled(true);\n this.leftDoorsCloseRadioButton.setEnabled(true);\n\n this.rightDoorsOpenRadioButton.setEnabled(true);\n this.rightDoorsCloseRadioButton.setEnabled(true);\n }", "private void moikhoacontrol(boolean b) {\n\t\tbtnSua.setEnabled(b);\n\t\tbtnluu.setEnabled(b);\n\t\tbtnxoa.setEnabled(b);\n\t\tbtnThoat.setEnabled(b);\n\t\tbtnTim.setEnabled(b);\n\t\t\n\t}", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "private void setDishBtnUsability(boolean enable){\n dishBtn1.setEnabled(enable);\n dishBtn2.setEnabled(enable);\n dishBtn3.setEnabled(enable);\n dishBtn4.setEnabled(enable);\n dishBtn5.setEnabled(enable);\n }", "@Override\n public void enableProductionButtons() {\n gameboardPanel.disableEndTurnButton();\n gameboardPanel.disableEndOfProductionButton();\n gameboardPanel.enableProductionButtons();\n leaderCardsPanel.enableProductionButtons();\n }", "private void setShowAndShareButtonStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n }", "protected void enableButton(Button button){\n button.setVisibility(View.VISIBLE);\n button.setClickable(true);\n }", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "private void setButtons(boolean iVal)\n {\n buttonLogin.setEnabled(iVal);\n buttonLogin.setClickable(iVal);\n buttonSignup.setEnabled(iVal);\n buttonSignup.setClickable(iVal);\n }", "public void enable() {\r\n m_enabled = true;\r\n }", "public void setButtonsConfig(boolean connected){\n btn_help.setEnabled(connected);\n btn_retry.setEnabled(!connected);\n }", "private void ctrlPuasar() {\n btnIniciar.setEnabled(true);\n btnPausar.setEnabled(false);\n\n }", "public void enableChoice() {\n\t\t// Enable the buttons, lighting them up\n\t\trock.setEnabled(true);\n\t\tpaper.setEnabled(true);\n\t\tscissors.setEnabled(true);\n\t}", "public void setButtonBuyEnabled(boolean b) {\n\t\tbutton_buy.setEnabled(b);\n\t}", "public void disableAllButtons(){\n\t\tbtnConfirmOrNext.setEnabled(false);\n\t\tbtnStop.setEnabled(false);\n\t\tbtnListenAgain.setEnabled(false);\n\t}", "protected void setMinVolumeStateOnButtons() {\n mVolDownButton.setEnabled(false);\n mVolUpButton.setEnabled(true);\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n if (enabled)\n sinkEvents(Event.ONCLICK | Event.ONKEYDOWN);\n else\n unsinkEvents(Event.ONCLICK | Event.ONKEYDOWN);\n }", "public void setEnable(String name,boolean value) {\n\t\tgetButtonPanel().getButton(name).setEnabled(value);\n\t\tgetGameMenuBar().getItem(name).setEnabled(value);\n\t}", "public boolean isEnabled_txt_Fuel_Rewards_Page_Button(){\r\n\t\tif(txt_Fuel_Rewards_Page_Button.isEnabled()) { return true; } else { return false;} \r\n\t}", "void setSaveButtonEnabled(boolean isEnabled);", "public void setEnabled(final boolean enabled);", "public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }", "private void habilitar() {\n\n if (i <= 0) {\n jButton4.setEnabled(false);\n } else {\n jButton4.setEnabled(true);\n }\n }", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "public void setEnablePanel(boolean enable){\n\t\t\n\t\taddFaultButton.setEnabled(enable);\n\t\taddConditionButton.setEnabled(enable);\n\t\tremoveFaultButton.setEnabled(enable);\n\t\tremoveConditionButton.setEnabled(enable);\n\t}", "private void setButtonEnabled(FileType type) {\r\n\t\tswitch(type) {\r\n\t\t\tcase POS:\r\n\t\t\t\tthis.posBtn.setEnabled(ComponentData.setPosBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t\tcase UNCAPTURED_AUTH:\r\n\t\t\t\tthis.uncapturedBtn.setEnabled(ComponentData.setUncapturedBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t\tcase CAPTURED:\r\n\t\t\t\tthis.capturedBtn.setEnabled(ComponentData.setCapturedBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setupInitEnable(){\n fwdButton.setEnabled(false);\n revButton.setEnabled(false);\n leftButton.setEnabled(false);\n rightButton.setEnabled(false);\n this.powerIcon.setEnabled(false);\n lServoWarn.setEnabled(false);\n rServoWarn.setEnabled(false); \n slideAuto.setEnabled(true); \n }", "public void enableDeviceSwitchButtons(boolean enabled) {\r\n\t\tthis.menuToolBar.enableDeviceSwitchButtons(enabled);\r\n\t\tthis.menuBar.enableDeviceSwitchButtons(enabled);\r\n\t}", "public void enableColourButtons(boolean bool) {\n\t\tredButt.setEnabled(bool);\n\t\tblueButt.setEnabled(bool);\n\t\tgreenButt.setEnabled(bool);\n\t\tyellowButt.setEnabled(bool);\n\t}", "public static void enableButtons(ArrayList<JButton> gameButton){\n for(int i=0; i<gameButton.size(); ++i){\n gameButton.get(i).setEnabled(true);\n }\n }", "public void setEnabled(boolean value) {\n this.enabled = value;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "private void deActivateButtons(){\n limiteBoton.setEnabled(false);\n derivadaBoton.setEnabled(false);\n integralBoton.setEnabled(false);\n}", "public void setEnabled(boolean value) {\n m_Enabled = value;\n }", "public void enableOperationsButton(boolean b) {\n\t\tintersection.setEnabled(b);\n\t\tunion.setEnabled(b);\n\t\tdifference.setEnabled(b);\n\t}", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void updateButtons(){\n\t\tif (Player.getPlayer(this).questManager.atMaxNumQuests()) {\n\t\t\tcreateQuest.setEnabled(false);\n\t\t} else {\n\t\t\tcreateQuest.setEnabled(true);\n\t\t}\n\t\tif (selectedQuest != null){\n\t\t\tdeleteQuest.setEnabled(true);\n\t\t\tcompleteQuest.setEnabled(true);\n\t\t} else {\n\t\t\tdeleteQuest.setEnabled(false);\n\t\t\tcompleteQuest.setEnabled(false);\n\t\t}\n\t}", "void setEnable(boolean b) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}", "public void disableButtons() {\n\n for (Button b: buttons) {\n b.setClickable(false);\n }\n\n }", "public void setEnabled(boolean enabled) {\n mEnabled = enabled;\n }", "public void enablePanel(boolean b);" ]
[ "0.7972591", "0.79298633", "0.78473574", "0.777588", "0.77713174", "0.77395093", "0.77356833", "0.76617324", "0.7615503", "0.7577133", "0.75541735", "0.7490867", "0.7486423", "0.74847305", "0.7397239", "0.7338775", "0.73113364", "0.7278182", "0.7262671", "0.72528327", "0.72357583", "0.71966916", "0.70927495", "0.70907134", "0.7064625", "0.70233077", "0.7015199", "0.70091134", "0.69865006", "0.69746643", "0.6958484", "0.695227", "0.69161123", "0.6891475", "0.68644434", "0.68584955", "0.6847571", "0.6846933", "0.681887", "0.6816329", "0.68077713", "0.68026286", "0.6802054", "0.6801239", "0.6800541", "0.6797555", "0.6794464", "0.6794464", "0.6781445", "0.6778686", "0.6778003", "0.67778325", "0.6775546", "0.6759381", "0.675404", "0.67382556", "0.6737545", "0.67322695", "0.67322695", "0.67322695", "0.67322695", "0.67309517", "0.67261016", "0.6706206", "0.6700984", "0.66889614", "0.66818863", "0.66763496", "0.66682976", "0.66611975", "0.66583025", "0.6654417", "0.66523427", "0.6644156", "0.6644067", "0.66391605", "0.6637196", "0.66236204", "0.66220695", "0.6593409", "0.6591453", "0.65886956", "0.65883505", "0.6587427", "0.6581598", "0.6581598", "0.6581598", "0.6581598", "0.6579336", "0.6561433", "0.65560186", "0.65501916", "0.65501916", "0.65451115", "0.6543023", "0.65297383", "0.65222305", "0.6518958", "0.6517781", "0.65169257" ]
0.73301363
16
Set the group button is enabled or not.
private void setIdentifyButtonEnabledStatus(boolean isEnabled) { Button button = (Button) findViewById(R.id.identify); button.setEnabled(isEnabled); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setGroupEnabled(int group, boolean enabled);", "@Override\n public void setEnabled(boolean b)\n {\n btnDeselectAll.setEnabled(b);\n btnExport.setEnabled(b);\n btnSelectAll.setEnabled(b);\n checkBoxList1.setEnabled(b);\n\n }", "Boolean groupingEnabled();", "public void setEnabled(boolean b) {\n // Not supported for MenuComponents\n }", "@Override\n\tpublic void onEnable() {\n\t\tsetGMEventHandler(new GroupManagerEventHandler(this));\n\t\tonEnable(false);\n\t}", "public void setGroupEnabled(String groupName, boolean enabled)\n\t{\n\t\tComponentGroup g = groups.get(groupName);\n\t\tif (g == null) return;\n\t\tg.setEnabling(enabled);\n\t}", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "private void setButtonsEnable(boolean b){\n addButton.setEnabled(b);\n clearButton.setEnabled(b);\n peelOffButton.setEnabled(b);\n buttonControlPanel.setEnabled(b);\n progressCheckBox.setEnabled(b);\n }", "public void setEnabled(boolean b) {\n setFocusable(b);\n other.setEnabled(b);\n }", "private void setEnabledBP(boolean a) {\n\t\tsetEnabled(btnNewButton_1, a);\r\n\t}", "private void setEnabled(JButton a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }", "public void setEnable(String name,boolean value) {\n\t\tgetButtonPanel().getButton(name).setEnabled(value);\n\t\tgetGameMenuBar().getItem(name).setEnabled(value);\n\t}", "private void enableButton(Button b) {\n b.setEnabled(true);\n }", "public void enablePanel(boolean b);", "private void buttonEnable(){\n\t\t\taddC1.setEnabled(true);\n\t\t\taddC2.setEnabled(true);\n\t\t\taddC3.setEnabled(true);\n\t\t\taddC4.setEnabled(true);\n\t\t\taddC5.setEnabled(true);\n\t\t\taddC6.setEnabled(true);\n\t\t\taddC7.setEnabled(true);\n\t\t}", "private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }", "@Override\n public void setGroupSet(final boolean val) {\n groupSet = val;\n }", "private void moikhoacontrol(boolean b) {\n\t\tbtnSua.setEnabled(b);\n\t\tbtnluu.setEnabled(b);\n\t\tbtnxoa.setEnabled(b);\n\t\tbtnThoat.setEnabled(b);\n\t\tbtnTim.setEnabled(b);\n\t\t\n\t}", "protected void setEnabledButtons( final boolean b )\r\n {\r\n jButtonSource.setEnabled( b );\r\n jButtonDestination.setEnabled( b );\r\n jButtonClearFileList.setEnabled( b );\r\n jButtonDoAction.setEnabled( b );\r\n }", "public void setEnabled(boolean enabled);", "public void setEnabled(boolean enabled);", "final public void setAffectsGroup(boolean value) {\n affectsGroup = value;\n }", "public boolean setEnabled(boolean enable);", "private void setButtonsEnabledState() {\n if (mBroadcastingLocation) {\n mStartButton.setEnabled(false);\n mStopButton.setEnabled(true);\n } else {\n mStartButton.setEnabled(true);\n mStopButton.setEnabled(false);\n }\n }", "public void setEnabled(boolean aFlag) { _enabled = aFlag; }", "@Override\n public void onGroupStatusChanged(IClientContext context, IGuiElement.GroupState status, IGuiElement button) throws Exception\n {\n IUser user = context.getUser();\n if (!user.hasRole(Role.ADMIN.getName()))\n {\n button.setVisible(false);\n }\n }", "public void setEnabled(boolean value) {\n m_Enabled = value;\n }", "@Override\n\tpublic void setEnabled(boolean flag) {\n\t\t\n\t}", "public void enable() {\r\n m_enabled = true;\r\n }", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "public void setEnabled(boolean value) {\n this.enabled = value;\n }", "private void enableControls(boolean b) {\n\n\t}", "void enableBtn() {\n findViewById(R.id.button_play).setEnabled(true);\n findViewById(R.id.button_pause).setEnabled(true);\n findViewById(R.id.button_reset).setEnabled(true);\n }", "public void setGroupVisible(int group, boolean visible);", "private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(true);\r\n\t\tselect.setEnabled(true);\r\n\t\tfilter.setEnabled(true);\r\n\t}", "private void habilitar() {\n\n if (i <= 0) {\n jButton4.setEnabled(false);\n } else {\n jButton4.setEnabled(true);\n }\n }", "public void setEnabled( boolean b )\n {\n filterCombo.setEnabled( b );\n filterEditorButton.setEnabled( b );\n }", "private void setEnabled(JLabel a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "public void setInValidGroup(boolean inValidGroup){this.inValidGroup = inValidGroup;}", "@Override public void setEnabled(boolean enabled) {\n super.setEnabled(enabled);\n\n m_globalEnabled = enabled;\n checkEnabled();\n }", "public void botonHabilitar(JButton boton, boolean estado){\n boton.setEnabled(estado);\n }", "public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }", "public void setEnable(boolean b) { this.editText.setEnabled(b); }", "public void setEnabledGeneral(boolean estado) {\r\n\t\tthis.partidasList.setEnabled(estado);\r\n\t\tthis.btnCambiarNick.setEnabled(estado);\r\n\t\tthis.btnCambiarPassword.setEnabled(estado);\r\n\t\tthis.btnCerrarSesion.setEnabled(estado);\r\n\t\tthis.btnUnirse.setEnabled(estado);\r\n\t}", "private void setButton(boolean a) {\n//Vo hieu hoac co hieu luc cho cac JButton\n this.btnCourseAdd.setEnabled(a);\n this.btnCourseDelete.setEnabled(a);\n this.btnCourseEdit.setEnabled(a);\n this.btnCourseSave.setEnabled(!a);\n this.btnCourseReport.setEnabled(!a);\n this.btnCourseReset.setEnabled(!a);\n this.btnCourseClose.setEnabled(a);\n }", "@Override\n public void setEnabled(boolean val) {\n super.setEnabled(val);\n mEnabled = val;\n }", "boolean isSetProductGroup();", "@ZAttr(id=1153)\n public void setGalGroupIndicatorEnabled(boolean zimbraGalGroupIndicatorEnabled) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalGroupIndicatorEnabled, zimbraGalGroupIndicatorEnabled ? Provisioning.TRUE : Provisioning.FALSE);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public void setFilterByGroup(boolean value)\r\n {\r\n getSemanticObject().setBooleanProperty(swpres_filterByGroup, value);\r\n }", "public void enable()\n\t{\n\t\tplayButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tbigTwoPanel.setEnabled(true);\n\t}", "void setEnable(boolean b) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void setEnabled(boolean is_enabled){\n\t\tswingComponent.setEnabled(is_enabled);\n\t}", "public boolean setToExtend(AccessGroup group)\n {\n if (!isParent(group))\n {\n this.extendGroup = group;\n if (this.extendGroup != null)\n {\n this.extendGroup_name = this.extendGroup.getName();\n }\n return true;\n }\n return false;\n }", "private void setAllButtonsEnabledStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n Button loadImg1 = (Button) findViewById(R.id.loadImg1);\n Button loadImg2 = (Button) findViewById(R.id.loadImg2);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n loadImg1.setEnabled(isEnabled);\n loadImg2.setEnabled(isEnabled);\n }", "public void setEnabled(final boolean enabled);", "public void setEnabled(UIEvent.Type aType, boolean aValue) { getEventAdapter(true).setEnabled(aType, aValue); }", "public void enable() {\n \t\t\tsetEnabled(true);\n \t\t}", "public void setEnabled(boolean enabled) {\r\n\t}", "public void toggleEnable();", "@Override\n public void setEnabled(boolean enabled) {\n }", "void setEditButtonEnabled(boolean isEnabled);", "public boolean enabled(){\n return enabled;\n }", "public static void enableDisableViewGroup(ViewGroup viewGroup, boolean enabled) {\r\n int childCount = viewGroup.getChildCount();\r\n for (int i = 0; i < childCount; i++) {\r\n View view = viewGroup.getChildAt(i);\r\n if(view.isFocusable())\r\n view.setEnabled(enabled);\r\n if (view instanceof ViewGroup) {\r\n enableDisableViewGroup((ViewGroup) view, enabled);\r\n } else if (view instanceof ListView) {\r\n if(view.isFocusable())\r\n view.setEnabled(enabled);\r\n ListView listView = (ListView) view;\r\n int listChildCount = listView.getChildCount();\r\n for (int j = 0; j < listChildCount; j++) {\r\n if(view.isFocusable())\r\n listView.getChildAt(j).setEnabled(false);\r\n }\r\n }\r\n }\r\n }", "public void setEnabled (boolean enabled) {\r\n\tcheckWidget ();\r\n\tint topHandle = topHandle ();\r\n\tint flags = enabled ? 0 : OS.Pt_BLOCKED | OS.Pt_GHOST;\r\n\tOS.PtSetResource (topHandle, OS.Pt_ARG_FLAGS, flags, OS.Pt_BLOCKED | OS.Pt_GHOST);\r\n}", "private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }", "public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}", "public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}", "private void enableRadioButtons(){\n\n this.acOffRadioButton.setEnabled(true);\n\n this.heatOffRadioButton.setEnabled(true);\n\n this.lightsOnRadioButton.setEnabled(true);\n this.lightsOffRadioButton.setEnabled(true);\n\n this.leftDoorsOpenRadioButton.setEnabled(true);\n this.leftDoorsCloseRadioButton.setEnabled(true);\n\n this.rightDoorsOpenRadioButton.setEnabled(true);\n this.rightDoorsCloseRadioButton.setEnabled(true);\n }", "public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }", "private void setShowButtonsEnabledStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n showBaby.setEnabled(isEnabled);\n }", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "private void setBtnUsability(boolean enable){\n pushButton.setEnabled(enable);\n popButton.setEnabled(enable);\n }", "boolean getEnabled();", "boolean getEnabled();", "boolean getEnabled();", "public void setEnabled(boolean bEnabled) {\n txtReferredBy.setEnabled(false);\n cbxProfession.setEnabled(bEnabled);\n cbxEducation.setEnabled(bEnabled);\n txtNotes1.setEnabled(bEnabled);\n txtNotes2.setEnabled(bEnabled);\n txtPartFamName.setEnabled(bEnabled);\n txtPartName.setEnabled(bEnabled);\n txtBirthPlc.setEnabled(bEnabled);\n cbxSpcEvt.setEnabled(bEnabled);\n txtSpclDate.setEnabled(bEnabled);\n txtChildNames.setEnabled(bEnabled);\n txtNumChildren.setEnabled(bEnabled);\n btnLookup.setEnabled(bEnabled);\n }", "private void setButtonsEnabledState() {\n if (mRequestingLocationUpdates) {\n mStartUpdatesButton.setEnabled(false);\n mStopUpdatesButton.setEnabled(true);\n } else {\n mStartUpdatesButton.setEnabled(true);\n mStopUpdatesButton.setEnabled(false);\n }\n }", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "protected void enableButton(Button button){\n button.setVisibility(View.VISIBLE);\n button.setClickable(true);\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "private void setEnabled(JTextField a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "@ZAttr(id=1153)\n public boolean isGalGroupIndicatorEnabled() {\n return getBooleanAttr(Provisioning.A_zimbraGalGroupIndicatorEnabled, true);\n }", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "public void setEnabled(boolean enabled) {\n mEnabled = enabled;\n }", "@ZAttr(id=1153)\n public Map<String,Object> setGalGroupIndicatorEnabled(boolean zimbraGalGroupIndicatorEnabled, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalGroupIndicatorEnabled, zimbraGalGroupIndicatorEnabled ? Provisioning.TRUE : Provisioning.FALSE);\n return attrs;\n }", "private void setButtonEnabled(FileType type) {\r\n\t\tswitch(type) {\r\n\t\t\tcase POS:\r\n\t\t\t\tthis.posBtn.setEnabled(ComponentData.setPosBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t\tcase UNCAPTURED_AUTH:\r\n\t\t\t\tthis.uncapturedBtn.setEnabled(ComponentData.setUncapturedBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t\tcase CAPTURED:\r\n\t\t\t\tthis.capturedBtn.setEnabled(ComponentData.setCapturedBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public boolean isSetGroup() {\n return this.group != null;\n }", "protected void enableButtons() {\n if (mPrevious_question.isPressed() || mNext_question.isPressed()) {\n mFalseButton.setEnabled(true);\n mTrueButton.setEnabled(true);\n }\n }", "private void setShowAndShareButtonStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n }", "public boolean isEnabled() {\n return enabled;\n }" ]
[ "0.7880107", "0.67518836", "0.6583206", "0.65358174", "0.6531646", "0.6525775", "0.65197694", "0.64925706", "0.6413022", "0.6377915", "0.637565", "0.6328161", "0.6312342", "0.62973344", "0.62503004", "0.6233384", "0.62278825", "0.6226736", "0.6200698", "0.6190215", "0.6174887", "0.6174887", "0.6160503", "0.61603457", "0.6154641", "0.6117379", "0.6106368", "0.609638", "0.6090413", "0.6088176", "0.608682", "0.608682", "0.608682", "0.608682", "0.6062847", "0.6053195", "0.6042615", "0.60403425", "0.60394543", "0.60327256", "0.5992849", "0.5980512", "0.5971911", "0.5965185", "0.5953888", "0.595034", "0.5944877", "0.5942408", "0.5936286", "0.59316283", "0.59231585", "0.5915878", "0.59129345", "0.59043026", "0.5901769", "0.5890013", "0.5879472", "0.5876968", "0.58766204", "0.58707494", "0.5870288", "0.58571297", "0.5849329", "0.58467597", "0.5844281", "0.5834788", "0.5831341", "0.58270454", "0.58241796", "0.5822656", "0.581054", "0.5807996", "0.5805514", "0.579332", "0.5787117", "0.57816404", "0.57816154", "0.57816154", "0.57816154", "0.5781496", "0.5777259", "0.57769585", "0.57769585", "0.5775982", "0.57743466", "0.57523376", "0.5749732", "0.57495725", "0.5736937", "0.572457", "0.5722338", "0.5718689", "0.57146025", "0.57083434", "0.57083434", "0.57083434", "0.57083434", "0.5703624", "0.5694787", "0.5691804", "0.569072" ]
0.0
-1
Set the group button is enabled or not.
private void refreshIdentifyButtonEnabledStatus() { if (detected && mPersonGroupId != null) { setIdentifyButtonEnabledStatus(true); } else { setIdentifyButtonEnabledStatus(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setGroupEnabled(int group, boolean enabled);", "@Override\n public void setEnabled(boolean b)\n {\n btnDeselectAll.setEnabled(b);\n btnExport.setEnabled(b);\n btnSelectAll.setEnabled(b);\n checkBoxList1.setEnabled(b);\n\n }", "Boolean groupingEnabled();", "public void setEnabled(boolean b) {\n // Not supported for MenuComponents\n }", "@Override\n\tpublic void onEnable() {\n\t\tsetGMEventHandler(new GroupManagerEventHandler(this));\n\t\tonEnable(false);\n\t}", "public void setGroupEnabled(String groupName, boolean enabled)\n\t{\n\t\tComponentGroup g = groups.get(groupName);\n\t\tif (g == null) return;\n\t\tg.setEnabling(enabled);\n\t}", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "private void setButtonsEnable(boolean b){\n addButton.setEnabled(b);\n clearButton.setEnabled(b);\n peelOffButton.setEnabled(b);\n buttonControlPanel.setEnabled(b);\n progressCheckBox.setEnabled(b);\n }", "public void setEnabled(boolean b) {\n setFocusable(b);\n other.setEnabled(b);\n }", "private void setEnabledBP(boolean a) {\n\t\tsetEnabled(btnNewButton_1, a);\r\n\t}", "private void setEnabled(JButton a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }", "public void setEnable(String name,boolean value) {\n\t\tgetButtonPanel().getButton(name).setEnabled(value);\n\t\tgetGameMenuBar().getItem(name).setEnabled(value);\n\t}", "private void enableButton(Button b) {\n b.setEnabled(true);\n }", "public void enablePanel(boolean b);", "@Override\n public void setGroupSet(final boolean val) {\n groupSet = val;\n }", "private void buttonEnable(){\n\t\t\taddC1.setEnabled(true);\n\t\t\taddC2.setEnabled(true);\n\t\t\taddC3.setEnabled(true);\n\t\t\taddC4.setEnabled(true);\n\t\t\taddC5.setEnabled(true);\n\t\t\taddC6.setEnabled(true);\n\t\t\taddC7.setEnabled(true);\n\t\t}", "private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }", "private void moikhoacontrol(boolean b) {\n\t\tbtnSua.setEnabled(b);\n\t\tbtnluu.setEnabled(b);\n\t\tbtnxoa.setEnabled(b);\n\t\tbtnThoat.setEnabled(b);\n\t\tbtnTim.setEnabled(b);\n\t\t\n\t}", "protected void setEnabledButtons( final boolean b )\r\n {\r\n jButtonSource.setEnabled( b );\r\n jButtonDestination.setEnabled( b );\r\n jButtonClearFileList.setEnabled( b );\r\n jButtonDoAction.setEnabled( b );\r\n }", "public void setEnabled(boolean enabled);", "public void setEnabled(boolean enabled);", "final public void setAffectsGroup(boolean value) {\n affectsGroup = value;\n }", "public boolean setEnabled(boolean enable);", "private void setButtonsEnabledState() {\n if (mBroadcastingLocation) {\n mStartButton.setEnabled(false);\n mStopButton.setEnabled(true);\n } else {\n mStartButton.setEnabled(true);\n mStopButton.setEnabled(false);\n }\n }", "public void setEnabled(boolean aFlag) { _enabled = aFlag; }", "@Override\n public void onGroupStatusChanged(IClientContext context, IGuiElement.GroupState status, IGuiElement button) throws Exception\n {\n IUser user = context.getUser();\n if (!user.hasRole(Role.ADMIN.getName()))\n {\n button.setVisible(false);\n }\n }", "public void setEnabled(boolean value) {\n m_Enabled = value;\n }", "@Override\n\tpublic void setEnabled(boolean flag) {\n\t\t\n\t}", "public void enable() {\r\n m_enabled = true;\r\n }", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "void setEnabled(boolean enabled);", "public void setEnabled(boolean value) {\n this.enabled = value;\n }", "private void enableControls(boolean b) {\n\n\t}", "public void setGroupVisible(int group, boolean visible);", "void enableBtn() {\n findViewById(R.id.button_play).setEnabled(true);\n findViewById(R.id.button_pause).setEnabled(true);\n findViewById(R.id.button_reset).setEnabled(true);\n }", "private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(true);\r\n\t\tselect.setEnabled(true);\r\n\t\tfilter.setEnabled(true);\r\n\t}", "private void habilitar() {\n\n if (i <= 0) {\n jButton4.setEnabled(false);\n } else {\n jButton4.setEnabled(true);\n }\n }", "public void setEnabled( boolean b )\n {\n filterCombo.setEnabled( b );\n filterEditorButton.setEnabled( b );\n }", "private void setEnabled(JLabel a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "public void setInValidGroup(boolean inValidGroup){this.inValidGroup = inValidGroup;}", "@Override public void setEnabled(boolean enabled) {\n super.setEnabled(enabled);\n\n m_globalEnabled = enabled;\n checkEnabled();\n }", "public void botonHabilitar(JButton boton, boolean estado){\n boton.setEnabled(estado);\n }", "public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }", "public void setEnable(boolean b) { this.editText.setEnabled(b); }", "public void setEnabledGeneral(boolean estado) {\r\n\t\tthis.partidasList.setEnabled(estado);\r\n\t\tthis.btnCambiarNick.setEnabled(estado);\r\n\t\tthis.btnCambiarPassword.setEnabled(estado);\r\n\t\tthis.btnCerrarSesion.setEnabled(estado);\r\n\t\tthis.btnUnirse.setEnabled(estado);\r\n\t}", "private void setButton(boolean a) {\n//Vo hieu hoac co hieu luc cho cac JButton\n this.btnCourseAdd.setEnabled(a);\n this.btnCourseDelete.setEnabled(a);\n this.btnCourseEdit.setEnabled(a);\n this.btnCourseSave.setEnabled(!a);\n this.btnCourseReport.setEnabled(!a);\n this.btnCourseReset.setEnabled(!a);\n this.btnCourseClose.setEnabled(a);\n }", "@Override\n public void setEnabled(boolean val) {\n super.setEnabled(val);\n mEnabled = val;\n }", "boolean isSetProductGroup();", "@ZAttr(id=1153)\n public void setGalGroupIndicatorEnabled(boolean zimbraGalGroupIndicatorEnabled) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalGroupIndicatorEnabled, zimbraGalGroupIndicatorEnabled ? Provisioning.TRUE : Provisioning.FALSE);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public void setFilterByGroup(boolean value)\r\n {\r\n getSemanticObject().setBooleanProperty(swpres_filterByGroup, value);\r\n }", "public void enable()\n\t{\n\t\tplayButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tbigTwoPanel.setEnabled(true);\n\t}", "void setEnable(boolean b) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void setEnabled(boolean is_enabled){\n\t\tswingComponent.setEnabled(is_enabled);\n\t}", "public boolean setToExtend(AccessGroup group)\n {\n if (!isParent(group))\n {\n this.extendGroup = group;\n if (this.extendGroup != null)\n {\n this.extendGroup_name = this.extendGroup.getName();\n }\n return true;\n }\n return false;\n }", "private void setAllButtonsEnabledStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n Button loadImg1 = (Button) findViewById(R.id.loadImg1);\n Button loadImg2 = (Button) findViewById(R.id.loadImg2);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n loadImg1.setEnabled(isEnabled);\n loadImg2.setEnabled(isEnabled);\n }", "public void setEnabled(final boolean enabled);", "public void setEnabled(UIEvent.Type aType, boolean aValue) { getEventAdapter(true).setEnabled(aType, aValue); }", "public void enable() {\n \t\t\tsetEnabled(true);\n \t\t}", "public void setEnabled(boolean enabled) {\r\n\t}", "public void toggleEnable();", "@Override\n public void setEnabled(boolean enabled) {\n }", "void setEditButtonEnabled(boolean isEnabled);", "public boolean enabled(){\n return enabled;\n }", "public static void enableDisableViewGroup(ViewGroup viewGroup, boolean enabled) {\r\n int childCount = viewGroup.getChildCount();\r\n for (int i = 0; i < childCount; i++) {\r\n View view = viewGroup.getChildAt(i);\r\n if(view.isFocusable())\r\n view.setEnabled(enabled);\r\n if (view instanceof ViewGroup) {\r\n enableDisableViewGroup((ViewGroup) view, enabled);\r\n } else if (view instanceof ListView) {\r\n if(view.isFocusable())\r\n view.setEnabled(enabled);\r\n ListView listView = (ListView) view;\r\n int listChildCount = listView.getChildCount();\r\n for (int j = 0; j < listChildCount; j++) {\r\n if(view.isFocusable())\r\n listView.getChildAt(j).setEnabled(false);\r\n }\r\n }\r\n }\r\n }", "public void setEnabled (boolean enabled) {\r\n\tcheckWidget ();\r\n\tint topHandle = topHandle ();\r\n\tint flags = enabled ? 0 : OS.Pt_BLOCKED | OS.Pt_GHOST;\r\n\tOS.PtSetResource (topHandle, OS.Pt_ARG_FLAGS, flags, OS.Pt_BLOCKED | OS.Pt_GHOST);\r\n}", "private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }", "public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}", "public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}", "private void enableRadioButtons(){\n\n this.acOffRadioButton.setEnabled(true);\n\n this.heatOffRadioButton.setEnabled(true);\n\n this.lightsOnRadioButton.setEnabled(true);\n this.lightsOffRadioButton.setEnabled(true);\n\n this.leftDoorsOpenRadioButton.setEnabled(true);\n this.leftDoorsCloseRadioButton.setEnabled(true);\n\n this.rightDoorsOpenRadioButton.setEnabled(true);\n this.rightDoorsCloseRadioButton.setEnabled(true);\n }", "public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }", "private void setShowButtonsEnabledStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n showBaby.setEnabled(isEnabled);\n }", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "private void setBtnUsability(boolean enable){\n pushButton.setEnabled(enable);\n popButton.setEnabled(enable);\n }", "boolean getEnabled();", "boolean getEnabled();", "boolean getEnabled();", "public void setEnabled(boolean bEnabled) {\n txtReferredBy.setEnabled(false);\n cbxProfession.setEnabled(bEnabled);\n cbxEducation.setEnabled(bEnabled);\n txtNotes1.setEnabled(bEnabled);\n txtNotes2.setEnabled(bEnabled);\n txtPartFamName.setEnabled(bEnabled);\n txtPartName.setEnabled(bEnabled);\n txtBirthPlc.setEnabled(bEnabled);\n cbxSpcEvt.setEnabled(bEnabled);\n txtSpclDate.setEnabled(bEnabled);\n txtChildNames.setEnabled(bEnabled);\n txtNumChildren.setEnabled(bEnabled);\n btnLookup.setEnabled(bEnabled);\n }", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }", "protected void enableButton(Button button){\n button.setVisibility(View.VISIBLE);\n button.setClickable(true);\n }", "private void setButtonsEnabledState() {\n if (mRequestingLocationUpdates) {\n mStartUpdatesButton.setEnabled(false);\n mStopUpdatesButton.setEnabled(true);\n } else {\n mStartUpdatesButton.setEnabled(true);\n mStopUpdatesButton.setEnabled(false);\n }\n }", "@ZAttr(id=1153)\n public boolean isGalGroupIndicatorEnabled() {\n return getBooleanAttr(Provisioning.A_zimbraGalGroupIndicatorEnabled, true);\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "private void setEnabled(JTextField a, boolean b) {\n\t\ta.setEnabled(b);\r\n\t}", "public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "@ZAttr(id=1153)\n public Map<String,Object> setGalGroupIndicatorEnabled(boolean zimbraGalGroupIndicatorEnabled, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalGroupIndicatorEnabled, zimbraGalGroupIndicatorEnabled ? Provisioning.TRUE : Provisioning.FALSE);\n return attrs;\n }", "public void setEnabled(boolean enabled) {\n mEnabled = enabled;\n }", "private void setButtonEnabled(FileType type) {\r\n\t\tswitch(type) {\r\n\t\t\tcase POS:\r\n\t\t\t\tthis.posBtn.setEnabled(ComponentData.setPosBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t\tcase UNCAPTURED_AUTH:\r\n\t\t\t\tthis.uncapturedBtn.setEnabled(ComponentData.setUncapturedBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t\tcase CAPTURED:\r\n\t\t\t\tthis.capturedBtn.setEnabled(ComponentData.setCapturedBtnIsEnabled());\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public boolean isSetGroup() {\n return this.group != null;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }", "protected void enableButtons() {\n if (mPrevious_question.isPressed() || mNext_question.isPressed()) {\n mFalseButton.setEnabled(true);\n mTrueButton.setEnabled(true);\n }\n }", "private void setShowAndShareButtonStatus(boolean isEnabled) {\n Button showBaby = (Button) findViewById(R.id.showBaby);\n Button share = (Button) findViewById(R.id.share);\n\n showBaby.setEnabled(isEnabled);\n share.setEnabled(isEnabled);\n }", "public void setButtonDelEnabled(boolean b) {\n\t\tbutton_del.setEnabled(b);\n\t}" ]
[ "0.788273", "0.674913", "0.6587467", "0.65334076", "0.6533013", "0.6527454", "0.6516718", "0.648839", "0.64095736", "0.6374265", "0.63729", "0.6324086", "0.63100225", "0.62946874", "0.6246891", "0.6232283", "0.6230867", "0.62261194", "0.61977893", "0.6186415", "0.61711025", "0.61711025", "0.6162892", "0.6156025", "0.61498445", "0.6113777", "0.6109028", "0.60916793", "0.60879815", "0.60844207", "0.60830885", "0.60830885", "0.60830885", "0.60830885", "0.60582066", "0.6049887", "0.6044159", "0.6038603", "0.60348856", "0.60310465", "0.5990306", "0.5979424", "0.59756035", "0.59606266", "0.5952386", "0.5945246", "0.5941525", "0.59396166", "0.5933898", "0.5929108", "0.59257954", "0.5917166", "0.5915594", "0.5900209", "0.5899065", "0.5885751", "0.5882378", "0.5873097", "0.58725375", "0.5867688", "0.5867424", "0.5853715", "0.5845613", "0.58434737", "0.5841742", "0.5831197", "0.5830495", "0.5823629", "0.5820685", "0.5819213", "0.5807167", "0.5804505", "0.58011085", "0.5789291", "0.578478", "0.57786393", "0.5777911", "0.5777911", "0.5777911", "0.5777713", "0.5773082", "0.5772775", "0.5772775", "0.5772509", "0.57724804", "0.57507354", "0.57487553", "0.574733", "0.5732726", "0.5720867", "0.5719696", "0.57177716", "0.5711845", "0.570784", "0.5703891", "0.5703891", "0.5703891", "0.5703891", "0.56902945", "0.56891596", "0.5688625" ]
0.0
-1
Set the information panel on screen.
private void setInfo(String info) { // TextView textView = (TextView) findViewById(R.id.info); // textView.setText(info); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setUpInfoPanel() {\n\t\t\n\t}", "private void setInfoPanel()\r\n {\r\n //set up info panel\r\n unitPanel.setPlayer(worldPanel.getCurrentPlayer());\r\n\t\t\t\tunitPanel.setYear(year);\r\n int tempUnit = worldPanel.getCurrentUnit();\r\n\r\n if(worldPanel.getCurrentPlayer() == 1)\r\n {\r\n unitPanel.setImageIcon(worldPanel.player1.units[tempUnit - 1].getImage());\r\n unitPanel.setAttack(worldPanel.player1.units[tempUnit - 1].getAttack());\r\n unitPanel.setDefence(worldPanel.player1.units[tempUnit - 1].getDefence());\r\n unitPanel.setMovement(worldPanel.player1.units[tempUnit - 1].getMovementsLeft());\r\n }\r\n else\r\n {\r\n unitPanel.setImageIcon(worldPanel.player2.units[tempUnit - 1].getImage());\r\n unitPanel.setAttack(worldPanel.player2.units[tempUnit - 1].getAttack());\r\n unitPanel.setDefence(worldPanel.player2.units[tempUnit - 1].getDefence());\r\n unitPanel.setMovement(worldPanel.player2.units[tempUnit - 1].getMovementsLeft());\r\n }\r\n }", "public SetInfoWindow() {\n super(BasicWindow.curWindow,\"Stage Info\", true);\n //setTitle(\"Inventory Manager\");\n proj_class=(project)project.oClass;\n \n addComponents();\n populateComponents();\n setBounds(10,50, iScreenHeight,iScreenWidth);\n //setSize(500,500);\n setResizable(true);\n setVisible(true);\n }", "public InfoPanel() {\n setPreferredSize(new Dimension(500, 860));\n }", "public Info() {\n initComponents();\n setSize(540, 575);\n setLocationRelativeTo(null);\n \n }", "void infoSetUp() {\r\n\t\tJPanel imageInfo = new JPanel();\r\n\t\timageInfo.setLayout(new GridLayout(2, 0));\r\n\t\tJPanel mButtons = new JPanel();\r\n\r\n\t\tJButton save = new JButton(\"save\");\r\n\t\tJButton upload = new JButton(\"upload\");\r\n\t\tJButton delete = new JButton(\"delete\");\r\n\t\tJButton view = new JButton(\"open\");\r\n\r\n\t\tupload.setActionCommand(\"upload\");\r\n\t\tview.setActionCommand(\"view\");\r\n\t\tActionListener upList = new UpList();\r\n\t\tupload.addActionListener(upList);\r\n\t\tview.addActionListener(upList);\r\n\t\tmButtons.add(save);\r\n\t\tmButtons.add(upload);\r\n\t\tmButtons.add(delete);\r\n\t\tmButtons.add(view);\r\n\r\n\t\tJTextArea info = new JTextArea(\"Path: \");\r\n\t\tinfo.setEditable(false);\r\n\t\timageInfo.add(info);\r\n\t\timageInfo.add(mButtons);\r\n\t\tmainFrame.add(imageInfo);\r\n\t\tinfoText = info;\r\n\t}", "private void initInfoPanel() {\n\t\t// Info Panel\n\t\tinfoPanel = new JPanel();\n\t\tinfoPanel.setBorder(BorderFactory.createTitledBorder(\"\"));\n\t\t\n\t\t// Current Word Label\n\t\twordString = \"\";\n\t\twordLabel = new JLabel(\" \" + wordString, SwingConstants.LEFT);\n\t\twordLabel.setBorder(BorderFactory.createTitledBorder(\"Current Word\"));\n\t\twordLabel.setPreferredSize(new Dimension(280, 65));\n\t\twordLabel.setFont(new Font(\"Arial\", Font.BOLD, 16));\n\t\tinfoPanel.add(wordLabel);\n\t\t\n\t\t// Submit Button\n\t\tsubmitButton = new JButton(\"Submit Word\");\n\t\tsubmitButton.setPreferredSize(new Dimension(160, 65));\n\t\tsubmitButton.setFont(new Font(\"Arial\", Font.BOLD, 18));\n\t\tsubmitButton.setFocusable(false);\n\t\tsubmitButton.addActionListener(new SubmitListener());\n\t\tinfoPanel.add(submitButton);\n\t\t\n\t\t// Score Label\n\t\tscoreInt = 0;\n\t\tscoreLabel = new JLabel(\"\", SwingConstants.LEFT);\n\t\tscoreLabel.setBorder(BorderFactory.createTitledBorder(\"Score\"));\n\t\tscoreLabel.setPreferredSize(new Dimension(110, 65));\n\t\tscoreLabel.setFont(new Font(\"Arial\", Font.PLAIN, 16));\n\t\tinfoPanel.add(scoreLabel);\n\t}", "public void drawInfoWindow(){\n\n p.pushMatrix();\n p.translate(0,0); // translate whole window if necessary\n\n // display name and show\n p.stroke(0);\n p.strokeWeight(2);\n p.textSize(30);\n p.fill(0);\n p.text(\"Info\",735,35);\n p.rectMode(CORNER);\n p.fill(219, 216, 206);\n p.rect(730,40,550,700);\n p.rectMode(CENTER);\n\n p.fill(0);\n p.pushMatrix();{\n p.translate(740,80);\n p.textSize(15);\n p.text(\"General\",0,-20);\n p.line(-3,-15,150,-15);\n p.text(\"Speed: \" + manipulator.maxSpeed,0,0);\n p.text(\"Angle of rotation for segment_1: \" + p.degrees(manipulator.segment_1_rot),0,20);\n p.text(\"Angle of rotation for segment_2: \" + p.degrees(manipulator.segment_2_rot),0,40);\n\n\n }p.popMatrix();\n\n p.popMatrix();\n\n }", "void showAbout() {\n\t\tif (aboutScreen == null) {\n\t\t aboutScreen = new Form(\"About AMMS Mansion demo\");\n\t\t aboutScreen.append(\"This MIDlet demonstrates the 3D audio capabilities of AMMS API.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"Copyright (c) 2006 Nokia. All rights reserved.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t}\n\t\taboutScreen.addCommand(toggleCommand);\n\t\taboutScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(aboutScreen);\n }", "private void updateInfoValues() {\n menuPanel.updateInfoPanel( tugCount, simulation.getShipsOnSea(), simulation.getShipsDocked(), simulation.getShipsTugged());\n }", "public InfoView getInfoView() {\r\n return infoPanel;\r\n }", "public UserInfoPanel() {\n initComponents();\n }", "private Widget getInfo() {\n FocusPanel infoPanel = new FocusPanel();\n infoPanel.setStyleName(\"elv-Molecules-InfoPanel\");\n HorizontalPanel content = new HorizontalPanel();\n try{\n Image img = new Image(ReactomeImages.INSTANCE.information());\n String helpTitle = \"Info\";\n HTMLPanel helpContent = new HTMLPanel(\n \"The molecules tab shows you all the molecules of a complete pathway diagram.\\n\" +\n \"Molecules are grouped in Chemical Compounds, Proteins, Sequences and Others.\\n\" +\n \"The molecules of a selected object appear highlighted in the molecules lists;\\n\" +\n \"a molecule selected in the list will be highlighted in the diagram.\\n\" +\n \"For each molecule you can see a symbol, a link to the main reference DB, a name and the number of\\n\" +\n \"occurrences in the pathway. Clicking on the symbol several times will allow you to circle through\\n\" +\n \"all its occurrences in the diagram.\\n\" +\n \"Expanding by clicking on the '+' will provide you with further external links.\\n\" +\n \"Lists can be downloaded. Just click on the button in the top right\\n\" +\n \"corner, select the fields and types you are interested in and click 'Start Download'.\");\n\n content.add(img);\n popup = new HelpPopup(helpTitle, helpContent);\n infoPanel.addMouseOverHandler(this);\n infoPanel.addMouseOutHandler(this);\n infoPanel.getElement().getStyle().setProperty(\"cursor\", \"help\");\n }catch (Exception e){\n// e.printStackTrace();\n Console.error(getClass() + \": \" + e.getMessage());\n //ToDo: Enough?\n }\n HTMLPanel title = new HTMLPanel(\"Info\");\n title.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);\n content.add(title);\n\n infoPanel.add(content.asWidget());\n\n return infoPanel;\n }", "public Update_info() {\n initComponents();\n display_data();\n }", "private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}", "public MenuInfo() {\n initComponents();\n setSize(1024,768);\n }", "public void setInfoLabelText(String text) {\n Label infoLabel = s.findNiftyControl(\"infoLabel\", Label.class);\n if (text != null) {\n infoLabel.setText(text);\n infoPanel.setVisible(true);\n } else\n infoPanel.setVisible(false);\n }", "@Override\n public void actionPerformed( ActionEvent e ) {\n setContentPanel( about2 );\n }", "public JPanel getInfo() {\n return info;\n }", "public void displayInfo(String info){\n infoWindow.getContentTable().clearChildren();\n Label infoLabel = new Label(info, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n infoWindow.getContentTable().add(infoLabel).width(500);\n infoWindow.show(guiStage);\n }", "public InfoPanel()\n\t\t{\n\t\t\t//setting color and instantiating textfield and button\n\t\t\tsetBackground(bCol);\n\t\t\tnameJF = new JTextField(\"Type Your Name\", 20);\n\t\t\tFont naFont = new Font(\"Serif\", Font.PLAIN, 25);\n\t\t\tnameJF.setFont(naFont);\n\t\t\tsub = new JButton(\"Submit\");\n\t\t\tsub.addActionListener(this);\n\t\t\tsub.setFont(naFont);\n\t\t\tname = new String(\"\");\n\t\t\tadd(nameJF);\n\t\t\tadd(sub);\n\t\t}", "public About() {\n \n Toolkit tk = Toolkit.getDefaultToolkit();\n Dimension screen = tk.getScreenSize();\n int x = Math.max(0, (screen.width - this.getWidth()) / 2);\n int y = Math.max(0, (screen.height -this.getHeight()) / 2);\n this.setLocation(x-230, y-230);\n \n initComponents();\n }", "public void show(){\n initializeTouchpad();\n initializeButtons();\n initializeShieldBar();\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "public InfoPopup() {\n initComponents();\n }", "public void showProperties() {\n \t\tmainFrame.showProperties();\n \t}", "private void initInfo() {\r\n\t\tthis.panelInfo = new JPanel();\r\n\t\tthis.panelInfo.setLayout(new BoxLayout(this.panelInfo,\r\n\t\t\t\tBoxLayout.PAGE_AXIS));\r\n\t\tJPanel filterInfoPanel = new JPanel();\r\n\t\tfilterInfoPanel.setLayout(new GridLayout(4, 2, 10, 10));\r\n\t\tJLabel labelInformation = new JLabel(\"Information\");\r\n\t\tif (dlm.getSize() > 0) {\r\n\t\t\tWeapon weapon = this.tableWeapon.getWeapon((String) this.list\r\n\t\t\t\t\t.getSelectedValue());\r\n\r\n\t\t\tlabelInformation.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\tJLabel labelName = new JLabel(\"Name\");\r\n\t\t\tJLabel labelNameInfo = new JLabel(weapon.getName());\r\n\t\t\tJLabel labelDamage = new JLabel(\"Damages\");\r\n\t\t\tJLabel labelDamageInfo = new JLabel(String.valueOf(weapon\r\n\t\t\t\t\t.getDamagesMinimum())\r\n\t\t\t\t\t+ \" - \"\r\n\t\t\t\t\t+ String.valueOf(weapon.getDamagesMaximum()));\r\n\t\t\tJLabel labelPrice = new JLabel(\"Price\");\r\n\t\t\tJLabel labelPriceInfo = new JLabel(\r\n\t\t\t\t\tString.valueOf(weapon.getPrice()));\r\n\t\t\tJLabel labelType = new JLabel(\"Types\");\r\n\t\t\tJLabel labelTypeInfo = new JLabel(\r\n\t\t\t\t\t(String) this.comboBoxType.getSelectedItem());\r\n\t\t\tfilterInfoPanel.add(labelName);\r\n\t\t\tfilterInfoPanel.add(labelNameInfo);\r\n\t\t\tfilterInfoPanel.add(labelDamage);\r\n\t\t\tfilterInfoPanel.add(labelDamageInfo);\r\n\t\t\tfilterInfoPanel.add(labelPrice);\r\n\t\t\tfilterInfoPanel.add(labelPriceInfo);\r\n\t\t\tfilterInfoPanel.add(labelType);\r\n\t\t\tfilterInfoPanel.add(labelTypeInfo);\r\n\r\n\t\t} else {\r\n\r\n\t\t\tlabelInformation.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\t\tJLabel labelName = new JLabel(\"Name\");\r\n\t\t\tJLabel labelNameInfo = new JLabel();\r\n\t\t\tJLabel labelDamage = new JLabel(\"Damages\");\r\n\t\t\tJLabel labelDamageInfo = new JLabel();\r\n\t\t\tJLabel labelPrice = new JLabel(\"Price\");\r\n\t\t\tJLabel labelPriceInfo = new JLabel();\r\n\t\t\tJLabel labelType = new JLabel(\"Types\");\r\n\t\t\tJLabel labelTypeInfo = new JLabel();\r\n\t\t\tfilterInfoPanel.add(labelName);\r\n\t\t\tfilterInfoPanel.add(labelNameInfo);\r\n\t\t\tfilterInfoPanel.add(labelDamage);\r\n\t\t\tfilterInfoPanel.add(labelDamageInfo);\r\n\t\t\tfilterInfoPanel.add(labelPrice);\r\n\t\t\tfilterInfoPanel.add(labelPriceInfo);\r\n\t\t\tfilterInfoPanel.add(labelType);\r\n\t\t\tfilterInfoPanel.add(labelTypeInfo);\r\n\t\t}\r\n\r\n\t\tthis.panelInfo.add(labelInformation);\r\n\t\tthis.panelInfo.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panelInfo.add(filterInfoPanel);\r\n\t\tthis.panelInfo.add(Box.createRigidArea(new Dimension(0, 3)));\r\n\t\tthis.panelInfo.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t}", "public SetupScreen() \r\n { \r\n _userLabel = new LabelField(Ipoki._resources.getString(LBL_USER), DrawStyle.ELLIPSIS);\r\n add(_userLabel);\r\n _userEdit = new EditField(\"\", Ipoki._user, 20, Field.EDITABLE);\r\n add(_userEdit);\r\n _passLabel = new LabelField(Ipoki._resources.getString(LBL_PASSWORD), DrawStyle.ELLIPSIS);\r\n add(_passLabel);\r\n _passEdit = new PasswordEditField(\"\", Ipoki._pass, 20, Field.EDITABLE);\r\n add(_passEdit);\r\n _freqLabel = new LabelField(Ipoki._resources.getString(LBL_FREQ), DrawStyle.ELLIPSIS);\r\n add(_freqLabel);\r\n _freqEdit = new EditField(\"\", String.valueOf(Ipoki._freq), 20, Field.EDITABLE | EditField.FILTER_INTEGER);\r\n add(_freqEdit);\r\n }", "boolean setInfo();", "@Override\n public void setupPanel()\n {\n\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "public Login_Information() {\n initComponents();\n Toolkit toolkit = getToolkit();\n Dimension size = toolkit.getScreenSize();\n setLocation(size.width/2 - getWidth()/2, \n size.height/2 - getHeight()/2);\n }", "void show_info() {\n\t\tsetAlwaysOnTop(false);\n\n\t\tString msg = \"<html><ul><li>Shortcuts:<br/>\"\n\t\t\t\t+ \"(\\\") start macro<br/>\"\n\t\t\t\t+ \"(esc) exit<br/><br/>\"\n\t\t\t\t+ \"<li>Author: <b>Can Kurt</b></ul></html>\";\n\n\t\tJLabel label = new JLabel(msg);\n\t\tlabel.setFont(new Font(\"arial\", Font.PLAIN, 15));\n\n\t\tJOptionPane.showMessageDialog(null, label ,\"Info\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\tsetAlwaysOnTop(true);\n\t}", "public void updateInfo()\n\t{\n\t\twidth = Game.frame.getWidth();\n\t\theight = Game.frame.getHeight();\n\t\tGame.frame.revalidate();\n\t\tGame.frame.repaint();\n\t}", "public void show() {\n\t\tsetLocation(\n\t\t\tgetOwner().getX() + (getOwner().getWidth() - getWidth()) / 2, \n\t\t\tgetOwner().getY() + (getOwner().getHeight() - getHeight()) / 2 );\n\n\t\tsuper.show();\n\t}", "public void settings() {\r\n size(WIDTH, HEIGHT); // Set size of screen\r\n }", "private void buildInfoPanel() {\r\n infoPanel = new JPanel( new GridLayout( 1, 1 ) );\r\n infoBox = Box.createHorizontalBox();\r\n\r\n // setBackground() does NOT work with a Box\r\n infoPanel.setBackground( COLOR_INFO_BKGRND );\r\n\r\n soundBtn = new JButton( Msgs.str( \"Snd.go\" ) );\r\n soundBtn.addActionListener( listener );\r\n infoBox.add( Box.createGlue() );\r\n infoBox.add( soundBtn );\r\n\r\n resetBtn = new JButton( Msgs.str( \"Reset\" ) );\r\n resetBtn.addActionListener( listener );\r\n infoBox.add( Box.createGlue() );\r\n infoBox.add( resetBtn );\r\n\r\n infoMesg = new JLabel( Msgs.str( \"Ready\" ), SwingConstants.CENTER );\r\n infoMesg.setFont( fontLARGE );\r\n infoMesg.setForeground( COLOR_INFO_FRGRND );\r\n infoBox.add( Box.createGlue() );\r\n infoBox.add( infoMesg );\r\n infoBox.add( Box.createGlue() );\r\n\r\n infoPanel.add( infoBox );\r\n }", "public MendInformation() {\r\n \tinitComponents();\r\n }", "public Jp_MyInformation() {\n initComponents();\n //lb_correct.setIcon(null);\n //loadEmailInfor(lb_load_MainEmail);\n // md_loadCousers();\n\n md_NameChange(false);\n md_load_data();\n\n }", "public void showInfo(String infotext) {\r\n // backup current status of text and icon for rollback:\r\n lastInfo = info.getText();\r\n lastIcon = info.getIcon();\r\n\r\n // show info icon and new info text:\r\n info.setIcon(new ImageIcon(StatusInformationPanel.class\r\n .getResource(\"img/info.gif\")));\r\n info.setText(infotext);\r\n }", "public void set_info() {\n System.out.println(\"The name of the donor is \" + donor_name);\n System.out.println(\"The rating of the donor is \" + donor_rating); //display\n }", "private void setDisplay() {\n\t\tDisplayOpt.add(\"-sd\");\n\t\tDisplayOpt.add(\"/sd\");\n\t\tDisplayOpt.add(\"showdetails\");\n\n\t}", "public InfoPanel(MSBQueryTableModel msbQTM, Querytool qt, QtFrame qtFrame) {\n super();\n localQuerytool = qt;\n msb_qtm = msbQTM;\n qtf = qtFrame;\n\n infoPanel = this;\n\n MatteBorder matte = new MatteBorder(3, 3, 3, 3, Color.green);\n GridBagLayout gbl = new GridBagLayout();\n\n setBackground(Color.black);\n setBorder(matte);\n setLayout(gbl);\n setMinimumSize(new Dimension(174, 450));\n setPreferredSize(new Dimension(174, 450));\n setMaximumSize(new Dimension(174, 450));\n\n compInit();\n }", "public void showInfo() {\n TextView nameTV = (TextView) findViewById(R.id.nameText);\n if (nameTV == null) {\n // Fragment is not loaded yet\n return;\n }\n nameTV.setText(\"Name: \" + name);\n TextView batteryTV = (TextView) findViewById(R.id.batteryText);\n batteryTV.setText(\"Battery: \" + battery);\n CheckBox stiffBox = (CheckBox) findViewById(R.id.stiffBox);\n stiffBox.setChecked(stiffness);\n\n LinearLayout robotInfo = (LinearLayout) findViewById(R.id.robotInfo);\n if (robotInfo == null) {\n return;\n }\n if (networkThread != null && networkThread.connected()) {\n robotInfo.setVisibility(View.VISIBLE);\n } else {\n robotInfo.setVisibility(View.INVISIBLE);\n }\n }", "public InformationResultPanel() {\n initComponents();\n }", "public DriverInfoUI(DriverInfo driverInfo) {\n initComponents();\n this.driverInfo = driverInfo;\n }", "public void showInstructionsPanel()\n {\n setWidgetAsExample(introPanel);\n }", "public ContractorInfoPanel() {\n\t\tinitComponents();\n\t}", "public void display() {\r\n try {\r\n if( mdiForm.getFrame(CoeusGuiConstants.SPONSORHIERARCHY_BASE_WINDOW) == null ){\r\n mdiForm.putFrame(CoeusGuiConstants.SPONSORHIERARCHY_BASE_WINDOW, maintainSponsorHierarchyBaseWindow);\r\n mdiForm.getDeskTopPane().add(maintainSponsorHierarchyBaseWindow);\r\n maintainSponsorHierarchyBaseWindow.setSelected(true);\r\n maintainSponsorHierarchyBaseWindow.setVisible(true);\r\n }\r\n }catch (java.beans.PropertyVetoException propertyVetoException) {\r\n propertyVetoException.printStackTrace();\r\n }\r\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}", "public void showInstructions()\n {\n //make the instructions window visible\n instructionScreen.setVisible(true);\n }", "public void displayConfigurationPanel(){\n\t\tthis.panelConfiguration = new PanelConfiguration(this.mainFrame);\n\t\tthis.add(this.panelConfiguration,BorderLayout.CENTER);\n\t}", "private void setAttributes() {\n this.setVisible(true);\n this.setSize(500, 500);\n this.setTitle(\"cuttco.com\");\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\n }", "public Container getInfoPanel() {\n\t\treturn null;\n\t}", "public PanelAccountInfo() {\n initComponents();\n setTextFields();\n setLabels();\n }", "public AboutPanel() {\n super();\n initialize();\n }", "public MetadataPanel()\n {\n fieldMap = new HashMap<String, Component>();\n initialiseUI();\n }", "public SavingsInfoPage() {\n setLocationRelativeTo(null);\n setResizable(false); \n initComponents();\n onRun();\n }", "private void addDialInInfo() {\n\t\tif(ConferenceGlobals.showPhoneInfo )\n\t\t{\n\t\t\t\tconsoleLayout.addWidgetToID(\"dailinfo\", new Label(UIStrings.getTollInfoLabel()));\n\t\t\t\tconsoleLayout.addWidgetToID(\"confid\", new Label(UIStrings.getAttendePasscodeLabel()));\t\t\n\t\t\t\n\t\t\t\tLabel internToll = new Label(getSubString(ConferenceGlobals.internToll, 20));\n\t\t\t\tLabel attPassCode = new Label(getSubString(ConferenceGlobals.attendeePasscode, 20));\n\t\t\t\t\n\t\t\t\tinternToll.setTitle(ConferenceGlobals.internToll);\n\t\t\t\tattPassCode.setTitle(ConferenceGlobals.attendeePasscode);\n\t\t\t\tconsoleLayout.addWidgetToID(\"dailinfo_txt\", internToll);\n\t\t\t\tconsoleLayout.addWidgetToID(\"confid_txt\", attPassCode);\n\t\t\t\n\t\t\t\tif(ConferenceGlobals.internToll.length() > 0)\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"dailinfo_panel\", true);\n\t\t\t\telse\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"dailinfo_panel\", false);\n\n\t\t\t\tif(ConferenceGlobals.attendeePasscode.length() > 0)\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"passcode_panel\", true);\n\t\t\t\telse\n\t\t\t\t\tconsoleLayout.setIDVisibility(\"passcode_panel\", false);\n\t\t}\n\t\t\n\t}", "private void constructInfoPanel() {\n try {\n Runnable doUpdate = new Runnable() {\n public void run() {\n infoPanel = new JPanel();\n infoPanel.setPreferredSize(relativeSize(0.8f, 0.04f));\n \n infoLabel = new JLabel(\"Waiting for Clients\");\n infoLabel.setForeground(new Color(0, 51, 102));\n infoLabel.setFont(new Font(\"Garamond\", Font.BOLD, 17));\n \n infoPanel.add(infoLabel);\n }\n };\n if (SwingUtilities.isEventDispatchThread())\n doUpdate.run();\n else\n SwingUtilities.invokeAndWait(doUpdate);\n }catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void showInstructionsPanel() {\n\t\tsetWidgetAsExample(introPanel);\n\t}", "public void init() {\r\n\t\t/*\r\n\t\t * Initialize panel for base\r\n\t\t */\r\n\t\tbaseList = GameMap.getBaseList();\r\n\t\tthis.add(new BaseInfoPanel(baseList.getFirst(), controlPanel));\r\n\t}", "private void initialize() {\n\ttry {\n\t\t// user code begin {1}\n\t\t// user code end\n\t\tsetName(\"PlatformInfoPanel\");\n\t\tsetLayout(null);\n\t\tsetSize(353, 240);\n\t\tadd(getPnlOS(), getPnlOS().getName());\n\t\tadd(getPnlJava(), getPnlJava().getName());\n\t} catch (java.lang.Throwable ivjExc) {\n\t\thandleException(ivjExc);\n\t}\n\t// user code begin {2}\n\tgetTxtOSName().setText(System.getProperty(\"os.name\"));\n\tgetTxtOSArchitecture().setText(System.getProperty(\"os.arch\"));\n\tgetTxtOSVersion().setText(System.getProperty(\"os.version\"));\n\tgetTxtOSLocale().setText(java.util.Locale.getDefault().toString());\n\tgetTxtJavaVersion().setText(System.getProperty(\"java.version\"));\n\tgetTxtJavaVMVersion().setText(System.getProperty(\"java.vm.version\"));\n\t// user code end\n}", "public native void show(GInfoWindow self)/*-{\r\n\t\tself.show();\r\n\t}-*/;", "public pnl_Gestionar_info_laboratorio() {\n initComponents();\n listar_info_lab.setSelected(true);\n new CambiaPanel(panel_contenedor, new paneles_de_paneles.de_gestionar_info_laboratorio_listar());\n pnl_Gestionar_contrato.color_performed(listar_info_lab,add_info_lab);\n }", "public Informations() {\n initComponents();\n \n Affichage();\n }", "void init() {\n setVisible(true);\n\n }", "public void display() {\r\n \tsetLocation((int)parent.getLocationOnScreen().getX() + (parent.getWidth()/2) - (getWidth()/2), (int)parent.getLocationOnScreen().getY() + (parent.getHeight()/2) - (getHeight()/2));\r\n \tsetVisible(true);\r\n }", "public abstract void displayInfo();", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "private void showInfo() {\n JOptionPane.showMessageDialog(\n this,\n \"Пока что никакой\\nинформации тут нет.\\nДа и вряд ли будет.\",\n \"^^(,oO,)^^\",\n JOptionPane.INFORMATION_MESSAGE);\n }", "protected void showMineSettings() {\r\n settingsFrame.setLocation( scorePanel.getLocationOnScreen() );\r\n settingsFrame.setVisible( true );\r\n }", "public void displayInfo(Actor actor, String info){\n infoWindow.getContentTable().clearChildren();\n infoWindow.getContentTable().add(actor).row();\n Label infoLabel = new Label(info, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n infoWindow.getContentTable().add(infoLabel).width(500);\n infoWindow.show(guiStage);\n }", "@Override\n public void setDisplayedLocation(Location loc) {\n pane.setVvalue(loc.getyCoord());\n pane.setHvalue(loc.getxCoord());\n setCurrentFloor(loc.getLevel());\n displayedLocation = getDisplayedLocation();\n }", "public StatePanel(boolean infobox) {\n super();\n this.infobox = infobox;\n initComponents();\n if(!infobox) {\n this.infoArea.setVisible(false);\n this.jScrollPane1.setVisible(false);\n }\n }", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}", "private void makeLabels() {\n infoPanel = new JPanel();\n\n infoText = new JTextArea(30,25);\n\n infoPanel.add(infoText);\n }", "void updateScreen() {\n\t\tZone possibleNewZone = currentZone.getSpace(playerY, playerX).getNextZone();\n\t\tif (possibleNewZone != null) {\n\t\t\tString oldBGMusic = currentZone.getBackgroundMusic();\n\t\t\tcurrentZone = possibleNewZone;\n\t\t\tcurrentZone.enableZoneWarpSpaces();\n\t\t\tplayerX = currentZone.getPlayerStartX();\n\t\t\tplayerY = currentZone.getPlayerStartY();\n\t\t\t\n\n\t\t\tif (!oldBGMusic.equals(currentZone.getBackgroundMusic())) {\n\t\t\t\tmusicPlayer.stop();\n\t\t\t\tmusicPlayer.play(currentZone.getBackgroundMusic(), 100);\n\t\t\t}\n\t\t}\n\n\t\t// Update Panel Colors\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\t\t\t\tpanels[i][a].setBackground(currentZone.getSpace(i, a).getColor());\n\t\t\t}\n\t\t}\n\n\t\t// Update Labels\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\n\t\t\t\tlabels[i][a].setIcon(currentZone.getSpace(i, a).getPic());\n\t\t\t}\n\t\t}\n\t\t// Shows player in the new space\n\t\tlabels[playerY][playerX].setIcon(playerPic);\n\n\t\t// Shows enemy in the new space\n\t\t// labels[enemyY][enemyX].setIcon(enemyPic);\n\t}", "public void showOPanel(Point p) {\r\n \r\n \t}", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "public void display() {\r\n\t\tsetVisible(true);\r\n\t}", "@Test\n\tpublic void testInformationPanel() {\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"Time\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"Time\").text()\n\t\t\t\t.equals(\" Time = 0.0 s\"));\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"X position\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"X position\").text()\n\t\t\t\t.equals(\" x = 0 m\"));\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"Y position\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"Y position\").text()\n\t\t\t\t.equals(\" y = 0 m\"));\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"X velocity\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"X velocity\").text()\n\t\t\t\t.equals(\" vx = 0 m/s\"));\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"Y velocity\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"Y velocity\").text()\n\t\t\t\t.equals(\" vy = 0 m/s\"));\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"Velocity\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"Velocity\").text()\n\t\t\t\t.equals(\" v = 0 m/s\"));\n\t\tassertThat(\n\t\t\t\twindow.panel(\"Information panel\").label(\"Max height\").requireEnabled());\n\t\tassertThat(window.panel(\"Information panel\").label(\"Max height\").text()\n\t\t\t\t.equals(\" Max. height = 0 m\"));\n\t\twindow.panel(\"Control panel\").button(\"Shoot\").click();\n\t\tassertThat(!window.panel(\"Information panel\").label(\"Time\").text()\n\t\t\t\t.equals(\" Time = 0.0 s\"));\n\t\tassertThat(!window.panel(\"Information panel\").label(\"X position\").text()\n\t\t\t\t.equals(\" x = 0 m\"));\n\t\tassertThat(!window.panel(\"Information panel\").label(\"Y position\").text()\n\t\t\t\t.equals(\" y = 0 m\"));\n\t\tassertThat(!window.panel(\"Information panel\").label(\"X velocity\").text()\n\t\t\t\t.equals(\" vx = 0 m/s\"));\n\t\tassertThat(!window.panel(\"Information panel\").label(\"Y velocity\").text()\n\t\t\t\t.equals(\" vy = 0 m/s\"));\n\t\tassertThat(!window.panel(\"Information panel\").label(\"Velocity\").text()\n\t\t\t\t.equals(\" v = 0 m/s\"));\n\t\tassertThat(!window.panel(\"Information panel\").label(\"Max height\").text()\n\t\t\t\t.equals(\" Max. height = 0 m\"));\n\t}", "@Override\r\n\tpublic void aboutToBeShown() {\n\t\tsuper.aboutToBeShown();\r\n\t}", "private void setPanelOverview() {\n\t\tfinal String methodName = \"setPanelOverview\";\n\t\tdetailedDescription.setEditable(false);\n\t\tdetailedDescription.setLineWrap(true);\n\t\t// set layout for contentPanel\n\t\tGridBagLayout layout = new GridBagLayout();\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\n\t\tcontentPanel.setLayout(layout);\n\n\t\t//Add sessionTitle\n\t\tLoggerFactory.logp(Level.CONFIG, className, methodName, \"Add component sessionTitle to contentPanel.\");\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 1;\n\t\tgbc.anchor = GridBagConstraints.CENTER;\n\t\tcontentPanel.add(sessionTitle, gbc);\n\n\t\t//Add detailedDescription\n\t\tLoggerFactory.logp(Level.CONFIG, className, methodName, \"Add component detailedDescription to contentPanel.\");\n\t\tgbc.weightx = 1;\n\t\tgbc.weighty = 1;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 1;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 5;\n\t\tgbc.anchor = GridBagConstraints.CENTER;\n\t\tgbc.fill = GridBagConstraints.BOTH;\n\t\tcontentPanel.add(detailedDescription, gbc);\n\n\t\t//Add exitButton\n\t\tLoggerFactory.logp(Level.CONFIG, className, methodName, \"Add component detailedDescription to contentPanel.\");\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 6;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 1;\n\t\tgbc.anchor = GridBagConstraints.CENTER;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tcontentPanel.add(exitButton, gbc);\n\t}", "public void setInfoWindow(MarkerInfoWindow infoWindow){\n\t\tmInfoWindow = infoWindow;\n\t}", "public static void ChangeScreen(ScreenType t) {\n\t\tlayout.show(contentPanel, t.toString());\n\t}", "private void setupDisplay() {\n sizeFirstField_.setText(Double.toString(af_.SIZE_FIRST));\n numFirstField_.setText(Double.toString(af_.NUM_FIRST));\n sizeSecondField_.setText(Double.toString(af_.SIZE_SECOND));\n numSecondField_.setText(Double.toString(af_.NUM_SECOND));\n cropSizeField_.setText(Double.toString(af_.CROP_SIZE));\n thresField_.setText(Double.toString(af_.THRES));\n channelField1_.setText(af_.CHANNEL1);\n channelField2_.setText(af_.CHANNEL2);\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void setupTextArea() {\n\t\tcourseInfo = new JTextPane();\n\t\tinfoScrollPane = new JScrollPane(courseInfo);\n\t\tinfoScrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tcourseInfo.setEditable(false);\n\t\tdisplay.add(infoScrollPane);\n\t}", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }", "public StudentDetails() {\n initComponents();\n this.setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"Library.png\")).getImage());\n if (java.awt.Toolkit.getDefaultToolkit().getScreenSize().height == 768 && java.awt.Toolkit.getDefaultToolkit().getScreenSize().width == 1366) {\n this.setSize(1360, 720);\n this.setLocationRelativeTo(null);\n }\n }", "public void setInfor() {\n\t\t\t\tidJLabel.setSize(200,30);\n\t\t\t\tidJLabel.setLocation(100,20);\n\t\t\t\tadd(idJLabel);\n\t\t\t\tidField.setSize(200, 30);\n\t\t\t\tidField.setLocation(300,20);\n\t\t\t\tadd(idField);\n\t\t\t\t\n\t\t\t\t//set thong tin cho title label\n\t\t\t\ttitleJLabel.setSize(200,30);\n\t\t\t\ttitleJLabel.setLocation(100,60);\n\t\t\t\tadd(titleJLabel);\n\t\t\t\ttitleField.setSize(200, 30);\n\t\t\t\ttitleField.setLocation(300,60);\n\t\t\t\tadd(titleField);\n\t\t\t\t\n\t\t\t\t//set thong tin cho category label\n\t\t\t\tcategoryJLabel.setSize(200,30);\n\t\t\t\tcategoryJLabel.setLocation(100,100);\n\t\t\t\tadd(categoryJLabel);\n\t\t\t\tcateField.setSize(200, 30);\n\t\t\t\tcateField.setLocation(300,100);\n\t\t\t\tadd(cateField);\n\t\t\t\t\n\t\t\t\t// set thong tin cho cost label\n\t\t\t\tcostJLabel.setSize(200,30);\n\t\t\t\tcostJLabel.setLocation(100,140);\n\t\t\t\tadd(costJLabel);\n\t\t\t\tcostField.setSize(200, 30);\n\t\t\t\tcostField.setLocation(300,140);\n\t\t\t\tadd(costField);\n\t\t\t\t\n\t\t\t\t// set thong tin cho nut 'ok'\t\n\t\t\t\tokJButton.setSize(100,30);\n\t\t\t\tokJButton.setLocation(250,330);\n\t\t\t\tokJButton.setFocusPainted(false);\n\t\t\t\tadd(okJButton);\n \n\t}", "private void settings() {\n\n\t\tthis.addWindowListener(controller);\n\t\tthis.setVisible(true);\n\t\tthis.setSize(1000, 660);\n\t\tthis.validate();\n\t\tthis.repaint();\n\n\t}", "private void showInfo(String message){ infoLabel.setText(message);}", "public void setWelcomeScreen() {\n clearAllContent();\n add(WelcomeScreen.create(controller));\n pack();\n }", "public void setVisibleDetails(int n) {\n mController.setVisibleDetails(n);\n }", "private JPanel getPanelInfo() {\n\t\tif (panelInfo == null) {\n\t\t\tGridBagConstraints gridBagConstraints7 = new GridBagConstraints();\n\t\t\tgridBagConstraints7.fill = GridBagConstraints.BOTH;\n\t\t\tgridBagConstraints7.gridx = 0;\n\t\t\tgridBagConstraints7.gridy = 2;\n\t\t\tgridBagConstraints7.ipadx = 358;\n\t\t\tgridBagConstraints7.ipady = 7;\n\t\t\tgridBagConstraints7.weightx = 1.0;\n\t\t\tgridBagConstraints7.weighty = 1.0;\n\t\t\tgridBagConstraints7.insets = new Insets(0, 26, 1, 26);\n\t\t\tGridBagConstraints gridBagConstraints6 = new GridBagConstraints();\n\t\t\tgridBagConstraints6.gridx = 0;\n\t\t\tgridBagConstraints6.ipadx = 358;\n\t\t\tgridBagConstraints6.ipady = 7;\n\t\t\tgridBagConstraints6.gridy = 1;\n\t\t\tGridBagConstraints gridBagConstraints5 = new GridBagConstraints();\n\t\t\tgridBagConstraints5.insets = new Insets(0, 26, 0, 0);\n\t\t\tgridBagConstraints5.gridy = 0;\n\t\t\tgridBagConstraints5.anchor = GridBagConstraints.WEST;\n\t\t\tgridBagConstraints5.gridx = 0;\n\t\t\tGridBagConstraints gridBagConstraints4 = new GridBagConstraints();\n\t\t\tgridBagConstraints4.fill = GridBagConstraints.BOTH;\n\t\t\tgridBagConstraints4.gridy = 1;\n\t\t\tgridBagConstraints4.weightx = 1.0;\n\t\t\tgridBagConstraints4.weighty = 1.0;\n\t\t\tgridBagConstraints4.gridx = 1;\n\t\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\n\t\t\tgridBagConstraints2.insets = new Insets(0, 26, 0, 15);\n\t\t\tgridBagConstraints2.gridy = 2;\n\t\t\tgridBagConstraints2.weightx = 1.0;\n\t\t\tgridBagConstraints2.anchor = GridBagConstraints.WEST;\n\t\t\tgridBagConstraints2.gridx = 0;\n\t\t\tlabelCanonicalName = new JLabel();\n\t\t\tlabelCanonicalName.setText(\"JLabel\");\n\t\t\tlabelCanonicalName.setFont(new java.awt.Font(\"SansSerif\", java.awt.Font.BOLD, 14));\n\t\t\tlabelCanonicalName.setHorizontalAlignment(SwingConstants.LEADING);\n\t\t\tpanelInfo = new JPanel();\n\t\t\tpanelInfo.setLayout(new GridBagLayout());\n\t\t\tpanelInfo.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));\n\t\t\tpanelInfo.setPreferredSize(new Dimension(629, 100));\n\t\t\tpanelInfo.setMinimumSize(new Dimension(629, 100));\n\t\t\tpanelInfo.setMaximumSize(new Dimension(629, 100));\n\t\t\tpanelInfo.add(labelCanonicalName, gridBagConstraints5);\n\t\t\tpanelInfo.add(getJPanel4(), gridBagConstraints6);\n\t\t\tpanelInfo.add(getJTextAreaDescription(), gridBagConstraints7);\n\t\t}\n\t\treturn panelInfo;\n\t}", "@Override protected void startup() {\n show(new MIDLetParamsView(this));\n }", "public ShowDetails() {\n initComponents();\n }" ]
[ "0.766496", "0.7525421", "0.7270016", "0.71691537", "0.6922879", "0.68814415", "0.66843414", "0.6591622", "0.653033", "0.64897466", "0.64621216", "0.639837", "0.63861763", "0.63729125", "0.6336852", "0.6333759", "0.6318006", "0.6290407", "0.6269314", "0.6252935", "0.6230611", "0.62295943", "0.62087786", "0.6173666", "0.61543214", "0.6138662", "0.6136837", "0.6128782", "0.61180735", "0.61088", "0.610296", "0.60920703", "0.6088466", "0.60747534", "0.6069927", "0.60577124", "0.60558164", "0.6052252", "0.6049391", "0.6045404", "0.60445774", "0.60409635", "0.6017551", "0.60109365", "0.6006765", "0.6002889", "0.60005176", "0.5999429", "0.59936976", "0.5992602", "0.5979068", "0.59781337", "0.5977558", "0.5977007", "0.5972408", "0.5966628", "0.59551513", "0.5946483", "0.5932582", "0.5930982", "0.5927588", "0.592016", "0.5910821", "0.59053576", "0.5901485", "0.58927834", "0.58854324", "0.5878552", "0.5870503", "0.58667517", "0.58648646", "0.58577657", "0.5840489", "0.58390236", "0.5827761", "0.58249635", "0.58244145", "0.58205736", "0.58140546", "0.58122325", "0.58098304", "0.5808788", "0.5806813", "0.58032537", "0.57983375", "0.57982284", "0.57904965", "0.57868516", "0.57868034", "0.57787967", "0.57784754", "0.57783467", "0.5774472", "0.57709235", "0.57678235", "0.576774", "0.575605", "0.5752183", "0.5749586", "0.57447994", "0.5742538" ]
0.0
-1
Create a new object RecipeBook that will contain the recipes with the applicable list of ingredients
public static void main(String[] args) { RecipeBook recipeBook= new RecipeBook(); recipeBook.setName("My Recipe Book"); // This is the default value that will be shown on the drop down list recipeBook.newRecipe("Select an Option"); //Loading sample recipes into memory //Create an object type Recipe recipeBook.newRecipe("Peach Almond Pie"); // Adding ingredients to the the Recipe recipeBook.addIngredient("Peach Almond Pie"," fresh peaches, sliced ",2, "cups"); recipeBook.addIngredient("Peach Almond Pie"," lemon juice ",1, "Tbsp"); recipeBook.addIngredient("Peach Almond Pie"," sugar ",0.25, "cup"); recipeBook.addIngredient("Peach Almond Pie"," cornstarch ",3, "Tbsp"); recipeBook.addIngredient("Peach Almond Pie"," butter ",2, "tsp"); recipeBook.addIngredient("Peach Almond Pie"," salt ",1, "dash"); recipeBook.addIngredient("Peach Almond Pie"," almond extract ",0.25, "tsp"); recipeBook.addIngredient("Peach Almond Pie"," pie shell ",1, "9 inch"); // Adding cooking instructions recipeBook.setRecipeInstruction("Peach Almond Pie", "Sprinkle peaches with lemon and sugar. Let stand 1 hour. Drain to get 1 cup syrup. Add cornstarch to syrup and blend. Cook over low heat until thick. Remove from heat. Add butter, salt, and almond extract. Cool. Carefully stir in peaches. Put in shell. Chill. Serve with whipped cream, topped with slivered almonds and marachino cherries."); recipeBook.newRecipe("Creamy Chicken Broccoli with Rice"); recipeBook.addIngredient("Creamy Chicken Broccoli with Rice"," miracle whip ",0.5, "cups"); recipeBook.addIngredient("Creamy Chicken Broccoli with Rice"," skinless chicken breast, cubed ",1, "pound"); recipeBook.addIngredient("Creamy Chicken Broccoli with Rice"," broccoli, chopped ",2, "cups"); recipeBook.addIngredient("Creamy Chicken Broccoli with Rice"," Velveeta rice ",0.5, "pound"); recipeBook.setRecipeInstruction("Creamy Chicken Broccoli with Rice", "Heat salad dressing in a large skillet. Add chicken and completely cook for about 8 minutes. Stir in broccoli and cook until heated. Add Velveeta and stir until thoroughly melted. Serve over rice."); //Display the Main Menu to the user MainMenu mainMenu =new MainMenu(recipeBook); mainMenu.setVisible(true); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void addIngredientRecipe(ArrayList<IngredientRecipePOJO> ingr);", "public Recipes()\n {\n\t\titems = new ArrayList<food>();\n }", "Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);", "public Recipe() { }", "public Recipe(String id, String title, String url, ArrayList<String> ingredients,ArrayList<String> category, String image) {\n this.id = id;\n this.title = title;\n this.url = url;\n this.tag = tag;\n this.ingredients = ingredients;\n this.category = category;\n this.image = image;\n }", "public RecipeForm(){\n\t\tFactory ingredientFactory = new Factory() {\n\t\t\tpublic Object create() {\n\t\t\t\treturn new Ingredient();\n\t\t }\n\t\t};\n\t\tFactory quantityFactory = new Factory(){\n\t\t\tpublic Object create(){\n\t\t\t\treturn new Quantity();\n\t\t\t}\n\t\t};\n\t\t\n\t\tingredientsList = LazyList.decorate(new ArrayList<Ingredient>(), ingredientFactory);\n\t\tquantities = LazyList.decorate(new ArrayList<Quantity>(), quantityFactory);\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}", "RecipeObject addRecipe(RecipeObject recipe);", "public Ingredient(String name, BigDecimal amount, String unitmeasure, List<Recipe> recipes) {\n this.name = name;\n this.amount = amount;\n this.unitMeasure = unitmeasure;\n this.recipes = recipes;\n }", "private Recipe mapToRecipeObject(RecipeEntity recipeEntity) {\n\t\tRecipe recipe = new Recipe();\n\t\t//Map primitive fields\n\t\trecipe.setId(recipeEntity.getId());\n\t\trecipe.setName(recipeEntity.getName());\n\t\trecipe.setType(recipeEntity.getType());\n\t\trecipe.setServingCapacity(recipeEntity.getServingCapacity());\n\t\t\n\t\t//Format creation date time to required format\n\t\tif(recipeEntity.getCreationDateTime() != null)\n\t\t\trecipe.setCDateTimeString(Util.formatDateTime(recipeEntity.getCreationDateTime()));\n\t\trecipe.setCreationDateTime(recipeEntity.getCreationDateTime());\n\t\t\n\t\t//Convert ingredients string into list and set to recipe object \n\t\tlog.debug(\"Ingredients String from DB: \"+recipeEntity.getIngredients());\n\t\tList<Ingredient> ingredientsList = Util.convertJSONStringToIngredientsList(recipeEntity.getIngredients());\n\t\tlog.debug(\"Ingredients List size after conversion: \"+ingredientsList.size());\n\t\trecipe.setIngredientsList(ingredientsList);\n\n\t\trecipe.setInstructions(recipeEntity.getInstructions());\n\n\t\treturn recipe;\n\t}", "public List<Recipe> getRecipe()\n {\n SQLiteDatabase db = getReadableDatabase();\n SQLiteQueryBuilder qb = new SQLiteQueryBuilder();\n\n //Attributes as they appear in the database\n String[] sqlSelect = {\"recipeid\",\"name\",\"type\",\"description\",\"ingredients\",\"instruction\",\"imageid\",\"nutritionimage\",\"cookingtime\",\"totalcost\"};\n String RECIPE_TABLE = \"Recipe\"; //Table name as it is in database\n\n qb.setTables(RECIPE_TABLE);\n Cursor cursor = qb.query(db,sqlSelect, null,null, null, null, null);\n List<Recipe> result = new ArrayList<>();\n if(cursor.moveToFirst())\n {\n do{\n Recipe recipe = new Recipe();\n recipe.setRecipeid(cursor.getInt(cursor.getColumnIndex(\"recipeid\")));\n recipe.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n recipe.setType(cursor.getString(cursor.getColumnIndex(\"type\")));\n recipe.setDescription(cursor.getString(cursor.getColumnIndex(\"description\")));\n recipe.setIngredients(cursor.getString(cursor.getColumnIndex(\"ingredients\")));\n recipe.setInstruction(cursor.getString(cursor.getColumnIndex(\"instruction\")));\n recipe.setImageid(cursor.getString(cursor.getColumnIndex(\"imageid\")));\n recipe.setNutritionimage(cursor.getString(cursor.getColumnIndex(\"nutritionimage\")));\n recipe.setCookingtime(cursor.getInt(cursor.getColumnIndex(\"cookingtime\")));\n recipe.setTotalcost(cursor.getFloat(cursor.getColumnIndex(\"totalcost\")));\n\n result.add(recipe);\n }while(cursor.moveToNext());\n }\n return result;\n }", "ArrayList<RecipeObject> getRecipes();", "private void generateRecipeList(List<Match> recipeDataList, int ingredients) {\n allMatches.clear();\n // Produces numerical score for each recipe\n weightedSearchByIngredients(recipeDataList, ingredients);\n allMatches.addAll(recipeDataList);\n adapter = new IngredientSearchAdapter(allMatches);\n recyclerView.setAdapter(adapter);\n for (Match recipe : recipeDataList){\n System.out.println(\"Recipe: \" + recipe.getRecipeName()\n + \"| Weight: \" + recipe.getWeight()\n + \"| Ingredients: \" + recipe.getIngredients().size());\n }\n }", "public interface Recipe {\n\n String getTitle();\n\n String getDescription();\n\n List<String> getMealType();\n\n List<String> getFoodType();\n\n List<String> getIngredients();\n}", "public void addNewRecipe() {\r\n listOfRecipes.add(new Recipe().createNewRecipe());\r\n }", "public void setIngredients(String ingredients) {\n this.ingredients = ingredients;\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}", "public Ingredient() { }", "List<Recipe> getAllRecipes();", "public Ingredient(){\r\n \r\n }", "public Ingredient() {\n }", "public Ingredient(){\r\n\t}", "public IntermediateIngredient(){\n ingredients=new ArrayList<>();\n intermediateIngredients=new ArrayList<>();\n }", "@Override\n\tpublic List<Recipe> findByIngredients(List<String> ingredients) {\n\t\treturn null;\n\t}", "@java.lang.Override\n public io.grafeas.v1.RecipeOrBuilder getRecipeOrBuilder() {\n return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_;\n }", "public DieteticBrotherModel() {\n database = new Database();\n availableFood = database.initializeAvailableFood();\n recipes = database.initializeRecipes(availableFood);\n\n recipe = new Recipe(0, \"My Recipe\");\n }", "DirectionIngredientsAdapter(List<Ingredient> ingredients) {\n this.ingredients = ingredients;\n }", "public Recipe(int inProduced)\n\t{\n\t\tthis.produced = inProduced;\n\t\tingredients = new ArrayList<Ingredient>();\n\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 void setRelatedRecipes(List<Recipe> relatedRecipes) {\r\n this.relatedRecipes = relatedRecipes;\r\n }", "public static void main(String[] args) {\n Recipe recipe ;\n Scanner keyboard= new Scanner (System.in);\n ArrayList<Recipe> recipeArrayList= new ArrayList<> ();\n ArrayList<String> ingridetList= new ArrayList<>();\n ArrayList<String>directionsList= new ArrayList<>();\n String answer;\n\n do{\n recipe = new Recipe ();\n System.out.println (\"Enter the ingredient :\" );\n recipe.setIngredients ( keyboard.nextLine () );\n\n\n\n\n System.out.println (\"Do you want to add more ingredients?(yes/no)\" );\n answer=keyboard.nextLine ();\n ingridetList.add(recipe.getIngredients());\n recipe.setArrayIngredients(ingridetList);\n\n }while(answer.equalsIgnoreCase ( \"yes\" )||!answer.equalsIgnoreCase ( \"no\" ));\n\n\n\n System.out.println (\"Enter the directions for the ingredients: \" );\n recipe.setDirections ( keyboard.nextLine () );\n // directionsList.add(recipe.getIngredients());\n\n\n\n recipeArrayList.add ( recipe );\n\n for(Recipe recipe1:recipeArrayList) {\n\n\n for(String ingRec: recipe1.getArrayIngredients())\n {\n System.out.println ( \"The Ingredients is : \" + ingRec );\n }\n System.out.println (\"The Directions is : \" + recipe1.getDirections () );\n }\n\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "private List<Ingredient> fillFirstMeal(List<Ingredient> ingredients) throws Exception {\n List<Ingredient> availableIngredients = new ArrayList<Ingredient>(ingredients);\n mMeals.get(0).fillCarbs(ingredients);\n mMeals.get(0).fillSauce(ingredients);\n availableIngredients.removeAll(mMeals.get(0).getIngredients());\n return availableIngredients;\n }", "@ApiModelProperty(value = \"recipe ingredients by id\")\n @JsonProperty(\"ingredients\")\n public List<BigDecimal> getIngredients() {\n return ingredients;\n }", "public ArrayList<IngredientRecipePOJO> getAllIngredientRecipeByIdRecipe(String idRecipe);", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "public void createBox(Context context){\n\t\t\n\t\tLog.d(TAG, \"Begin creating recipe box\");\n\t\t\n\t\t//Open the file containing the recipes\n final Resources resources = context.getResources();\n InputStream inputStream = resources.openRawResource(R.raw.recipes);\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\t\t\n Log.v(TAG, \"Buffered Reader Ready\");\n \n // VAriable to hold the lines as they are read\n\t\tString line;\n try {\n \t//Read in one line from the recipe file \n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tLog.v(TAG, \"Read line from buffer: \" + line);\n\t\t\t\t\n\t\t\t\t//Split the based on the pipe delimiter \"|\"\n\t\t\t\tString[] strings = TextUtils.split(line, \"\\\\|\\\\|\");\n\t\t\t\t\n\t\t\t\t//Position zero will always be the Recipe Name\n\t\t\t\tLog.v(TAG, \"Set recipe name: \" + strings[0]);\n\t\t\t\tString recipeName = strings[0];\n\t\t\t\t\n\t\t\t\t//Position zero will always be the Recipe Name\n\t\t\t\tLog.v(TAG, \"Set recipe description: \" + strings[1]);\n\t\t\t String recipeDescription = strings[1];\n\t\t\t\t\n\t\t\t String splitter = \"\\\\|\";\n\t\t\t \n\t\t\t // The array lists for the recipe\n\t\t\t ArrayList<String> recipeCategories = stringToArrayList(strings[2], splitter);\n\t\t\t\tArrayList<String> recipeIngredients = stringToArrayList(strings[3], splitter);\n\t\t\t ArrayList<String> recipeInstructions = stringToArrayList(strings[4], splitter);\n\t\t\t\t\n\t\t\t\tRECIPES.add(new Recipe(recipeName, recipeDescription, recipeCategories, recipeIngredients, recipeInstructions));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n Log.d(TAG, \"Recipe box complete\");\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.addrecipe);\n\t\tdb = new ReciPalDB(getApplicationContext());\n\n\t\tthis.layoutInflator = LayoutInflater.from(this);\n\n\t\tthis.saveBtn = (Button)this.findViewById(R.id.dialogSave); \n\t\tthis.recipeImage = (ImageView)this.findViewById(R.id.dialogImage);\n\t\tthis.recipeName = (EditText)this.findViewById(R.id.dialogName);\n\t\tthis.recipeRating = (RatingBar)this.findViewById(R.id.dialogRating);\n\t\tthis.recipePrep = (EditText)this.findViewById(R.id.dialogPrep);\n\t\tthis.lvIngredients = (LinearLayout)this.findViewById(R.id.ingredientList);\n\t\tthis.addIngredient = (ImageView)this.findViewById(R.id.ibAddIngred);\n\t\trecipe = new Recipe(\"\", \"\", \"\", 3);\n\n\t\tBundle extras = this.getIntent().getExtras();\n\t\tif(extras != null)\n\t\t{\n\t\t\trecipe = (Recipe) extras.getSerializable(\"edu.gvsu.cis680.recipal.recipe\"); \t\t\t \t\t\t\n\t\t\tRefresh();\n\t\t}\t\t\n\n\t\tthis.addIngredient.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tAddRecipe.this.recipe.setName(recipeName.getText().toString());\n\t\t\t\tAddRecipe.this.recipe.setImage((String)recipeImage.getTag());\n\t\t\t\tAddRecipe.this.recipe.setRating(recipeRating.getRating());\n\t\t\t\tAddRecipe.this.recipe.setPreperation(recipePrep.getText().toString());\t\t\t\t\n\t\t\t\tshowDialog(ADD_INGREDIENT_DIALOG);\n\t\t\t}\n\t\t});\n\n\t\t//Set the on Save click listener. \n\t\t//On save pass back the set parameters to the calling activity\n\t\tthis.saveBtn.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override public void onClick(View v) {\n\t\t\t\t//if(recipe.getId() == -1) {\n\t\t\t\t//\trecipe = new Recipe(recipeName.getText().toString(), recipePrep.getText().toString(), (String)recipeImage.getTag(), recipeRating.getRating());\n\t\t\t\t//}\n\t\t\t\t//else //this means it was passed in...must be editing...this keeps the id...\n\t\t\t\t//{\n\t\t\t\trecipe.setName(recipeName.getText().toString());\n\t\t\t\trecipe.setImage((String)recipeImage.getTag());\n\t\t\t\trecipe.setRating(recipeRating.getRating());\n\t\t\t\trecipe.setPreperation(recipePrep.getText().toString());\n\t\t\t\t//}\n\n\t\t\t\tIntent data = new Intent();\n\t\t\t\tdata.putExtra(\"edu.gvsu.cis680.recipal.recipe\", recipe);\n\n\t\t\t\t//set the result to OK and finish / close the activity\n\t\t\t\tsetResult(Activity.RESULT_OK, data);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}); \n\n\t\tthis.recipeImage.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setType(\"image/*\");\n\t\t\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\t\t\tstartActivityForResult(Intent.createChooser(intent, \"Select Picture\"), SELECT_IMAGE);\t\t\t\t\n\t\t\t}\n\t\t});\n\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}", "List<RecipeObject> searchRecipes(String query, String number, String offset, String diet, String intolerances, String type, String cuisine, String ingredients) throws EntityException;", "@RequestMapping(method = RequestMethod.GET, value = \"/recipes\", produces = MediaType.APPLICATION_JSON_VALUE)\n public RecipesDescriptor getRecipes() {\n final Stream<Recipe> stream = StreamSupport.stream(this.recipeRepository.findAll().spliterator(), false);\n\n final List<Recipe> recipes = stream.collect(Collectors.toList());\n return new RecipesDescriptor(recipes);\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 }", "ArrayList<RecipeObject> getRecipes(String recipeName);", "private void populateIngredientView() {\n\t\tListView ingredientsLV = (ListView) findViewById(R.id.lv_Ingredients);\n\t\tregisterForContextMenu(ingredientsLV);\n\n\t\tArrayList<String> combined = RecipeView\n\t\t\t\t.formCombinedArray(currentRecipe);\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n\t\t\t\tR.layout.list_item, combined);\n\t\tingredientsLV.setAdapter(adapter);\n\t\tsetListViewHeightBasedOnChildren(ingredientsLV);\n\t}", "public List<Recipe> getRecipes()\n {\n return _recipes;\n }", "public void addRecipe(Recipe recipe){\n //recipes.add(recipe);\n if(recipe != null){\n recipes.add(recipe);\n }\n }", "public Recipe getRecipe() {\r\n return recipe;\r\n }", "public void addRecipe(Recipe recipe)\n {\n recipe.setDataSource(this);\n _recipes.add(recipe);\n }", "public interface RecipeStore {\n //Returns a recipe list of all recipes\n List<Recipe> getAllRecipes();\n //Returns a string list of recipe titles found from ingredients query\n List<String> getRecipeByIngredients(CharSequence query);\n //Returns a single recipe found from query\n Recipe getRecipe(CharSequence query);\n //Returns a single recipe image from query\n byte[] getRecipeImage(CharSequence query);\n //Returns a bitmap list of all small images for all recipes\n List<Bitmap> getRecipeImgSmall();\n //Returns a string list of all recipe titles\n List<String> getRecipeTitles();\n //Takes a recipe id and adds it to the favorites table\n void addToFavorites(int recipeId);\n //Returns a bitmap list of all images for recipes in the favorites table\n List<Bitmap> getFavoriteRecipeImgs();\n //Returns a string list of all titles for recipes in the favorites table\n List<String> getFavoriteRecipeTitle();\n //Takes a recipe id and deletes it from the favorites table\n void deleteFavorite(int id);\n //Takes a recipe id and checks if it exists in the favorites table\n boolean isFavorite(int id);\n //Takes recipe parameters and inserts a new row in recipes table\n Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);\n //Returns number of rows in recipes\n long getRecipesCount();\n //Opens the database\n SQLiteDatabase open() throws SQLException;\n //Closes the database\n void close();\n}", "private RecipeEntity mapToRecipeEntity(Recipe recipe) {\n\t\tRecipeEntity rEntity = new RecipeEntity();\n\t\t//Map primitive fields\n\t\trEntity.setId(recipe.getId());\n\t\trEntity.setName(recipe.getName());\n\t\trEntity.setType(recipe.getType());\n\t\trEntity.setServingCapacity(recipe.getServingCapacity());\n\t\t\n\t\t//Save current date time into recipe instance, if not given\n\t\tif(recipe.getCreationDateTime() == null) {\n\t\t\tOptional<Date> currentDateTime = Util.getCurrentDateTime();\n\t\t\tif(currentDateTime.isPresent())\n\t\t\t\tlog.debug(\"Current DateTime to be set in recipe entity: \"+currentDateTime.toString());\n\t\t\telse\n\t\t\t\tlog.warn(\"Setting null to current date time field in recipe entity\");\n\t\t\trEntity.setCreationDateTime(currentDateTime.get());\n\t\t} else {\n\t\t\tlog.debug(\"Retaining given creation date time value into recipe entity\");\n\t\t\trEntity.setCreationDateTime(recipe.getCreationDateTime());\n\t\t}\n\t\t\n\t\t//Convert ingredients list into String and set to recipe entity\n\t\tlog.debug(\"Number of ingredients to convert to string: \"+recipe.getIngredientsList().size());\n\t\tString ingredients = Util.convertToJSONString(recipe.getIngredientsList());\n\t\tlog.debug(\"Ingredients String: \"+ingredients);\n\t\trEntity.setIngredients(ingredients);\n\t\t\n\t\trEntity.setInstructions(recipe.getInstructions());\n\t\t\n\t\treturn rEntity;\n\t}", "public Recipe getRecipe() {\n return recipe;\n }", "public static ArrayList<Recipe> getAllRecipes() {\n allRecipes.add(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients2\"));\n allRecipes.add(new Recipe(\"Pasta\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n\n return allRecipes;\n }", "@Override\n public void createRecipe(RecipeEntity recipeEntity)\n {\n this.save(recipeEntity);\n }", "static ArrayList<Ingredient> getIngredients() {\n\t\tArrayList<Ingredient> Ingredients = new ArrayList<Ingredient>();\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\taddIngredient(Ingredients, ing);\n\t\t\t}\n\t\t}\n\t\treturn Ingredients;\n\t}", "@Override\n public void seedBooks() throws IOException {\n if (this.bookRepository.count() > 0) {\n return;\n }\n\n String[] lines = this.readFileUtil.read(BOOKS_FILE_RELATIVE_PATH);\n for (int i = 0; i < lines.length; i++) {\n /* Get args */\n String[] args = lines[i].split(\"\\\\s+\");\n\n /* Get edition type */\n EditionType editionType = EditionType.values()[Integer.parseInt(args[0])];\n\n /* Get release date */\n LocalDate releaseDate = localDateUtil.parseByPattern(\"d/M/yyyy\", args[1]);\n\n /* Get copies */\n long copies = Long.parseLong(args[2]);\n\n /* Get price */\n BigDecimal price = new BigDecimal(args[3]);\n\n /* Get age restriction */\n AgeRestriction ageRestriction = AgeRestriction.values()[Integer.parseInt(args[4])];\n\n /* Get title */\n String title = Arrays.stream(args).skip(5).collect(Collectors.joining(\" \"));\n\n /* Get author */\n Author randomAuthor = this.randomAuthorUtil.getRandom();\n\n /* Get categories */\n Set<Category> randomCategories = this.randomCategoriesUtil.getRandom();\n\n /* Create book */\n Book book = new Book(ageRestriction, copies, editionType, price, releaseDate, title, randomAuthor);\n book.setCategories(randomCategories);\n\n /* Save the book */\n this.bookRepository.saveAndFlush(book);\n }\n }", "@Override\n\tpublic void initRecipes()\n\t{\n\n\t}", "@Override\n\tpublic void addRecipes() {\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_BROWN), \"coralBrown\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_RED), \"coralRed\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_YELLOW), \"coralYellow\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_BLUE), \"coralLightBlue\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.MAGENTA), \"coralMagenta\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.ORANGE), \"coralOrange\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PINK), \"coralPink\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PURPLE), \"coralPurple\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.GREY), \"coralGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_GREY), \"coralLightGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_WHITE), \"coralWhite\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_GREEN), \"plantKelp\", true);\n\t\t\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BLUE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BRAIN), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CANDYCANE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CUCUMBER), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_ORANGE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PINK), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PURPLE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_RED), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_WHITE), 5);\n\t\t\n\t\t//Kelp Wrap Recipe\n\t\tRecipeHelper.add9x9Recipe(new ItemStack(Core.food, 1, FoodMeta.KELP_WRAP), \"plantKelp\");\n\t\t\n\t\taddOceanChestLoot();\n\t}", "public List<Ingredient> toIngredient(List<String> ingredientsList) {\n\t\tList<Ingredient> ingredients = new ArrayList<Ingredient>();\n\t\tfor (int i = 0; i < ingredientsList.size(); i++) {\n\t\t\tingredients.add(new Ingredient(ingredientsList.get(i)));\n\t\t}\n\t\treturn ingredients;\n\t}", "public RecipeDatabase() {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference AllRecipeRef = database.getReference(\"allRecipes\");\n DatabaseReference newRecipeRef = AllRecipeRef.push();\n newRecipeRef.setValue(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n }", "public io.grafeas.v1.Recipe.Builder getRecipeBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getRecipeFieldBuilder().getBuilder();\n }", "public JsonObject getRecipesByIngredients(String ingredients) throws Exception\n {\n URL url = new URL(baseUrl+\"i=\"+ingredients);\n/* TODO \nYou have to use the url to retrieve the contents of the website. \nThis will be a String, but in JSON format. */\n String contents = \"\";\n Scanner urlScanner = new Scanner(url.openStream());\n while (urlScanner.hasNextLine()){\n contents += urlScanner.nextLine();\n }\n urlScanner.close();\n JsonObject recipes = (JsonObject)Jsoner.deserialize(contents,new JsonObject());\n\n return recipes;\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 static RecipeFragment newInstance(RecipeIngredient recipeIngredients) {\n RecipeFragment fragment = new RecipeFragment();\n fragment.recipeIngredient = recipeIngredients;\n return fragment;\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\tboolean hasIngredients = false;\r\n\t\t\tfor(JTextField f : ingredientFields){\r\n\t\t\t\tif(!f.getText().equals(\"\")){\r\n\t\t\t\t\thasIngredients = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (nameField.getText().equals(\"\") || descriptionField.getText().equals(\"\") || directionsField.getText().equals(\"\") || !hasIngredients) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please fill out all fields.\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tdispose();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tRecipe recipe = new Recipe(nameField.getText(), descriptionField.getText(), directionsField.getText()); \r\n\r\n\t\t\tfor(int i=0; i<ingredientFields.size(); i++) {\r\n\t\t\t\tif (!ingredientFields.get(i).getText().equals(\"\"))\r\n\t\t\t\t\t\trecipe.setIngredient(ingredientFields.get(i).getText());\r\n\t\t\t}\r\n\r\n\t\t\tlist.add(recipe);\t\t \r\n\t\t\tlistModel.addElement(nameField.getText());\r\n\t\t\tlistNames.setModel(listModel);\r\n\t\t\tlistNames.setSelectedIndex(list.size()-1);\r\n\r\n\t\t\t//saveList(list);\r\n\r\n\t\t\tdispose();\t\t\t\r\n\t\t}", "@Override\n public View onCreateView(final LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_recipe_details, container, false);\n ButterKnife.bind(this, view);\n\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(getContext(), ((LinearLayoutManager)mRecyclerView.getLayoutManager()).getOrientation());\n dividerItemDecoration.setDrawable(getResources().getDrawable(R.drawable.list_item_divider));\n mRecyclerView.addItemDecoration(dividerItemDecoration);\n mRecyclerView.setAdapter(mStepListAdapter);\n\n ingredientsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), IngredientListActivity.class);\n intent.putParcelableArrayListExtra(\"ingredients\", (ArrayList<Ingredient>) mRecipe.getIngredients());\n startActivity(intent);\n }\n });\n\n\n\n return view;\n }", "private void loadRecipe(ArrayList<Recipe> recipe) throws SQLException, ClassNotFoundException {\r\n ArrayList<Ingredient> ingredients = new IngredientControllerUtil().getAllIngredient();\r\n ObservableList<RecipeTM> obList = FXCollections.observableArrayList();\r\n\r\n for (Recipe r : recipe) {\r\n for (Ingredient ingredient : ingredients) {\r\n if (r.getIngreID().equals(ingredient.getIngreID())) {\r\n\r\n String scale;\r\n Button btn = new Button(\"Remove\");\r\n double unit = 1;\r\n\r\n if (ingredient.getIngreUnit().matches(\"[0-9]*(g)$\")) {\r\n scale = \"g\";\r\n unit = Double.parseDouble(ingredient.getIngreUnit().split(\"g\")[0]);\r\n } else if (ingredient.getIngreUnit().matches(\"[0-9]*(ml)$\")) {\r\n scale = \"ml\";\r\n unit = Double.parseDouble(ingredient.getIngreUnit().split(\"m\")[0]);\r\n } else {\r\n scale = \"\";\r\n unit = Double.parseDouble(ingredient.getIngreUnit());\r\n }\r\n\r\n double price = (ingredient.getUnitePrice() / unit) * r.getQty();\r\n RecipeTM tm = new RecipeTM(\r\n r.getIngreID(),\r\n ingredient.getIngreName(),\r\n ingredient.getIngreUnit(),\r\n r.getQty() + scale,\r\n price,\r\n btn\r\n );\r\n obList.add(tm);\r\n removeIngre(btn, tm, obList);\r\n break;\r\n }\r\n\r\n }\r\n }\r\n tblRecipe.setItems(obList);\r\n }", "public RecipeDTO(int recipeID, String recipeName) \n\t{\n\t\tthis.recipeID = recipeID;\n\t\tthis.recipeName = recipeName;\n\t}", "public Recipe(String[] in)\r\n {\r\n double temp;\r\n if (in.length == 3){\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2];\r\n this.w_qty = makeDecimal(in[0]);\r\n }\r\n else {if (in.length == 5) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3] + \" \" + in[4];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = Double.parseDouble(in[0])+ temp;\r\n }\r\n else if (in.length == 4) {\r\n if (in[1].contains(\"/\")) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = temp + Double.parseDouble(in[0]);}\r\n else {\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2] + \" \" + in[3];\r\n this.w_qty = makeDecimal(in[0]);}\r\n }\r\n }\r\n this.working_measure = measure;\r\n this.final_measure = measure;\r\n }", "public RecipeAdder(RecipeList listA, DefaultListModel listModelA, JList listNamesA){\r\n\t\tsuper(\"Add Recipe\");\r\n\r\n\r\n\t\tlist = listA;\r\n\t\tlistModel = listModelA;\r\n\t\tlistNames = listNamesA;\t\r\n\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE) ;\r\n\r\n\t\tfor(int i=0; i<6; i++)\r\n\t\t\tingredientFields.add(new JTextField(30));\r\n\r\n\t\tform = new Form();\r\n\r\n\t\tJPanel content = new JPanel();\r\n\t\tsetContentPane(content);\r\n\r\n\t\tBorder titled2 = new TitledBorder(\"Enter Information:\");\r\n\t\tcontent.setBorder(titled2);\r\n\r\n\t\tActionListener saveListener = new buttonListener();\r\n\t\tActionListener moreIngredientsListener = new moreIngredientsListener();\r\n\r\n\t\tbutton = new JButton(\"Add to list\");\r\n\t\tbutton.addActionListener(saveListener);\r\n\r\n\t\tbutton2 = new JButton(\"More Ingredients\");\r\n\t\tbutton2.addActionListener(moreIngredientsListener);\r\n\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\r\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));\r\n\t\tpanel.add(button);\r\n\t\tpanel.add(button2);\r\n\r\n\t\tgetContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.PAGE_AXIS));\r\n\r\n\t\tadd(form);\r\n\t\tadd(panel);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "void createRecipe(Recipe recipe) throws ServiceFailureException;", "@Override\n\tpublic String ingredients() {\n\t\treturn \"Chicken, Bread, seasoning , cheese\";\n\t}", "public void viewRecipes(View v){\n Intent intent = new Intent(CreateGroceryList.this, IngredientSearchResults.class);\n Bundle args = new Bundle();\n args.putSerializable(\"ingredientList\", (Serializable)ingredientModelList);\n intent .putExtra(\"bundle\", args);\n startActivity(intent);\n }", "@Test\n public void getAllRecipeIngredients_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returned);\n assertNotEquals(\"getAllRecipeIngredients - Non-empty List Returned\", 0, allIngredients.size());\n }", "private void populateRecipeInfo() {\n\t\tString title = currentRecipe.getTitle();\n\t\tString directions = currentRecipe.getDirections();\n\t\tString description = currentRecipe.getDescription();\n\n\t\tfillTextViews(title, description, directions);\n\t\tpopulateIngredientView();\n\t}", "public static List<BakingRecipe> getBakingRecipes(String bakingJsonStr) throws JSONException {\n // Declare and initialize variables to return results\n\n List<BakingRecipe> bakingRecipes = new ArrayList<>();\n\n // Check if there are actual results\n JSONArray bakingJsonArray = new JSONArray(bakingJsonStr);\n if (bakingJsonArray.length() == 0) {\n return null;\n }\n for (int i = 0; i < bakingJsonArray.length(); i++) {\n // Create a bakingRecipe object to put data\n BakingRecipe bakingRecipe = new BakingRecipe();\n // Get the current json recipe\n JSONObject currentRecipeJson = bakingJsonArray.getJSONObject(i);\n // Get information for this recipe\n bakingRecipe.setId(currentRecipeJson.getInt(ID));\n bakingRecipe.setName(currentRecipeJson.getString(NAME));\n // Get ingredients array\n JSONArray ingredientJsonArray = currentRecipeJson.getJSONArray(INGREDIENTS);\n // Create List to hold the recipe ingredients\n List<BakingIngredient> bakingIngredients = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < ingredientJsonArray.length(); j++) {\n // Create a baking ingredient object to hold the ingredient data\n BakingIngredient bakingIngredient = new BakingIngredient();\n // Get the current json ingredient\n JSONObject currentIngredientJson = ingredientJsonArray.getJSONObject(j);\n // Get ingredient data\n bakingIngredient.setQuantity(currentIngredientJson.getDouble(QUANTITY));\n bakingIngredient.setMeasure(currentIngredientJson.getString(MEASURE));\n bakingIngredient.setIngredient(currentIngredientJson.getString(INGREDIENT));\n // Add recipe key to baking ingredient\n bakingIngredient.setRecipeKey(bakingRecipe.getId());\n // add ingredient to ingredients list\n bakingIngredients.add(bakingIngredient);\n }\n // Add ingredients list to baking recipe\n bakingRecipe.setIngredientList(bakingIngredients);\n // Get steps array\n JSONArray stepJsonArray = currentRecipeJson.getJSONArray(STEPS);\n // Create List to hold the recipe ingredients\n List<BakingStep> bakingSteps = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < stepJsonArray.length(); j++) {\n // Create a baking step object to hold the step data\n BakingStep bakingStep = new BakingStep();\n // Get the current JSON step\n JSONObject currentStepJson = stepJsonArray.getJSONObject(j);\n // Get step data\n bakingStep.setId(currentStepJson.getInt(ID));\n bakingStep.setShortDescription(currentStepJson.getString(SHORT_DESCRIPTION));\n bakingStep.setDescription(currentStepJson.getString(DESCRIPTION));\n bakingStep.setVideoURL(currentStepJson.getString(VIDEO_URL));\n bakingStep.setThumbnailURL(currentStepJson.getString(THUMBNAIL_URL));\n // add recipe key to baking step\n bakingStep.setRecipeKey(bakingRecipe.getId());\n // add step to steps list\n bakingSteps.add(bakingStep);\n }\n // add steps list to baking recipe\n bakingRecipe.setStepList(bakingSteps);\n bakingRecipe.setServings(currentRecipeJson.getInt(SERVINGS));\n bakingRecipe.setImage(currentRecipeJson.getString(IMAGE));\n // add baking recipe to baking recipe list\n bakingRecipes.add(bakingRecipe);\n }\n // return completed recipe list\n return bakingRecipes;\n }", "@java.lang.Override\n public io.grafeas.v1.Recipe getRecipe() {\n return recipe_ == null ? io.grafeas.v1.Recipe.getDefaultInstance() : recipe_;\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Gson gson = new Gson();\n dbHelper = new DrinksDbHelper(this);\n String studentDataObjectAsAString = getIntent().getStringExtra(\"Drink\");\n isFavourite = getIntent().getBooleanExtra(\"favourite\", false);\n backScreen = getIntent().getBooleanExtra(\"backScreen\",false);\n drink = gson.fromJson(studentDataObjectAsAString, Drink.class);\n setContentView(R.layout.recipe);\n TextView textViewDrinkName = findViewById(R.id.textViewDrinkName);\n textViewDrinkName.setText(drink.getName());\n ImageView drinkImg = findViewById(R.id.drinkImg);\n byte[] base64converted = Base64.decode(drink.getImage(), Base64.DEFAULT);\n Bitmap bitmap = BitmapFactory.decodeByteArray(base64converted, 0, base64converted.length);\n drinkImg.setImageBitmap(bitmap);\n TextView description = findViewById(R.id.Description);\n description.setText(drink.getDescription());\n TextView glass = findViewById(R.id.glass);\n glass.setText(drink.getGlass());\n TextView recipe = findViewById(R.id.textViewRecipe);\n recipe.setText(drink.getRecipe());\n fav = findViewById(R.id.favourites_Button);\n if(isFavourite) {\n fav.setActivated(true);\n }\n IngredientsListAdapter adapter = new IngredientsListAdapter(this,R.layout.ingredient_list,drink.getIngredients());\n fav.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(isFavourite) {\n isFavourite = false;\n dbHelper.removeFromFavourites(dbHelper.getWritableDatabase(), drink.getId());\n fav.setActivated(false);\n favourites_update(dbHelper.getAllFavourites(dbHelper.getReadableDatabase()));\n }else {\n isFavourite = true;\n dbHelper.addToFavourites(dbHelper.getWritableDatabase(), drink);\n fav.setActivated(true);\n favourites_update(dbHelper.getAllFavourites(dbHelper.getReadableDatabase()));\n }\n }\n });\n NonScrollListView ingredients = findViewById(R.id.ingredients_list);\n ingredients.setClickable(false);\n ingredients.setAdapter(adapter);\n\n\n ImageButton backBtn = findViewById(R.id.back_Button);\n backBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Intent goBack = new Intent(DrinksDisplayActivity.this, MainActivity.class);\n if (backScreen) goBack.putExtra(\"backScreen\", true);\n startActivity(goBack);\n }\n });\n }", "public RecipeData(LuaTable t) {\n this.ingredients = LuaUtil.getList(t, \"ingredients\", Ingredient::new);\n if (this.ingredients.isEmpty()) {\n throw new RuntimeException();\n }\n\n LuaValue result = t.rawget(\"result\");\n LuaValue results = t.rawget(\"results\");\n if (result.isnil() && results.istable()) {\n this.results = LuaUtil.getList(t, \"results\", Product::new);\n } else if (result.isstring() && results.isnil()) {\n this.results = List.of(new Product(result.checkjstring(), LuaUtil.getInt(t, \"result_count\", 1)));\n } else {\n throw new RuntimeException();\n }\n if (this.results.isEmpty()) {\n throw new RuntimeException();\n }\n\n this.time = LuaUtil.getBigRational(t, \"energy_required\", BigRationalConstants.ONE_OVER_TWO);\n this.allowDecomposition = LuaUtil.getBoolean(t, \"allow_decomposition\", true);\n }", "public Ingredient(String description, Money cost, int calories){\r\n //use the setters methods to set description, cost, calories\r\n setDescription(description);\r\n setCost(cost);\r\n setCalories(calories);\r\n }", "public void createCookBook(String[] bookInfo) {\n\t\tString isbn = bookInfo[0];\n\t\tString callNumber = bookInfo[1];\n\t\tint available = Integer.parseInt(bookInfo[2]);\n\t\tint total = Integer.parseInt(bookInfo[3]);\n\t\tString title = bookInfo[4];\n\t\tString publisher = bookInfo[5];\n\t\tchar diet = bookInfo[6].charAt(0);\n\n\t\tbookList.add(new CookBook(isbn, callNumber, available, total, title, publisher, diet));\n\t}", "public List<Ingredient> readAllIngredients() {\n\t\tIngredientDataMapper idm = new IngredientDataMapper();\n\t\tList<Ingredient> allIngredients = new ArrayList<Ingredient>();\n\t\tallIngredients = idm.readAll();\n\t\treturn allIngredients;\n\t\t\n\t}", "public RecipeMB() {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mRecipe = getArguments().getParcelable(\n getResources().getString(R.string.recipe_data_intent_extra));\n\n // Inflate the layout for this fragment\n View view = inflater.inflate(R.layout.fragment_ingredient_list, container, false);\n mContext = view.getContext();\n ButterKnife.bind(this, view);\n\n // Create the adapter and attach it\n mIngredientsAdapter = new IngredientsAdapter();\n mIngredientListView.setAdapter(mIngredientsAdapter);\n\n // Create the linear layout manager and attach it\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(\n mContext, LinearLayoutManager.VERTICAL, false);\n mIngredientListView.setLayoutManager(linearLayoutManager);\n mIngredientListView.setHasFixedSize(false);\n\n\n // Set the button click handler\n mButton.setOnClickListener(new WidgetButtonClickListener());\n\n\n return view;\n }", "@Override\r\n\tpublic List<String> getIngredients() {\r\n\t\treturn ingredients;\r\n\t}", "@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}", "public Sandwich(String breadType, String[] ingredients,\n\t\t\t String foodType, String description, String fatContent,\n\t\t\t double price)\n\t{\n\t\t\n\t}", "public IngredientAdapter(@NonNull Context context, ArrayList<Ingredient> list){\n super(context, 0, list);\n mContext = context;\n ingredientList = list;\n }", "public void setIngredientes(java.util.ArrayList<Ingrediente> ingredientes){\n this.ingredientes = ingredientes;\n }", "public void cook(Chef chef) {\n new Cooker(chef).cookIngredients(ingredients);\n }", "public IngredientModel addIngredient(Ingredient ingredient) {\n Traverson traverson = allIngredientsTraverson();\n // use Traverson to navigate and get associated URL\n String ingredientsUrl = traverson.follow(\"ingredients\").asLink().getHref();\n // use RestTemplate to use REST services\n return restTemplate.postForObject(ingredientsUrl, ingredient, IngredientModel.class);\n }", "public interface RecipeManager {\n \n /** \n * creates a recipe in DB\n * @param recipe recipe to be created\n */\n void createRecipe(Recipe recipe) throws ServiceFailureException;\n \n /**\n * deletes a recipe from DB\n * @param recipe recipe to be deleted\n */\n void deleteRecipe(Recipe recipe) throws ServiceFailureException;\n \n /**\n * edit a recipe in DB\n * @param recipe recipe to be edited \n */\n void updateRecipe(Recipe recipe) throws ServiceFailureException;\n \n /**\n * find recipe by ID\n * @param id id of the searched recipe\n * @return recipe with entered ID\n */ \n Recipe findRecipeById(Long id) throws ServiceFailureException;\n \n /**\n * find recipes, that have this substring in their names\n * @param name name of the searched recipes\n * @return set of recipes with entered substring\n */\n SortedSet<Recipe> findRecipesByName(String name) throws ServiceFailureException;\n \n /**\n * find recipes by it's type\n * @param type type of the searched recipes\n * @return set of recipes with entered type\n */\n SortedSet<Recipe> findRecipesByType(MealType type) throws ServiceFailureException;\n \n /**\n * find recipes by it's category\n * @param category category of the searched recipes\n * @return set of recipes with entered category\n */\n SortedSet<Recipe> findRecipesByCategory(MealCategory category) throws ServiceFailureException;\n \n /**\n * find recipes by it's cooking time\n * @param fromTime lower border of the searched cooking time\n * @param toTime upper border of the searched cooking time\n * @return set of recipes with cooking time between lower and upper borders\n */\n SortedSet<Recipe> findRecipesByCookingTime(int fromTime, int toTime) throws ServiceFailureException;\n SortedSet<Recipe> findRecipesUptoCookingTime(int toTime) throws ServiceFailureException;\n SortedSet<Recipe> findRecipesFromCookingTime(int fromTime) throws ServiceFailureException;\n \n /**\n * find all recipes in the recipe book\n * @return all recipes in the system\n */\n SortedSet<Recipe> findAllRecipes() throws ServiceFailureException;\n}", "public void bindIngredient(Ingredient ingredient){\n // Note: amount should be checked for a negative number when the add ingredient\n // button is clicked\n\n // Set the ingredient amount\n ingredientAmountEditText.setText(String.valueOf(ingredient.getAmount()));\n\n removeTextView.setText(\"X\");\n removeTextView.setClickable(true);\n\n // Set the measurement type that is displayed\n switch(ingredient.getType()){\n case TSP:\n measurementTypeTextView.setText(\"TSP\");\n break;\n case TBSP:\n measurementTypeTextView.setText(\"TBSP\");\n break;\n case GAL:\n measurementTypeTextView.setText(\"GAL\");\n break;\n case CUP:\n measurementTypeTextView.setText(\"CUP\");\n break;\n case QT:\n measurementTypeTextView.setText(\"QT\");\n break;\n case PT:\n measurementTypeTextView.setText(\"PT\");\n break;\n case LB:\n measurementTypeTextView.setText(\"LB\");\n break;\n default:\n measurementTypeTextView.setText(\" \");\n break;\n }\n\n // Set the ingredient name in all uppercase letters\n ingredientNameTextView.setText(ingredient.getName());\n\n // Give the remove button a listener that removes this instance of the\n // single ingredient layout\n removeTextView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Remove ingredient from our ArrayList\n mIngredients.remove(getAdapterPosition());\n\n // Update the items in the RecyclerView\n notifyItemRemoved(getAdapterPosition());\n notifyItemRangeChanged(getAdapterPosition(), mIngredients.size());\n }\n });\n }", "Book createBook();", "@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 getNutritionixIngredientInfo(Recipe curRecipe) {\r\n\r\n ArrayList<NutritionixInfo> nutritionixIngredientList = new ArrayList<NutritionixInfo>();\r\n List<RecipeIngredient> ingredients = this.recipe.getIngredients();\r\n\r\n try {\r\n\r\n // Use the Nutritionix API to lookup nutrition facts info for each one of our ingredients\r\n for (RecipeIngredient ingredient : ingredients) {\r\n String ingredientName = ingredient.getIngredient().getIngredientName();\r\n nutritionixIngredientList.add(nutritionixBean.searchForIngredient(ingredientName, 0, 1));\r\n }\r\n\r\n // Calculate and set the nutrition attributes for this class\r\n for (RecipeIngredient ingredient : ingredients) {\r\n int servings = Math.round(ingredient.getIngredientAmount());\r\n for (NutritionixInfo ni : nutritionixIngredientList) {\r\n this.setCalories(servings * (this.getCalories() + ni.getNfCalories()));\r\n this.setCaloriesFromFat(servings * (this.getCaloriesFromFat() + ni.getNfCaloriesFromFat()));\r\n this.setCholesterol(servings * (this.getCholesterol() + ni.getNfCholesterol()));\r\n this.setDietaryFiber(servings * (this.getDietaryFiber() + ni.getNfDietaryFiber()));\r\n this.setProtein(servings * (this.getProtein() + ni.getNfProtein()));\r\n this.setSaturatedFat(servings * (this.getSaturatedFat() + ni.getNfSaturatedFat()));\r\n this.setSodium(servings * (this.getSodium() + ni.getNfSodium()));\r\n this.setSugars(servings * (this.getSugars() + ni.getNfSugars()));\r\n this.setTotalCarbohydrates(servings * (this.getTotalCarbohydrates() + ni.getNfTotalCarbohydrate()));\r\n this.setTotalFat(servings * (this.getTotalFat() + ni.getNfTotalFat()));\r\n this.setTransFat(servings * (this.getTransFat() + ni.getNfTransFat()));\r\n\r\n this.setCalciumPercentage(servings * (this.getCalciumPercentage() + ni.getNfCalciumDv()));\r\n this.setIronPercentage(servings * (this.getIronPercentage() + ni.getNfIronDv()));\r\n this.setVitaminAPercentage(servings * (this.getVitaminAPercentage() + ni.getNfVitaminADv()));\r\n this.setVitaminCPercentage(servings * (this.getVitaminCPercentage() + ni.getNfVitaminCDv()));\r\n }\r\n }\r\n\r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void rebajoIngredientes() {\n }", "public List<Recipe> findAllRecipe(){\n\t\treturn sessionFactory.openSession().createQuery(\"from Recipe\").list();\n\t\t\n\t}", "public static ItemStack JudgeBook() {\n\t\tItemStack JudgeBook = new ItemStack(Material.BOOK_AND_QUILL);\n\t\tItemMeta JudgeBookMeta = JudgeBook.getItemMeta();\n\t\t\n\t\t//Set Lore/Name/Anything Else here\n\t\tJudgeBookMeta.setDisplayName(\"Judge Book\");\n\t\t\n\t\t//Append the Meta to the Item\n\t\tJudgeBook.setItemMeta(JudgeBookMeta);\n\t\t\n\t\t//Return the Item\n\t\treturn JudgeBook;\n\t\t\n\t}" ]
[ "0.69828427", "0.63450277", "0.6275055", "0.6260309", "0.61434174", "0.6118297", "0.61140007", "0.61113", "0.61011034", "0.6093063", "0.6087107", "0.6069447", "0.60674226", "0.6066754", "0.60640955", "0.6045205", "0.60381407", "0.6007081", "0.59842825", "0.59736687", "0.5957016", "0.5870274", "0.5853662", "0.58218336", "0.5813745", "0.57851714", "0.5783852", "0.57810384", "0.5777703", "0.57766443", "0.5775915", "0.5762577", "0.5758757", "0.5704066", "0.5684913", "0.56803906", "0.567203", "0.56558037", "0.5605068", "0.5602762", "0.5599184", "0.55908847", "0.55865324", "0.5575788", "0.5570346", "0.5557118", "0.5552264", "0.55342156", "0.5528958", "0.55175817", "0.55175203", "0.5491131", "0.54895395", "0.5488613", "0.5482838", "0.54656875", "0.545959", "0.54403317", "0.543635", "0.54147357", "0.540632", "0.5391521", "0.5382123", "0.53770936", "0.5371888", "0.5357832", "0.535105", "0.5342365", "0.5341592", "0.5340899", "0.53269356", "0.53244007", "0.5321506", "0.5307858", "0.5302831", "0.5302707", "0.5302381", "0.5301276", "0.5298221", "0.5296766", "0.52922696", "0.52793884", "0.52708894", "0.52564645", "0.5251951", "0.52453095", "0.52347094", "0.5232681", "0.5227635", "0.5210148", "0.5203662", "0.51870054", "0.5186419", "0.51841694", "0.5177816", "0.51761156", "0.51622057", "0.51608044", "0.51444733", "0.5136808" ]
0.61189497
5
So far, we have discussed how to consume an Optional object someone else created. If you want to write a method that creates an Optional object there are several static methods for that purpose.
public static void main(String[] args) { Optional<Double> inversedNum = inverse(10D); System.out.println(inversedNum.orElseThrow()); Double nullable = null; // Optional<Double> op = Optional.of(nullable); - Null pointer exception // The ofNullable method is intended as a bridge from possibly null values to optional values. // Optional.ofNullable(obj) returns Optional.of(obj) if obj is not null and Optional.empty otherwise. Optional<Double> op1 = Optional.ofNullable(nullable); if(op1.isEmpty()) { System.out.println("success"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Optional<T> toOptional();", "public static void createOptionals() {\n String nullString = null;\n String emptyString = \"\";\n\n Optional.ofNullable(nullString);\n Optional.of(emptyString);\n try {\n Optional.of(nullString);\n } catch (NullPointerException e) {\n }\n Optional.empty();\n }", "public static void main(String[] args) {\n\t\tOptional<Object> empty = Optional.empty();\r\n\t\tSystem.out.println(empty.isPresent()); // returns false, since Object is null\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t// Using the of(value) method for a String that is Not null\r\n\t\tOptional<String> helloString = Optional.of(\"Hello!\");\r\n\t\tSystem.out.println(helloString.isPresent()); // returns true, since String = \"Hello and is Not null. \r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t// orElse(other value) - returns the value if present, otherwise returns the other value\r\n\t\tString orElse = helloString.orElse(\"Howdy!\");\r\n\t\tSystem.out.println(orElse);\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Using the ofNullable(value) method for a null String\r\n\t\tOptional<String> hello = Optional.ofNullable(null);\r\n\t\thello\r\n\t\t\t.map(String::toUpperCase)\r\n\t\t\t.orElse(\"Howdy!\"); // orElse() returns the other value: String 'Howdy!'\r\n\t\tSystem.out.println(hello); \r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t// Using chain methods on helloString with map() and orElseGet() methods\r\n\t\torElse = helloString\r\n\t\t\t\t.map(String::toUpperCase)\r\n\t\t\t\t.orElseGet(() -> {\r\n\t\t\t\t\t// ..some extra computations to get the value\r\n\t\t\t\t\treturn \"world\"; // helloString is Not null, since not getting 'world'.\r\n\t\t\t\t});\r\n\t\tSystem.out.println(orElse);\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t}", "private static void optinalOfNullableBasic() {\n String answer1 = \"Yes\";\n String answer2 = null;\n System.out.println(\"\" + Optional.ofNullable(answer1));\n \n // we cn pass null value in ofNullable method. In this case it will return empty optional\n // rather then Null Pointer Exception\n System.out.println(\"\" + Optional.ofNullable(answer2));\n }", "default Optional<V> toOptional() {\n V item = orElseNull();\n return item == null ? Optional.empty() : Optional.of( item );\n }", "public static <T> Optional <T> of(T value) {\r\n\t\treturn new Optional<>(value);\r\n\t}", "Optional<T> show();", "@Named(\"unwrap\")\n default <T> T unwrap(Optional<T> optional) {\n return optional.orElse(null);\n }", "public void optional() {\n\n // .stream\n Stream<Optional<Employee>> emp = getEmployeeStream(\"Some employee ID\");\n Stream<Employee> empStream = emp.flatMap(Optional::stream);\n\n // .or\n Optional<Employee> or = getEmployee(\"123\").or(() -> Optional.of(new Employee(\"123\")));\n\n // .ifPresentOrElse\n or.ifPresentOrElse(employee -> {\n System.out.println(\"Present\");\n }, () -> {\n System.out.println(\"Else\");\n });\n\n }", "private static void optionalIfPresent() {\n Optional<String> optionalOb = Optional.of(\"Yassir\");\n optionalOb.ifPresent(name -> {System.out.println(\"Name = \"+name);});\n }", "private Optional() {\r\n\t\tthis.value = null;\r\n\t}", "private static void optionalOrElseBasic() {\n \n System.out.println(\"name remains = \"+Optional.ofNullable(\"Yassir\").orElse(\"Arafat\"));\n System.out.println(\"name changed = \"+Optional.ofNullable(null).orElse(\"Arafat\"));\n }", "private Optional(T value) {\r\n\t\tthis.value = Objects.requireNonNull(value);\r\n\t}", "@Override\n\tpublic Optional<T> get() {\n\t\treturn null;\n\t}", "java.lang.String getOptionalValue();", "public void test6(){\n User user = null;\n\n String name = Optional.ofNullable(user).map(User :: getName).orElse(\"taotao\");\n\n System.out.println(name);\n }", "private Optional optionalToOptional(ElementOptional optional) throws SemQAException {\n\t\tElement elm = optional.getOptionalElement();\r\n\t\tGraphPattern gp;\r\n\t\tValueConstraint vc;\r\n\t\tif (elm instanceof ElementGroup) {\r\n\t\t\tList<Element> children = ((ElementGroup) elm).getElements();\r\n\t\t\tSet<GraphPattern> childSemQA = new LinkedHashSet<GraphPattern>();\r\n\t\t\tSet<Optional> optionals = new LinkedHashSet<Optional>();\r\n\t\t\tSet<ElementFilter> filters = new LinkedHashSet<ElementFilter>();\r\n\t\t\tfor (Element child : children) {\r\n\t\t\t\tif (child instanceof ElementFilter) {\r\n\t\t\t\t\tfilters.add((ElementFilter) child);\r\n\t\t\t\t}\r\n\t\t\t\telse if (child instanceof ElementOptional) {\r\n\t\t\t\t\t// if child is an optional, need to get the graph pattern for the optional\r\n\t\t\t\t\t// and add it to the list of optional graph patterns\r\n\t\t\t\t\toptionals.add(optionalToOptional((ElementOptional) child));\r\n//\t\t\t\t\tchildSemQA.add(optionalToOptional((ElementOptional) child));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tchildSemQA.add(sparqlToSemQA(child));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tGraphPattern baseGp = convertSetToJoin(childSemQA);\r\n\t\t\tif (childSemQA.size() == 0) {\r\n\t\t\t\tthrow new SemQAException(\"semQA: OPTIONAL without non-optional side not supported.\");\r\n\t\t\t}\r\n\t\t\tif (optionals.size() > 0) {\r\n\t\t\t\t// if there are optional elements, create a left join\r\n\t\t\t\t// convert the non-filter non-optional graph patterns to a Join if necessary\r\n\t\t\t\t// then, each optional element is part of a left join\r\n\t\t\t\tgp = new LeftJoin(baseGp, optionals);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// no optionals, just return the join of the graph patterns\r\n\t\t\t\tgp = baseGp;\r\n\t\t\t}\r\n\t\t\tif (filters.size() > 0) {\r\n\t\t\t\tvc = getConstraintFromFilters(filters);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvc = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgp = sparqlToSemQA(elm); // if it is not a group\r\n\t\t\tvc = null;\r\n\t\t}\r\n\t\treturn new Optional(gp, vc);\r\n\t\t\r\n\t}", "Optional<User> get(String userName);", "default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }", "private static void optionalWithGenericTypeAndLamdaExpressions() {\n Optional opUserAccountWithoutGeneric = Optional.of(new UserAccount());\n // in this case optional will return object which we need to cast\n opUserAccountWithoutGeneric.ifPresent((t) -> {System.out.println(\"\" + ((UserAccount) t).doSomething());});// using lamda's\n // In this case method reference will not work cause it can't understand which object's method it is\n // as no generic type defined\n /**opUserAccountWithoutGeneric.ifPresent(UserAccount::doSomething);**/// using method reference\n\n // TYPE 2: With Generic \n Optional<UserAccount> opUserAccount = Optional.of(new UserAccount());\n // in this case we don't need to cast\n opUserAccount.ifPresent((t) -> {System.out.println(\"\" + t.doSomething());});// using lamda's\n opUserAccount.ifPresent(UserAccount::doSomething);// using method reference\n }", "protected abstract Optional<T> getSingleSelection();", "public abstract Optional<A> val();", "static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }", "boolean optional();", "public static void main(String[] arg) {\n\n Car car = new Car();\n\n OptionalTestTwo two = new OptionalTestTwo(Optional.ofNullable(car));\n\n int number = Optional.ofNullable(two)\n .flatMap(OptionalTestTwo::getCar)\n .map(x -> x.getCarNumber())\n .orElse(12);\n System.out.println(number);\n\n\n }", "public static <T> Optional <T> ofNullable(T value) {\r\n\t\tif (value == null)\r\n\t\t\treturn empty();\r\n\t\treturn of(value);\r\n\t}", "@NonNull\n\t<T> Optional<T> get(@NonNull Class<T> type);", "public static void main(String[] args) {\n Object value = Optional.ofNullable(null)\n .orElseGet(() -> \"default value\");\n\n System.out.println(value);\n\n // this returns an exception when the right value is not entered\n Object newValue = Optional.ofNullable(45)\n .orElseThrow(() -> new IllegalStateException(\"exception\"));\n\n System.out.println(newValue);\n\n // checks if a value is present and then runs an operation\n Optional.ofNullable(\"[email protected]\")\n .ifPresentOrElse(email -> System.out.println(\"Sending email to \" + email),\n () -> System.out.println(\"Cannot send email\"));\n }", "boolean isOptional();", "Optional<String> user();", "Optional<X> elem();", "default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }", "Optional<User> create(UserDto dto);", "private ParseTree maybeParseOptionalExpression(ParseTree operand) {\n // The optional chain's source info should cover the lhs operand also\n SourcePosition start = operand.location.start;\n\n while (peek(TokenType.QUESTION_DOT)) {\n eat(TokenType.QUESTION_DOT);\n switch (peekType()) {\n case OPEN_PAREN:\n ArgumentListTree arguments = parseArguments();\n operand =\n new OptChainCallExpressionTree(\n getTreeLocation(start),\n operand,\n arguments,\n /* isStartOfOptionalChain = */ true,\n arguments.hasTrailingComma);\n break;\n case OPEN_SQUARE:\n eat(TokenType.OPEN_SQUARE);\n ParseTree member = parseExpression();\n eat(TokenType.CLOSE_SQUARE);\n operand =\n new OptionalMemberLookupExpressionTree(\n getTreeLocation(start), operand, member, /* isStartOfOptionalChain = */ true);\n break;\n case NO_SUBSTITUTION_TEMPLATE:\n case TEMPLATE_HEAD:\n reportError(\"template literal cannot be used within optional chaining\");\n break;\n default:\n if (peekIdOrKeyword()) {\n IdentifierToken id = eatIdOrKeywordAsId();\n operand =\n new OptionalMemberExpressionTree(\n getTreeLocation(start), operand, id, /* isStartOfOptionalChain = */ true);\n } else {\n reportError(\"syntax error: %s not allowed in optional chain\", peekType());\n }\n }\n operand = parseRemainingOptionalChainSegment(operand);\n }\n return operand;\n }", "boolean hasOptionalValue();", "static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }", "Optional<V> get(String name);", "Optional<Person> findOne(Long id);", "public static Acceptor optional(Acceptor a) {\n\t\treturn new Optional(a);\n\t}", "T getOrElse(T value);", "@Test\n public void testByName() {\n Optional<User> user1 = userRepository.findById(11L);\n //assertEquals(user, user1);\n }", "public static void main(String[] args) {\n Optional<Integer> integer = Optional.of(1111);\n integer.map(x -> \"\" + x)\n .filter(x -> x.length() == 3)\n .ifPresent(System.out::println);\n\n //map into another type of optional\n Optional\n .of(\"qwerty\")\n .map(String::length)\n .ifPresent(System.out::println);\n\n Optional<String> optional = Optional.of(\"qwerty\");\n\n //map vs flatmap\n //Chaining calls to flatMap() is useful when you want to transform one\n //Optional type to another.\n Optional<Optional<Integer>> integer1 = optional.map(OptionalChaining::calculator);\n Optional<Integer> integer2 = optional.map(OptionalChaining::calculatorInt);\n\n Optional<Integer> integer3 = optional.flatMap(OptionalChaining::calculator);\n }", "public interface SolutionQuery {\n\n Optional<String> getUser();\n\n Optional<String> getTask();\n\n Optional<SolutionStatus> getStatus();\n\n boolean isTest();\n}", "public Optional<Product> getProduct(String productId);", "Optional<String> getExtractor();", "default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }", "OptionalInt peek();", "OptionalInt getAge();", "Optional<V> get(K key);", "private OptionalValue(final Value value) {\n this.value = value;\n }", "public Optional<T> getValue() {\n return Optional.ofNullable(value);\n }", "default V getOrThrow() {\n return getOrThrow(\"null\");\n }", "private static void optionalMapBasic() {\n Optional<String> nonEmptyGender = Optional.of(\"male\");\n Optional<String> emptyGender = Optional.empty();\n \n // optional.map here mapping the value of obj \"male\" temporarily and executing the method toUppercase \n // \"MALE\" \n System.out.println(\"Non-Empty Optional:: \"+nonEmptyGender.map((t) -> {\n return t.toUpperCase();\n }));\n // object's main value won't affected for operation during in lamda's\n System.out.println(\"\"+nonEmptyGender);\n \n // for empty object value nothing will map or creates exception. will return empty result\n System.out.println(\"Empty Optional :: \" + emptyGender.map(String::toUpperCase));\n }", "public Optional<User> findById(Integer id);", "public Optional<T> create(T obj) {\n\t\tif (null == obj) {\n\t\t\treturn Optional.empty();\n\t\t}\n\n\t\t// if Object has an id\n\t\tif (null != obj.getId()) {\n\n\t\t\t// return value if key already exists, otherwise empty\n\t\t\tif (map.containsKey(obj.getId())) {\n\t\t\t\treturn Optional.of(map.get(obj.getId()));\n\t\t\t} else {\n\t\t\t\treturn Optional.empty();\n\t\t\t}\n\n\t\t}\n\n\t\t// generate id\n\t\tint aId = id.getAndIncrement();\n\n\t\tobj.setId(aId);\n\t\tmap.put(aId, obj);\n\n\t\treturn Optional.of(obj);\n\n\t}", "protected boolean isOptional()\n {\n return false;\n }", "Optional<User> findUserById(Long id);", "Optional<String> getOId();", "Optional<User> findUserByUsername(String username);", "protected abstract Object convertNonNull(Object o);", "Optional<String> getOwner();", "public static void main(String[] args) {\n\t\t\n\t\tOptional<List<String>> opt = Optional.of(List.of(\"one\",\"two\",\"three\"));\n\t\t\n\t\topt.stream().forEach(l -> l.stream().filter(s -> !s.contains(\"w\")).forEach(System.out::println));\n\t\t\n\t\tSystem.out.println(\"=====================================\");\n\t\t\n\t\t/*\n\t\t * IfPresentOrElse() : If a value is present, performs the given action with the value, otherwise performs the given empty-based action. \n\t\t */\n\t\t Optional.of(4).ifPresentOrElse( x -> System.out.println(\"Result found: \" + x), () -> System.out.println(\"Not Found.\")); // Result found: 4\n\t\t \n\t\t Optional.empty().ifPresentOrElse( x -> System.out.println(\"Result found: \" + x), () -> System.out.println(\"Not Found.\")); // Not found.\n\t\t \n\t\t System.out.println(\"=====================================\");\n\t\t \n\t\t /*\n\t\t * or() : if a value is present in the optional, returns an Optional describing the value, otherwise returns an Optional produced by the \n\t\t * supplier passed as parameter.\n\t\t */\n\t\t System.out.println(Optional.of(\"Rams\").or(() -> Optional.of(\"No Name\"))); // Optional[Rams]\n\n\t\t System.out.println(Optional.empty().or(() -> Optional.of(\"No Name\"))); // Optional[No Name]\n\t}", "@NonNull\n\t<T> Optional<T> get(@NonNull Serializer<T> serializer);", "Argument<T> optional(boolean optional);", "Optional<User> findById(long id);", "Optional<Player> getHoldingPlayer();", "public Optional<Persona> findById(Long id);", "Optional<T> findOne(K id);", "public abstract Optional<Object> getByID(@PathVariable(\"id\") int id);", "Optional<City> findCityById(int id);", "private static void optionalFlatMapBasic() {\n \n Optional<Optional<String>> nonEmptyOptionalGender = Optional.of(Optional.of(\"male\"));\n System.out.println(\"Optional value :: \" + nonEmptyOptionalGender);\n System.out.println(\"Optional.map :: \" + nonEmptyOptionalGender.map(gender -> gender.map(String::toUpperCase)));\n System.out.println(\"Optional.flatMap :: \" + nonEmptyOptionalGender.flatMap(gender -> gender.map(String::toUpperCase)));\n \n Optional<Optional<Optional<String>>> nonEmptyOptionalGenderAgain = Optional.of(Optional.of(Optional.of(\"male\")));\n \n // this 2 process below won't work\n /* \n System.out.println(\"Optional.map :: \" + nonEmptyOptionalGenderAgain.map(gender -> gender.map(String::toUpperCase)));\n System.out.println(\"Optional.flatMap :: \" + nonEmptyOptionalGenderAgain.flatMap(gender -> gender.map(String::toUpperCase)));\n */\n \n // this 2 will work\n System.out.println(\"Optional.map :: \" + nonEmptyOptionalGenderAgain.map(\n gender -> gender.map(\n gen -> gen.map(String::toUpperCase))));\n\n System.out.println(\"Optional.flatMap :: \" + nonEmptyOptionalGenderAgain.flatMap(\n gender -> gender.map(\n gen -> gen.map(String::toUpperCase))));\n \n }", "Optional<String> validate(T value);", "public static <T> T asOptionalType(final Object o, final Class<T> type) {\n if (o == null) {\n return null;\n }\n if (!type.isAssignableFrom(o.getClass())) {\n return null;\n }\n @SuppressWarnings(\"unchecked\") T co = (T) o;\n return co;\n }", "@Test\n void shouldReturnEmptyOptionalIfUserNotFound() {\n //given\n String id = \"xyz-abc\";\n //Lambda matcher\n given(userRepo.findById(argLambda(e -> Objects.equals(id, \"xyz-abc\")))).willReturn(Optional.empty());\n //when\n Optional<User> optionalUser = userService.getUser(id);\n //then\n assertThat(optionalUser).isNotNull();\n assertThat(optionalUser.isPresent()).isFalse();\n //Argument Captor\n verify(userRepo).findById(assertArg(e -> assertThat(e).isEqualTo(id)));\n verify(userRepo, times(1)).findById(assertArg(e -> assertThat(e).isEqualTo(id)));\n }", "@NonNull\n\t<T> Optional<T> get(@NonNull String path, @NonNull Class<T> type);", "@Test\n void getByIdFail () {\n Api2 instance = new Api2();\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, 1000000L);\n assertFalse(optionalEntity.isPresent());\n }", "@Override\n public Object getReferenced(Optional<?> reference) {\n return reference.orElse(null);\n }", "Optional<ParaUserDTO> findOne(Long id);", "public interface ProductRepo {\n Product createProduct(Product product);\n Optional<Product> getProduct(String pid);\n}", "Optional<String> getOName();", "Optional<Company> findByName(String name);", "Optional<Order> findById(Long orderId);", "com.google.protobuf.ByteString\n getOptionalValueBytes();", "protected Object getOptionalValue(Node node, int idx,\n InternalContextAdapter context)\n throws MethodInvocationException\n {\n Node target = getOptionalNode(node, idx);\n if (target == null) {\n return null;\n }\n return target.value(context);\n }", "Optional<User> findById(Long userId);", "public interface DeveloperRepository extends JpaRepository<DeveloperInfo, Long> {\n\n Optional<DeveloperInfo> findOneById(Long id);\n\n Optional<DeveloperInfo> findOneByName(String name);\n\n}", "public Optional<TestUser> getUser(String id){\n\t\tSystem.out.println(\"getting the user details..\");\n\t\tOptional<TestUser> user=Optional.of(new TestUser());\n\t\tif(userRepositary.existsById(id)){\n\t\t\treturn userRepositary.findById(id);\n\t\t}else{\n\t\t\tSystem.out.println(\"data doesn't exists for this id: \"+id);\n\t\t\treturn user;\n\t\t}\n\t}", "public static <T> Optional<T> or(Optional<T> first, Optional<T> second) {\n return first.isPresent() ? first : second;\n }", "public User orElseThrow(Object object) {\n\t\treturn null;\n\t}", "public interface STipoOptional extends AgroludosService{\n\t/**\n\t * \n\t * @param topto\n\t * @return il tipo di optional inserito\n\t * @throws DatabaseException\n\t * @throws ValidationException\n\t */\n\tTipoOptionalTO inserisciTipoOptional(TipoOptionalTO topto) throws DatabaseException, ValidationException;\n}", "public Optional<String> getFullName(){\n return Optional.ofNullable(fullName);\n }", "public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}", "public interface UserRepository extends JpaRepository<User, Long> {\n\n Optional<User> findOneByEmail(String email);\n}", "@SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\")\npublic interface Value<V> extends Supplier<V> {\n /** Creates an empty instance of Value */\n static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(V value) {\n return new ImmutableValue<>(value);\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(Optional<V> value) {\n return new ImmutableValue<>(value.orElse(null));\n }\n\n /** Creates an instance of Value for the given value */\n static <V> Value<V> of(Value<V> value) {\n return new ImmutableValue<>(value.get());\n }\n\n /** Creates an instance of Value for the given String, treat empty strings as null */\n static Value<String> of(String value) {\n return new ImmutableValue<>((value == null || value.isEmpty()) ? null : value);\n }\n\n /** Tries to parse the integer from the String and returns the value if its found */\n static Value<Integer> parseInteger(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Integer.parseInt(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the long from the String and returns the value if its found */\n static Value<Long> parseLong(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Long.parseLong(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the double from the String and returns the value if its found */\n static Value<Double> parseDouble(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Double.parseDouble(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the float from the String and returns the value if its found */\n static Value<Float> parseFloat(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Float.parseFloat(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the short from the String and returns the value if its found */\n static Value<Short> parseShort(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Short.parseShort(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the byte from the String and returns the value if its found */\n static Value<Byte> parseByte(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Byte.parseByte(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Tries to parse the boolean from the String and returns the value if its found */\n static Value<Boolean> parseBoolean(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Boolean.parseBoolean(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }\n\n /** Does the value instance contain a non null value */\n default boolean isPresent() {\n return get() != null;\n }\n\n /** Does the value instance contain a null value */\n default boolean isEmpty() {\n return get() == null;\n }\n\n /** Get the value of this instance if its present for return the argument could be null */\n default V getOrElse(V value) {\n return isEmpty() ? value : get();\n }\n\n /** Gets the value of this instance or throw NullPointerException with the provided message */\n default V getOrThrow(String message) {\n return Conditions.nonNull(get(), message);\n }\n\n /** Gets the value of this instance or throw NullPointerException */\n default V getOrThrow() {\n return getOrThrow(\"null\");\n }\n\n /** Run a consumer instance on the value if it exists */\n default Value<V> ifPresent(Consumer<V> consumer) {\n if (isPresent()) {\n consumer.accept(get());\n }\n return this;\n }\n\n /** Run a runnable instance on the value if it exists */\n default Value<V> ifPresent(Runnable runnable) {\n if (isPresent()) {\n runnable.run();\n }\n return this;\n }\n\n /** Run a runnable instance on the value if it is empty */\n default Value<V> ifEmpty(Runnable runnable) {\n if (isEmpty()) {\n runnable.run();\n }\n return this;\n }\n}", "Optional<ServiceUserDTO> findOne(Long id);", "public abstract Optional<Item[]> equipmentRequired(Player player);", "Optional<T> find(long id);", "private static Object nullOrDefaultFor(final Class<?> type) {\r\n return defaultByPrimitiveType.get(type);\r\n }", "T getOrElse(Supplier<T> fn);", "public static <T> Optional<T> or(Optional<T> first, Supplier<Optional<T>> second) {\n return first.isPresent() ? first : second.get();\n }", "Optional<E> getById(IApplicationUser user, ID id);" ]
[ "0.7013598", "0.6787915", "0.6524052", "0.6506476", "0.6428628", "0.64109975", "0.6401143", "0.6355484", "0.6340451", "0.622038", "0.61911875", "0.60888433", "0.6048815", "0.6023133", "0.5987306", "0.5982383", "0.59693325", "0.59168726", "0.5893799", "0.58921075", "0.5871924", "0.5870022", "0.5867995", "0.58664906", "0.58414346", "0.5776883", "0.57573867", "0.57379925", "0.5735699", "0.56617314", "0.5626329", "0.56206304", "0.5594102", "0.5571515", "0.54883456", "0.54730403", "0.54547006", "0.5452837", "0.5439871", "0.5418584", "0.54143226", "0.53604376", "0.53527176", "0.53488255", "0.5346208", "0.53461015", "0.5344473", "0.532701", "0.5310447", "0.53090775", "0.5302508", "0.52890337", "0.52863234", "0.5276688", "0.52764076", "0.52724737", "0.52326316", "0.52313924", "0.5221695", "0.521647", "0.5198527", "0.5190396", "0.5188911", "0.5173088", "0.5166576", "0.51474583", "0.513539", "0.51340806", "0.5125497", "0.5121496", "0.51134014", "0.5112278", "0.5105274", "0.50855595", "0.50821877", "0.5071728", "0.50616056", "0.5045836", "0.5042107", "0.50417715", "0.5025592", "0.5020602", "0.5015903", "0.5011763", "0.5008408", "0.49957046", "0.49784186", "0.4974976", "0.49738154", "0.49688685", "0.49609038", "0.49593654", "0.4956978", "0.49561653", "0.4954113", "0.49480036", "0.49453154", "0.4940497", "0.49392167", "0.49357647", "0.4935582" ]
0.0
-1
Hit the low hanging fruit first
@Override default boolean equivalentTo(Tree otherTree) { if (this == otherTree) return true; if (otherTree == null || this.getKind() != otherTree.getKind() || this.hashCode() != otherTree.hashCode()) return false; CatchTree other = (CatchTree) otherTree; if (!Tree.equivalentTo(this.getBlock(), other.getBlock())) return false; if (!Tree.equivalentTo(this.getParameter(), other.getParameter())) return false; if (!Tree.equivalentTo(this.getType(), other.getType())) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void eatApple() {\n\t\teaten = peeled && !eaten ? true : false;\n\t}", "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 eatFruit(Fruit fruit) {\n raiseFoodLevel(30);\n }", "default void hit() {\n\t\tcount(1);\n\t}", "public void hungry()\r\n {\r\n \tSystem.out.println(\"I'm hungry!! Feed me!!\");\r\n \tbarking();\r\n }", "private boolean hasEatenApple() {\r\n return snake.getHead().equals(apple);\r\n }", "private int heavyAttack() {\n return attack(6, 2);\n }", "protected void pickupFood() {\r\n\t\tif(this.food > 0){\r\n\t\t\tthis.food--;\r\n\t\t}\r\n\t}", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "private void checkApple() {\r\n if ((x[0] == apple_x) && (y[0] == apple_y)) {\r\n dots++;\r\n score += 10;\r\n randomApple();\r\n }\r\n }", "public static void eatApple(int i) {\r\n\t\tstate = MOVE;\r\n\t\tscore++;\r\n\r\n\t\tsnake.addLast(lastTail);\r\n\r\n\t\tfood.remove(i);\r\n\t\twhile (true) {\r\n\t\t\tint x = r.nextInt(ROWS);\r\n\t\t\tint y = r.nextInt(COLUMNS);\r\n\r\n\t\t\tif (field[x][y] == EMPTY) {\r\n\t\t\t\tfood.add(new int[] { APPLE, x, y });\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int lowHit(int start)\r\n {\r\n damage = ((int)(Math.random() * 100) % 20 + 35);\r\n int hp = start - damage; \r\n \r\n //modified to turn hp to 0 once it drops below or equals 0.\r\n if(hp <= 0)\r\n hp = 0;\r\n return hp;\r\n }", "@Override\n public void run() {\n int slotsUsed = 0;\n int potentialBananas = 0;\n RSItem[] items = Inventory.getAll();\n for (RSItem item : items) {\n // If this isn't a bone count it\n if (item.getID() < 6904 || item.getID() > 6907) {\n slotsUsed++;\n }\n else {\n // Item id bone amount\n // 6904 1\n // 6905 2\n // 6906 3\n // 6907 4\n potentialBananas += 1 + item.getID() - 6904;\n }\n }\n \n int slotsAvailable = 28 - slotsUsed;\n\n RSItem[] food = Inventory.find(1963);\n\n // If have bananas/peaches, deposit them, else collect bones\n if (food.length > 0) {\n // Heal and then deposit\n float eatHealth = m_settings.m_eatHealth * Skills.getActualLevel(SKILLS.HITPOINTS);\n float eatTo = m_settings.m_eatTo * Skills.getActualLevel(SKILLS.HITPOINTS);\n \n if (food.length > 0 && Skills.getCurrentLevel(SKILLS.HITPOINTS) < eatHealth) {\n // Eat\n while (food.length > 0 && Skills.getCurrentLevel(SKILLS.HITPOINTS) < eatTo) {\n food[0].click(\"Eat\");\n m_script.sleep(300, 600);\n food = Inventory.find(1963);\n }\n }\n else {\n // Deposit\n RSObject[] objs = Objects.findNearest(50, \"Food chute\");\n if (objs.length > 0) {\n while (!objs[0].isOnScreen()) {\n Walking.blindWalkTo(objs[0]);\n m_script.sleep(250);\n }\n objs[0].click(\"Deposit\");\n m_script.sleep(1200);\n }\n }\n }\n else {\n // If we have more than a full load of bananas worth of bones, cast bones to peaches\n if (potentialBananas >= slotsAvailable) {\n // Cast bones to peaches\n Magic.selectSpell(\"Bones to Bananas\");\n }\n else {\n // Collect bananas\n RSObject[] bonePiles = Objects.findNearest(10725, 10726, 10727, 10728);\n if (bonePiles.length > 0) {\n while (!bonePiles[0].isOnScreen()) {\n Walking.blindWalkTo(bonePiles[0]);\n m_script.sleep(250);\n }\n bonePiles[0].click(\"Grab\");\n m_script.sleep(150);\n }\n }\n }\n }", "@Override\n public boolean strikeFirst(Battle b, ActivePokemon striker) {\n return RandomUtils.chanceTest(20);\n }", "public void makeHappy() {\n while (statusEnum() != TamagotchiMood.HAPPY) {\n if (!isHungry() && !isTired()) {\n play();\n } else if (isHungry() && !isTired()) {\n eat();\n } else {\n sleep();\n }\n }\n\n if (!muted) {\n System.out.println(\"I can do thing on my own now and will rule the world! MUHAHAHA!\");\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 int doMostFavourAction() {\n if (this.eatable > this.playable && this.eatable > this.ignorable) {\n this.raiseEatable(1.1, 0.9);\n return 0;\n } else if (this.playable > this.eatable && this.playable > this.ignorable) {\n this.raisePlayable(1.1, 0.9);\n return 1;\n } else if (this.ignorable > this.eatable && this.ignorable > this.playable) {\n this.raiseIgnorable(1.1, 0.9);\n return 2;\n } else {\n int random = (int) (Math.random()*3);\n if (random == 0) {\n this.raiseEatable(1.1, 0.9);\n } else if (random == 1) {\n this.raisePlayable(1.1, 0.9);\n } else {\n this.raiseIgnorable(1.1, 0.9);\n }\n return random;\n }\n }", "private void sleep() {\n\t\ttargetFlower = null;\n\t\tif(startForaging()) {\n\t\t\t// add food to bee's crop for upcoming foraging run\n\t\t\tif(food < startingCrop){\n\t\t\t\thive.food -= (startingCrop - food);\n\t\t\t\tfood = startingCrop;\n\t\t\t}\n\t\t\tif(startScouting() || hive.dancingBees.size() <= 0) {\n\t\t\t\tstate = \"SCOUTING\";\n\t\t\t\tcurrentAngle = RandomHelper.nextDoubleFromTo(0, 2*Math.PI);\n\t\t\t}\n\t\t\telse{ // else follow a dance\n\t\t\t\t// if bee follows dance, store angle and distance in the bee object\n\t\t\t\tint index = RandomHelper.nextIntFromTo(0, hive.dancingBees.size() - 1);\n\t\t\t\tNdPoint flowerLoc = space.getLocation(hive.dancingBees.get(index).targetFlower);\n\t\t\t\tNdPoint myLoc = space.getLocation(this);\n\t\t\t\tdouble ang = SpatialMath.calcAngleFor2DMovement(space, myLoc, flowerLoc);\n\t\t\t\tdouble dist = space.getDistance(flowerLoc, myLoc);\n\t\t\t\t\n\t\t\t\t// start following dance at correct angle\n\t\t\t\tcurrentAngle = ang;\n\t\t\t\tfollowDist = dist;\n\t\t\t\tstate = \"FOLLOWING\";\n\t\t\t}\n\t\t}\n\t\telse { // continue sleeping\n\t\t\thive.food -= lowMetabolicRate/2;\n\t\t\thover(grid.getLocation(hive));\n\t\t\t// update energy and food storage\n\t\t\tif(food > startingCrop){\n\t\t\t\tfood -= foodTransferRate;\n\t\t\t\thive.food += foodTransferRate;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void hit(int atk) {\n hp = hp - atk;\n }", "private Fruit findClosestFruit(Robot robot) {\n double min_dist = Double.MAX_VALUE;\n Fruit ans = null;\n for (int i = 0; i < my_game.getFruits().size(); i++) {\n Fruit fruit = my_game.getFruits().get(i);\n if(fruits_status.values().contains(fruit)) {\n continue;\n }\n double dist = algo_g.shortestPathDist(robot.getSrc(), fruit.getEdge().getSrc());\n if (dist < min_dist) {\n min_dist = dist;\n ans = fruit;\n }\n\n }\n\n return ans;\n }", "public void eat() {\n if (!isTired()) {\n hunger -= 3;\n fatigue += 2;\n\n if (!muted) {\n System.out.println(\"eat\\t\\t|\\tYummy this is tasty!\");\n }\n }\n }", "public void dropItLikeItsHot(){\n\t\tint score_increment = 0;\n\t\tPoint test_location = new Point(pieceOrigin);\n\t\twhile(true){\n\t\t\ttest_location.y += 1;\n\t\t\tif(!collides(test_location, currentPiece)){\n\t\t\t\tpieceOrigin.y += 1;\n\t\t\t\tscore_increment += 1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscore += score_increment*100;\n\t\tgossipGirl();\n\t\trepaint();\n\t}", "private void returnToHive() {\n\t\tGridPoint hiveLoc = grid.getLocation(hive);\n\t\t// if bee is inside hive\n\t\tif(grid.getDistance(grid.getLocation(this), hiveLoc) < 10) {\n\t\t\t// decide whether or not to dance (biased by nectar of last resource)\n\t\t\tif((RandomHelper.nextIntFromTo((int)(maxFlowerNectar/3), \n\t\t\t (int)(maxFlowerNectar/danceProbability)) < lastFlowerNectar)\n\t\t\t && waggle && targetFlower != null){\n\t\t\t\tdanceDuration = lastFlowerNectar/5;\n\t\t\t\thive.dancingBees.add(this);\n\t\t\t\tstate = \"DANCING\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstate = \"SLEEPING\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// otherwise continue toward hive\n\t\t\tmoveTowards(hiveLoc, 5);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void throwBait() {\n\t\tpokemon.eatBait();;\n\t}", "public void causeFoodExhaustion(float debug1) {\n/* 1797 */ if (this.abilities.invulnerable) {\n/* */ return;\n/* */ }\n/* */ \n/* 1801 */ if (!this.level.isClientSide) {\n/* 1802 */ this.foodData.addExhaustion(debug1);\n/* */ }\n/* */ }", "protected void incrementHunger()\n {\n food_level--;\n if(food_level <= 0) {\n setDead();\n }\n }", "public void raiseFoodFlag(){\n\t\tif(foodFlag != true && amountWorms > 0){\n\t\t\tfoodFlag = true;\n\t\t\tsw.getInstance(this);\n\t\t\tamountWorms--;\n\t\t\tAquaFrame.initWormStatus(amountWorms);\n\t\t}\n\t\telse{\n\t\t\tint num = 0;\n\t\t\tif(amountWorms == 0){\n\t\t\t\tupdate();\n\t\t\t}\n\t\t}\n\t}", "public void lowerHealth() {\n Greenfoot.playSound(\"hit.wav\");\n lives--;\n move(-100);\n if (lives == 0) {\n die();\n }\n }", "void placeFruit()\n\t{\n\t\t// .first is x-coordinate, it gets a number between 1 and 16\n\t\tfruit[0] = randomPoint();\n\t\t// .second is y-coordinate, it gets a number between 1 and 16\n\t\tfruit[1] = randomPoint();\n\t\tfruit[2] = randomPoint();\n\n\t\t// loops the snakes length\n\t\tfor (int i = 0; i < theSnake.getLength(); i++)\n\t\t{\n\t\t\t// checks for fruit being on/under snake\n\t\t\tif (theSnake.getXofPartI(i) == fruit[0] && theSnake.getYofPartI(i) == fruit[1] && theSnake.getZofPartI(i) == fruit[2])\n\t\t\t{\n\t\t\t\t// Picks new spot for fruit, because it was found on the snake\n\t\t\t\tfruit[0] = randomPoint();\n\t\t\t\tfruit[1] = randomPoint();\n\t\t\t\tfruit[2] = randomPoint();\n\t\t\t\t// just in case the fruit landed on the snake again\n\t\t\t\ti = 0;\n\t\t\t}\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 bake() {\n\t\twhile(true) {\n\t\t\tSystem.out.print(\"attempting to bake 1 souffle...\");\n\t\t\tif(Math.random() < 0.5) {\n\t\t\t\tSystem.out.println(\"success!\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"but it didn't rise\");\n\t\t\t\tprepare();\n\t\t\t}\n\t\t}\n\t}", "private int[] placeFruit() {\n\t\t\n\t\tint []point = new int[2];\n\t\t\n\t\tint helpX, helpY, foodX = 0, foodY = 0;\n\t\tboolean helpS,helpO;\t// for Snake and Obstacles\n\t\tboolean collision = true;\n\t\tArrayList<Obstacle> obstacles = Controller.getInstance().getObstacles();\n\n\t\twhile(collision) {\n\t\t\t\t\n\t\t\thelpS =helpO= false;\n\t\t\tfoodX = (rand.nextInt(BWIDTH)*GameObject.SIZE)+GameObject.SIZE/2;\n\t\t\tfoodY = (rand.nextInt(BHEIGHT)*GameObject.SIZE)+GameObject.SIZE/2;\n\t\t\t\t\n\t\t\tfor(int i = 0; i < snake.getSize(); ++i) {\n\t\t\t\t\t\n\t\t\t\thelpX = snake.getBodyPart(i).getX();\n\t\t\t\thelpY = snake.getBodyPart(i).getY();\n\t\n\t\t\t\tif(helpX == foodX && helpY == foodY) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tif(i == snake.getSize() - 1) {\n\t\t\t\t\thelpS = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(helpS) {\n\n\n\n\t\t\t\t\tfor(int i = 0; i < obstacles.size(); ++i) {\n\n\t\t\t\t\t\thelpX = obstacles.get(i).getX();\n\t\t\t\t\t\thelpY = obstacles.get(i).getY();\n\n\t\t\t\t\t\tif(foodX == helpX && foodY == helpY) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(i == obstacles.size() - 1) {\n\t\t\t\t\t\t\thelpO = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\tif(helpO) {\n\t\t\t\t\tcollision = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpoint[0] = foodX;\n\t\tpoint[1] = foodY;\n\t\treturn point;\t\n\t}", "@Override\n public void poll() {\n if( state == State.attacking ) {\n if( !ctx.movement.running() && ctx.movement.energyLevel() >= 75) {\n stateText = \"Setting running\";\n ctx.movement.running(true);\n }\n stateText = \"\";\n if( isAttacking() ) {\n stateText = \"Attacking\";\n Item ammo = inventory.getFirst(ammoUsed);\n if( ammo != null && ammo.valid() ){\n inventory.clickItem(ammo);\n sleep(100);\n }\n } else {//TODO find out why it stops picking up arrows after some time\n if (!inventory.full() && (targetBone == null || !targetBone.valid() || !misc.pointOnScreen(targetBone.centerPoint())) ) {\n targetBone = getNextGroundBone();\n clickedGroundItem = false;\n }\n if (!inventory.full() && targetBone != null && targetBone.valid() && misc.pointOnScreen(targetBone.centerPoint())) {\n stateText = \"Picking up bones\";\n if( !ctx.players.local().inMotion() )\n clickedGroundItem = false;\n if (!clickedGroundItem ) {\n clickedGroundItem = groundItems.pickup(targetBone);\n }\n } else if( inventory.full() && inventory.contains(bones) ) {\n state = State.burying;\n } else {\n if( !clickedMonster || !target.valid() || target.health() <= 0 || target.interacting() != ctx.players.local() ) {\n target = getNextTarget();\n clickedMonster = false;\n }\n if (!misc.pointOnScreen(target.centerPoint())) {\n if (target.tile().matrix(ctx).onMap()) {\n stateText = \"Walking to monster\";\n movement.walkTile(target.tile());\n }\n } else {\n stateText = \"Attacking monster\";\n if( !clickedMonster ) {\n clickedMonster = npcs.attackMonster(target);\n }\n }\n }\n }\n }else if( state == State.burying){\n Item invBones = inventory.getFirst(bones);\n if( invBones!= null && invBones.valid()) {\n stateText = \"Clicking bones\";\n inventory.clickItem(invBones);\n }else {\n state = State.attacking;\n }\n }\n checkIfBeingAttacked();\n }", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "private void runBest() {\n }", "public void checkBombs(final Integer tile){\n if(bombs_location.contains(tile)){\n if(invulnerable){\n showTimedAlertDialog(\"PHEW!\", \"Your GODMODE saved your life\", 5);\n invulnerable = false;\n return;\n }\n invulnerable = false;\n Lejos.makeSound_Boom();\n hp = hp-1;\n DrawHP();\n bombs_location.remove(tile);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n MultiplayerManager.getInstance().SendMessage(\"bomb_remove \" + revertTile(tile).toString());\n }\n }, 1000);\n if(hp==0){\n onLose();\n }\n showTimedAlertDialog(\"PWNED!\", \"You just stepped on a mine\", 3);\n }\n }", "public void eatApple(){\n int rowsOld = snakePartList.get(SnakePartMaxID).getSnakePartRowsOld();\n int collsOld = snakePartList.get(SnakePartMaxID).getSnakePartCollsOld();\n\n snakePartList.add(new SnakePart(rowsOld, collsOld, SnakePartMaxID));\n board[rowsOld][collsOld] = 'S';\n SnakePartMaxID++;\n appleCount++;\n generateNewBoardAfterWin();\n spawnApples();\n }", "public void lowerFoodFlag(){\n\t\tif(amountWorms == 0)\n\t\t\tJOptionPane.showMessageDialog(null , \"Run out all the worms!\",\"Warning Food\",JOptionPane.PLAIN_MESSAGE);\n\t\tfoodFlag = false;\n\t}", "private int lightAttack() {\n return attack(9, 0);\n }", "@Test\r\n\tpublic void BushTest_2(){\r\n\t\tPlayer player = new Player(0,\"Chris\", new Point(1, 1), new Point(0, 1));\r\n\t\tPoint worldLocation = new Point(1, 1);\r\n\t\tPoint tileLocation = new Point(1, 1);\r\n\t\tBush bush = new Bush(worldLocation, tileLocation);\r\n\t\ttry{\r\n\t\t\ttry {\r\n\t\t\t\tbush.performAction(player);\r\n\t\t\t} catch (SignalException e) {\r\n\t\t\t}\r\n\t\t\tif(player.getPocket().getItems().size() == 1){\r\n\t\t\t\tItem item = player.getPocket().getItems().get(0);\r\n\t\t\t\tassert(item instanceof Food);\r\n\t\t\t\tassert(((Food) item).getFoodType() == FoodType.BERRY);\r\n\t\t\t}\r\n\t\t\tTimeUnit.SECONDS.sleep(11);\r\n\t\t\ttry {\r\n\t\t\t\tbush.performAction(player);\r\n\t\t\t} catch (SignalException e) {\r\n\t\t\t}\r\n\t\t\tif(player.getPocket().getItems().size() == 1 ||player.getPocket().getItems().size() == 2){\r\n\t\t\t\tint last = player.getPocket().getItems().size() - 1;\r\n\t\t\t\tItem item = player.getPocket().getItems().get(last);\r\n\t\t\t\tassert(item instanceof Food);\r\n\t\t\t\tassert(((Food) item).getFoodType() == FoodType.BERRY);\r\n\t\t\t}\r\n\t\t}catch(GameException | InterruptedException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n public void hitEvent(Block beingHit, Ball hitter) {\n this.currentScore.increase(5);\r\n if (beingHit.getHitPoints() == 1) {\r\n this.currentScore.increase(10);\r\n }\r\n }", "public void hitEvent(Block beingHit, Ball hitter) {\r\n if (beingHit.getHitPoints() == 0) {\r\n this.currentScore.increase(10);\r\n return;\r\n }\r\n\r\n this.currentScore.increase(5);\r\n }", "public boolean hit() {\r\n add(deck.deal());\r\n return getHandValue() <= 21;\r\n }", "@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }", "public void takesHit()\n {\n // TODO: replace this line with your code\n }", "private void snack() {\n\t\t\tsynchronized (left) {\n\t\t\t\tsynchronized (right) {\n\t\t\t\t\tSystem.out.println(this.name + \" start to snack\");\n\t\t\t\t\tUtils.pause(1_000);\n\t\t\t\t\t// System.out.println(this.name + \" finished to snack\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(this.name + \" is not hungry\");\n\t\t}", "public int HighHit(int start)\r\n {\r\n damage = ((int)(Math.random() * 100) % 50 + 80);\r\n int hp = start - damage;\r\n \r\n //modified to turn hp to 0 once it drops below or equals 0.\r\n if(hp <= 0)\r\n hp = 0;\r\n return hp;\r\n }", "@Test\n public void bestowEnchantmentDoesNotTriggerEvolve() {\n addCard(Zone.BATTLEFIELD, playerA, \"Forest\", 6);\n // Creature - Giant 3/5\n addCard(Zone.BATTLEFIELD, playerA, \"Silent Artisan\");\n\n addCard(Zone.HAND, playerA, \"Experiment One\");\n // Enchanted creature gets +4/+2.\n addCard(Zone.HAND, playerA, \"Boon Satyr\");\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Experiment One\");\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Boon Satyr using bestow\", \"Silent Artisan\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertPermanentCount(playerA, \"Boon Satyr\", 1);\n Permanent boonSatyr = getPermanent(\"Boon Satyr\", playerA);\n Assert.assertTrue(\"Boon Satyr may not be a creature\", !boonSatyr.isCreature(currentGame));\n assertPermanentCount(playerA, \"Silent Artisan\", 1);\n assertPermanentCount(playerA, \"Experiment One\", 1);\n assertPowerToughness(playerA, \"Experiment One\", 1, 1);\n assertPowerToughness(playerA, \"Silent Artisan\", 7, 7);\n\n }", "int hit();", "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 repair(){\n if(health < 9) {\n this.health++;\n }\n }", "private void huntMode() {\n if (!alreadyHit(hitLocationX+1, hitLocationY)){ // tests to see if they're already shot at\n if (hitLocationX < 9) { // doesn't add if they're on a border\n huntList.add(new Point(hitLocationX + 1, hitLocationY));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX, hitLocationY+1)){\n if (hitLocationY < 9) {\n huntList.add(new Point(hitLocationX, hitLocationY + 1));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX-1, hitLocationY)){\n if (hitLocationX > 0) {\n huntList.add(new Point(hitLocationX - 1, hitLocationY));\n huntCount++;\n huntModeActive++;\n }\n }\n if (!alreadyHit(hitLocationX, hitLocationY-1)){\n if (hitLocationY > 0) {\n huntList.add(new Point(hitLocationX, hitLocationY - 1));\n huntCount++;\n huntModeActive++;\n }\n }\n }", "public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }", "public void hitEvent(Block beingHit, Ball hitter) {\r\n this.currentScore.increase(5);\r\n if (beingHit.getHitPoints() == 0) {\r\n this.currentScore.increase(10);\r\n }\r\n }", "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}", "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }", "public boolean hitDealer() {\r\n while (getHandValue() <= 16) {\r\n hit();\r\n }\r\n return getHandValue() <= 21;\r\n }", "public void updateFruit() {\n\t\t\n\t\tint foodX = 0, foodY = 0; // foodX, foodY - coordinates for normal fruit, with s for super\n\t\tint []place; // place on board, will hold X and Y\n\n\t\tif(fruits.size() <= 0) { // if there's no fruit\n\n\t\t\tplace = placeFruit();\n\t\t\tfoodX = place[0];\n\t\t\tfoodY = place[1];\n\n\t\t\taddFruit(foodX, foodY);\n\t\t}\n\t}", "public void run() {\n Set<Philosopher> disabledPhils = new HashSet<Philosopher>();\r\n // True if last philosopher who tried to eat succeed\r\n boolean wasAttemptSuccessful = false;\r\n final long startTime = System.currentTimeMillis();\r\n while (System.currentTimeMillis() - startTime < runningTime) {\r\n if (wasAttemptSuccessful || hungryPhils.isEmpty()) {\r\n hungryPhils.addAll(disabledPhils);\r\n disabledPhils.clear();\r\n }\r\n Philosopher philBeingServed = null;\r\n try {\r\n philBeingServed = hungryPhils.take(); // get phil with the highest priority\r\n disabledPhils.add(philBeingServed);\r\n if (forks.get(philBeingServed.id).attempt(1)) { // Could use tryLock instead\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.println(\"[\" + philBeingServed.id + \"] took left fork\");\r\n }\r\n if (forks.get(philBeingServed.id + 1).attempt(Math.round(Math.random() *\r\n (MAX_ATTEMPT_TIME + 1)))) {\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.println(\"[\" + philBeingServed.id + \"] took right fork\");\r\n }\r\n philBeingServed.giveMeal();\r\n disabledPhils.remove(philBeingServed);\r\n wasAttemptSuccessful = true;\r\n } else {\r\n wasAttemptSuccessful = false;\r\n forks.get(philBeingServed.id).release();\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.println(\"[\" + philBeingServed.id + \"] put left fork\");\r\n }\r\n }\r\n } else {\r\n wasAttemptSuccessful = false;\r\n }\r\n } catch (InterruptedException e) {\r\n if (philBeingServed != null) {\r\n forks.get(philBeingServed.id).release();\r\n forks.get(philBeingServed.id + 1).release();\r\n }\r\n e.printStackTrace();\r\n }\r\n if (FireStarter.isDebugEnabled) {\r\n System.out.printf(\"\\n\\n\"); // Kinda delimiter\r\n FireStarter.isDebugEnabled = false; // Stop producing messages from philosophers\r\n }\r\n }\r\n }", "private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }", "private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}", "public void evolve() {\n\t\tfurniturePriority++;\r\n\t}", "public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }", "private void checkApple() {\n\n if ((xLength[0] == appleX[xApplePosition]) && (yLength[0] == appleY[yApplePosition])) {\n score++;\n snakeLength++;\n locateApple();\n }\n }", "protected void dropFood() {\r\n\t\tthis.food++;\r\n\t}", "@Override\r\n\tpublic boolean isFruitful() {\r\n\t\treturn true;\r\n\t}", "public static void bullyAttack(){\n int punch = player.getHealth() - bullyHitPoints ;\n player.setHealth(punch);\n //Step 2: Conditional dialogue\n if(bullyHitPoints > 50) {\n System.out.println(textparser.getMassiveDamage() + bullyHitPoints + textparser.getToYou());\n }else if(bullyHitPoints > 25){\n System.out.println(textparser.getPunch() + bullyHitPoints + textparser.getToYou());\n }else{\n System.out.println(textparser.getDidntHurtMuch() + bullyHitPoints + textparser.getToYou());\n }\n }", "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 }", "private RecipeIngredient getBitteringHops() {\n\t\t//TODO verify the boil time is the longest, not just return first hops\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngredient().getType() == Ingredient.Type.HOPS) {\n\t\t\t\treturn ri;\n\t\t\t}\n\t\t}\n\t\treturn null;\t\t\t\t\n\t}", "private void anyBeepersInMiddle() {\n\t\t// while (frontIsClear())\n\t\t// for (int i = 0; i < 2; i++) // This is a test\n\t\twhile (frontIsClear()) {\n\t\t\tif (beepersPresent()) {\n\t\t\t\tmove();\n\t\t\t\tmove();\n\t\t\t} else {\n\t\t\t\tcleaningBallot();\n\t\t\t}\n\t\t}\n\t}", "public static void playHitObst()\n {\n playHitObst(0);\n }", "public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "@Override\n\tpublic void takeHit(int attack) {\n\n\t}", "private void putEveryOtherBeeper() {\n\t\twhile (frontIsClear()) {\n\t\t\tif (beepersPresent()) {\n\t\t\t\tmove();\n\t\t\t\tif (frontIsClear()) {\n\t\t\t\t\tmove();\n\t\t\t\t\tputBeeper();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tputBeeper();\n\t\t\t}\n\t\t}\t\n\t}", "@Override\n public String execute(Actor actor, GameMap map) {\n // Set the bound for use in generating a random integer within the range [0-bound)\n // There will be 5 possible integers\n int bound = 5;\n // Pick up fruit by chance\n // To yield 1 or 2 when there are 5 possible integers = 40% chance\n Random random = new Random();\n int number = random.nextInt(bound);\n if (number == 1 || number == 2) {\n String result = \"\\n- Your eco points increases from \" + ((Player) actor).getEcoPoints();\n // Increment eco points of Player\n ((Player) actor).setEcoPoints(((Player) actor).getEcoPoints() + 10);\n result += \" to \" + ((Player) actor).getEcoPoints();\n return super.execute(actor, map) + result;\n }\n return \"You search the tree or bush for fruit, but you can't find any ripe ones\";\n }", "@Override\n public void chooseAction(){\n healthDecay = getHealth() - 5;\n //now scan for Nazguls\n\n if(healthDecay == 0){\n death(this);\n }\n int scan_result = scan();\n\n if(scan_result == 1){\n move();\n }\n\n if(scan_result == 0 && healthDecay < 75){\n stay();\n }\n\n if(scan_result == 0 && hobbitCounter == 15){\n replicate();\n hobbitCounter = 0;\n }\n\n else{\n move();\n \n }\n hobbitCounter = hobbitCounter + 1;\n }", "public void battle(AbstractPokemon otherPokemon)\n {\n boolean capturedPokemon = false;\n AbstractPokemon myPokemon = caughtPokemon.get(0);\n while(caughtPokemon.size() > 0 && otherPokemon.getHealth() > 0 && myPokemon.getHealth() > 0 && capturedPokemon == false)\n {\n System.out.println(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 && capturedPokemon == false)\n {\n boolean willingToCapture = false;\n if(faveType == AbstractPokemon.Type.ANY_TYPE)\n willingToCapture = true;\n else if(otherPokemon.getType() == faveType)\n willingToCapture = true;\n if(!otherPokemon.canCapture() || !willingToCapture)\n {\n otherPokemon.takeDamage(myPokemon);\n if(otherPokemon.getHealth() < 0)\n otherPokemon.setHealth(0);\n System.out.println(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 else\n {\n if(throwPokeball(otherPokemon))\n {\n System.out.println(otherPokemon.toString() + \" has been captured!\");\n otherPokemon.setHealth(20);\n caughtPokemon.add(otherPokemon);\n otherPokemon.removeSelfFromGrid();\n capturedPokemon = true;\n }\n else\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 }\n if (myPokemon.getHealth() <= 0)\n {\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has fainted!\");\n caughtPokemon.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 }\n if(capturedPokemon == false)\n {\n if (otherPokemon.getHealth() <= 0)\n {\n System.out.println(otherPokemon.toString() + \" has fainted!\");\n otherPokemon.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 otherPokemon.setHealth(20);\n }\n }\n System.out.println(\"\");\n }", "@Override\r\n public void hitEvent(Block beingHit, Ball hitter) {\n this.currentScore.increase(5);\r\n // and destroying a block is worth and additional 10 points\r\n if (beingHit.getHitPointsNumber() == 0) {\r\n this.currentScore.increase(10);\r\n }\r\n }", "private void collision(){\n\t\tboolean touched = false;\n\t\tboolean hit;\n\t\tint j =0;\n\t\twhile ( j< this.game_.getSaveBaby().size() && !touched){\n\t\t\tBabyBunnies b = this.game_.getSaveBaby().get(j);\n\t\t\ttouched = this.game_.getBunnyHood().getPosition().dst(b.getPosition())<=80;\n\t\t\thit = this.game_.getWolf().getPosition().dst(b.getPosition())<=80;\n\t\t\tif (touched){\n\t\t\t\tthis.game_.setBabySaved(b);\n\t\t\t}\n\t\t\tif (hit){\n\t\t\t\tthis.game_.wolfCatchBunnies(b);\n\t\t\t\t/**\n\t\t\t\t * Test de callback, retour vers l app android\n\t\t\t\t */\n\t\t\t\tif(this.game_.getScoreWolf()==3){\n\t\t\t\t\tif (this.gameCallBack != null) {\n\n this.gameCallBack.gameOverActivity(this.game_.getScoreBunny());\n\t\t\t\t\t\tthis.isGameOver=true;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tGdx.app.log(\"MyGame\", \"To use this class you must implement MyGameCallback!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t}", "public float onAbsorbHeat(float rfAbsorbed) {\n\t\tif(getFluidAmount(COLD) <= 0 || rfAbsorbed <= 0) { return rfAbsorbed; }\n\n\t\tFluid coolantType = getCoolantType();\n\t\tint coolantAmt = getFluidAmount(COLD);\n\n\t\tfloat heatOfVaporization = getHeatOfVaporization(coolantType);\n\t\t\n\t\tint mbVaporized = Math.min(coolantAmt, (int)(rfAbsorbed / heatOfVaporization));\n\n\t\t// Cap by the available space in the vapor chamber\n\t\tmbVaporized = Math.min(mbVaporized, getRemainingSpaceForFluid(HOT));\n\t\t\n\t\t// We don't do partial vaporization. Just return all the heat.\n\t\tif(mbVaporized < 1) { return rfAbsorbed; }\n\n\t\t// Make sure we either have an empty vapor chamber or the vapor types match\n\t\tFluid newVaporType = getVaporizedCoolantFluid(coolantType);\n\t\tif(newVaporType == null) {\n\t\t\tBRLog.warning(\"Coolant in tank (%s) has no registered vapor type!\", coolantType.getName());\n\t\t\treturn rfAbsorbed;\n\t\t}\n\t\t\n\t\tFluid existingVaporType = getVaporType();\n\t\tif(existingVaporType != null && !newVaporType.getName().equals(existingVaporType.getName())) {\n\t\t\t// Can't vaporize anything with incompatible vapor in the vapor tank\n\t\t\treturn rfAbsorbed;\n\t\t}\n\t\t\n\t\t// Vaporize! -- POINT OF NO RETURN\n\t\tfluidVaporizedLastTick = mbVaporized;\n\t\tthis.drainCoolant(mbVaporized);\n\t\t\n\t\tif(existingVaporType != null) {\n\t\t\taddFluidToStack(HOT, mbVaporized);\n\t\t}\n\t\telse {\n\t\t\tfill(HOT, new FluidStack(newVaporType, mbVaporized), true);\n\t\t}\n\t\t\n\t\t// Calculate how much we actually absorbed via vaporization\n\t\tfloat energyConsumed = (float)mbVaporized * heatOfVaporization;\n\t\t\n\t\t// And return energy remaining after absorption\n\t\treturn Math.max(0f, rfAbsorbed - energyConsumed);\n\t}", "public void eat(){\n if (threshold<=0 && !lapar) revLapar();\n if (lapar && Common.gamemap.get(getX()).get(getY()).showSymbol()=='@'){\n Common.gamemap.get(getX()).get(getY()).ungrowGrass();\n revLapar();\n threshold = 12;\n }\n }", "public Carta hit() {\n\trobadas++;\n\treturn deck[robadas-1];\n}", "default int minimumHit(Player player) {\n\t\treturn -1;\n\t}", "private void eat() {\r\n\t\tthis.energy = this.baseEnergy;\r\n\t\tArrayList<Block> foodNeighbors = (ArrayList<Block>)this.getBlock().getAdjacent(prey, \"2457\");\r\n\t\twhile (foodNeighbors.size() > 0) {\r\n\t\t\tint randomNeighbor = r.nextInt(foodNeighbors.size());\r\n\t\t\tBlock b = this.getBlock();\r\n\t\t\tBlock t = foodNeighbors.get(randomNeighbor);\r\n\t\t\tif (!t.getNextCell().getNextState().equals(predator)) {\r\n\t\t\t\tmoveCell(this, b, t, new WaTorCell(this.getBlock(), new WaTorState(State.EMPTY_STATE),\r\n\t\t\t\t\t\tthis.ageToReproduce, this.baseEnergy));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tfoodNeighbors.remove(t);\r\n\t\t}\r\n\t\tcellPreyRules(new WaTorState(WaTorState.WATOR_PREDATOR));\r\n\t}", "private void follow() {\n\t\t// calculate distance back to hive\n\t\tdouble distToHive = grid.getDistance(grid.getLocation(this),grid.getLocation(hive));\n\t\t// if close to flower from dance information, start scouting\n\t\tif(distToHive > followDist - 5) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying in direction of dance\n\t\telse{\n\t\t\t// deviate slightly from correct angle because bee's aren't perfect (I don't think)\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/50, Math.PI/50);\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\tfood -= highMetabolicRate;\n\t\t}\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}", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "public boolean caughtAnotherPokemon() {\r\n\r\n\t\tint count = 0;\r\n\t\tfor (int poke : caughtPokemon.values()) {\r\n\t\t\tcount += poke;\r\n\t\t}\r\n\t\tif (pokeCount < count) {\r\n\t\t\tpokeCount = count;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void ensureHealthyPokemon()\n\t{\n\t\tif(m_pokemon[0] == null || m_pokemon[0].getHealth() == 0)\n\t\t\tfor(int i = 1; i < 6; i++)\n\t\t\t\tif(m_pokemon[i] != null && m_pokemon[i].getHealth() > 0)\n\t\t\t\t{\n\t\t\t\t\tswapPokemon(0, i);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t}", "public void goAdventuring() {\n\n game.createRandomMonster(4);\n if(RandomClass.getRandomTenPercent() == 5) {\n System.out.println(\"Your are walking down the road... Everything looks peaceful and calm.. Hit enter to continue!\");\n sc.nextLine();\n\n } else {\n game.battle();\n p.checkXp();\n }\n }", "public boolean isFruit()\n\t{\n\t\treturn block == Block.FRUIT;\n\t}", "public void feed() {\n\t\tif (health + 20 > 100) {\n\t\t\thealth = 100;\n\t\t} else {\n\t\t\thealth += 20;\n\t\t}\n\t}", "void hitEvent(Block beingHit, Ball hitter);", "void hitEvent(Block beingHit, Ball hitter);", "@Override\n public boolean gainBerryEffect(Battle b, ActivePokemon user, CastSource source) {\n List<Stat> stats = user.getStages().getNonMaxStats();\n\n // You probably don't need the berry at this point anyhow...\n if (stats.isEmpty()) {\n return false;\n }\n\n // Sharply raise random battle stat\n Stat stat = RandomUtils.getRandomValue(stats);\n return new StageModifier(2*ripen(user), stat).modify(b, user, user, source);\n }", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "public void reduceAnimalHappiness() {\n\t\thappiness -= 10;\n\t}", "public void eatEgg(Egg egg) {\n raiseFoodLevel(10);\n }", "private static void runHQ() throws GameActionException {\n\t\tif (Clock.getRoundNum() < 3) {\t\t\t\n\t\t\tif (rc.isActive()) {\n\t\t\t\tDirection spawnDir = dir[rand.nextAnd(7)];\n\t\t\t\tif (rc.senseObjectAtLocation(curLoc.add(spawnDir)) == null) {\n\t\t\t\t\trc.spawn(spawnDir);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif (pastrLocations[0] == null) {\n\t\t\t\tpastrLocations[0] = getBestPastrLocNearMeBasedOnCowGrowthRate();\n\t\t\t\trc.broadcast(0, pastrLocations[0].x * 100 + pastrLocations[0].y);\n\t\t\t}\n\t\t}\n\t\tdouble d = rc.senseCowsAtLocation(new MapLocation(8,11));\n\t\tSystem.out.println(d);\n\t}", "public int hit() {\n //Add the new card to the players deck\n playerStack.add(cards[talonStack]);\n\n //Increment the score based on the new card\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n\n //Increment the counter for the un-played deck\n talonStack++;\n\n //If the player gets a score above 21, the game is over\n if (playerScore > 21) {\n dealerTurn();\n\n\n if (playerCash <= 0) {\n restartGame();\n return -1;\n } else {\n return -1;\n }\n }\n //If the player hit blackjack, the dealer takes the turn.\n else if (playerScore == 21) {\n dealerTurn();\n\n //Tie\n if (dealerScore == 21) {\n playerCash += playerBet;\n return 0;\n }\n //Win\n else {\n playerCash += (playerBet * 2);\n return 1;\n }\n }\n\n return 2;\n }", "public HitStatus hit() {\r\n\t\tnumHits++;\r\n\t\tif (type.length() <= numHits) {\r\n\t\t\treturn HitStatus.SUNK;\r\n\t\t}\r\n\t\treturn HitStatus.HIT;\r\n\t}" ]
[ "0.6384537", "0.6291993", "0.6186345", "0.60730803", "0.6045739", "0.6037438", "0.5990698", "0.5969768", "0.5966653", "0.59464884", "0.5938621", "0.59306926", "0.5925894", "0.5920475", "0.5889398", "0.58689654", "0.58576846", "0.5847392", "0.5821586", "0.58182096", "0.5806392", "0.57739645", "0.5769638", "0.57590884", "0.57582533", "0.57485795", "0.57366776", "0.5728098", "0.571115", "0.5707927", "0.56757545", "0.56711715", "0.5665044", "0.5658121", "0.5656425", "0.5633206", "0.5625537", "0.56185687", "0.5606122", "0.55977166", "0.5597204", "0.5595802", "0.5585493", "0.55842406", "0.55787444", "0.5576196", "0.55645436", "0.5558332", "0.55573577", "0.5551233", "0.55507857", "0.55225354", "0.55172986", "0.5510327", "0.55096185", "0.5505816", "0.55046564", "0.5504149", "0.55021095", "0.5496271", "0.54933006", "0.5490746", "0.5484794", "0.54787356", "0.5476988", "0.54764944", "0.5475608", "0.54704446", "0.5469956", "0.5463534", "0.545499", "0.54492307", "0.54472464", "0.54423285", "0.54356545", "0.54313594", "0.5431126", "0.543091", "0.5430152", "0.54281765", "0.54016155", "0.54000425", "0.5396205", "0.53853214", "0.5382195", "0.53821707", "0.5371715", "0.5371063", "0.5359232", "0.53559875", "0.53553706", "0.5354165", "0.5351509", "0.5351509", "0.5351016", "0.53485984", "0.5342121", "0.5336233", "0.5334739", "0.5332439", "0.5331184" ]
0.0
-1
MAIN Applies physics to the given drone for dt seconds, translating the drone dt seconds into the future.
public static void applyPhysics(Drone drone, float dt) throws DroneCrashException, MaxAoAException { // stepsize bepalen float h; if (dt - drone.getPredictionMethod().getStepSize() >= 0) { h = drone.getPredictionMethod().getStepSize(); } else if (dt > 0) { h = dt; } else { return; } // huidige versnellingen bepalen Vector3f[] currentAccelerationsW = calculateAccelerations(drone, h); // snelheid voorspellen in functie van de huidige vernsellingen en posities Vector3f[] newVelocities = drone.getPredictionMethod().predictVelocity(drone.getLinearVelocity(), drone.getAngularVelocity(), currentAccelerationsW[0], currentAccelerationsW[1], h); // nieuwe positie berekenen aan de hand van de nieuwe snelheid Vector3f[] deltaPositions = calculatePositionDifferences(drone, newVelocities, h); // nieuwe snelheid opslaan drone.setLinearVelocity(newVelocities[0]); drone.setAngularVelocity(newVelocities[1]); // translatie en rotatie uitvoeren drone.translate(deltaPositions[0]); if (!deltaPositions[1].equals(new Vector3f(0, 0, 0))) { Vector3f rotationAxis = new Vector3f(0, 0, 0); deltaPositions[1].normalise(rotationAxis); drone.rotate(deltaPositions[1].length(), rotationAxis); } // checken of de drone crasht Vector3f leftWingCenterOfMass = new Vector3f(0,0,0); Vector3f.add(drone.transformToWorldFrame(drone.getLeftWing().getCenterOfMass()), drone.getPosition(), leftWingCenterOfMass); Vector3f rightWingCenterOfMass = new Vector3f(0,0,0); Vector3f.add(drone.transformToWorldFrame(drone.getRightWing().getCenterOfMass()),drone.getPosition(), rightWingCenterOfMass); if (drone.transformToWorldFrame(drone.getEnginePosition()).y + drone.getPosition().y <= groundLevel) { throw new DroneCrashException("Drone Crashed: the engine hit the ground!"); } if (drone.transformToWorldFrame(drone.getTailMassPosition()).y + drone.getPosition().y <= groundLevel) { throw new DroneCrashException("Drone Crashed: the tail hit the ground!"); } if (leftWingCenterOfMass.y + drone.getPosition().y <= groundLevel) { throw new DroneCrashException("Drone Crashed: the left wing hit the ground!"); } if (rightWingCenterOfMass.y + drone.getPosition().y <= groundLevel) { throw new DroneCrashException("Drone Crashed: the right wing hit the ground!"); } for (Tyre tyre : drone.getTyres()) { if (tyre.getRadius() < tyre.getCompression()) { throw new DroneCrashException("Drone Crashed: tyre compressed too much!"); } } // recursieve oproep PhysicsEngine.applyPhysics(drone, (dt - h)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void run() {\n\n //if no time has elapsed, do not do anything\n if (Harness.getTime().equals(lastRunTime)) {\n return;\n }\n\n //double deltaV, deltaX;\n double newSpeed;\n double newPosition;\n double targetSpeed = 0;\n double currentSpeed = 0;\n double acceleration = 0;\n\n switch (driveOrderedState.speed()) {\n case STOP:\n targetSpeed = 0.0;\n break;\n case LEVEL:\n targetSpeed = LevelingSpeed;\n break;\n case SLOW:\n targetSpeed = SlowSpeed;\n break;\n case FAST:\n targetSpeed = FastSpeed;\n break;\n default:\n throw new RuntimeException(\"Unknown speed\");\n }\n /*\n * JDR Bug fix to make the speed stop in the case where the command is\n * Direction=STOP but speed is something other than STOP.\n */\n if (driveOrderedState.direction() == Direction.STOP) {\n targetSpeed = 0.0;\n }\n if (driveOrderedState.direction() == Direction.DOWN) {\n targetSpeed *= -1;\n }\n\n currentSpeed = driveSpeedState.speed();\n if (driveSpeedState.direction() == Direction.DOWN) {\n currentSpeed *= -1;\n }\n\n if (Math.abs(targetSpeed) > Math.abs(currentSpeed)) {\n //need to accelerate\n acceleration = Acceleration;\n } else if (Math.abs(targetSpeed) < Math.abs(currentSpeed)) {\n //need to decelerate\n acceleration = -1 * Deceleration;\n } else {\n acceleration = 0;\n }\n if (currentSpeed < 0) {\n //reverse everything for negative motion (going down)\n acceleration *= -1;\n }\n\n //get the time offset in seconds since the last update\n double timeOffset = SimTime.subtract(Harness.getTime(), lastRunTime).getFracSeconds();\n //remember this time as the last update\n lastRunTime = Harness.getTime();\n\n //now update speed\n //deltav = at\n newSpeed = currentSpeed + (acceleration * timeOffset);\n\n //deltax= vt+ 1/2 at^2\n newPosition = carPositionState.position() +\n (currentSpeed * timeOffset) + \n (0.5 * acceleration * timeOffset * timeOffset);\n if ((currentSpeed < targetSpeed &&\n newSpeed > targetSpeed) ||\n (currentSpeed > targetSpeed &&\n newSpeed < targetSpeed)) {\n //if deltaV causes us to exceed the target speed, set the speed to the target speed\n driveSpeedState.setSpeed(Math.abs(targetSpeed));\n } else {\n driveSpeedState.setSpeed(Math.abs(newSpeed));\n }\n //determine the direction\n if (driveSpeedState.speed() == 0) {\n driveSpeedState.setDirection(Direction.STOP);\n } else if (targetSpeed > 0) {\n driveSpeedState.setDirection(Direction.UP);\n } else if (targetSpeed < 0) {\n driveSpeedState.setDirection(Direction.DOWN);\n }\n carPositionState.set(newPosition);\n\n physicalConnection.sendOnce(carPositionState);\n physicalConnection.sendOnce(driveSpeedState);\n\n log(\" Ordered State=\", driveOrderedState,\n \" Speed State=\", driveSpeedState,\n \" Car Position=\", carPositionState.position(), \" meters\");\n }", "public void process()\n {\n // Get current time\n\t\tdouble t = readClock() * clockSpeed;\n\t\tdouble dTime = t - computeClock;\n\t\tdouble dtMax = 1/50.0f;\n\t\n\t\t// Set current time on display\n\t\tcomputeClock = t;\n\t\t\n\n // Only process if time has elapsed\n if (dTime <= 0)\n return;\n\n\n\t\t// ---------------\n\t\n\t\t// Compute accelerations, then integrate (using Critter methods)\n\t\n\t // This part advances the simulation forward by dTime seconds, but\n\t // using steps that are no larger than dtMax (this means it takes\n\t // more than one step when dTime > dtMax -- the number of steps\n\t // you need is stored in numSteps).\n\t\n\t // *** placeholder value\n\t int numSteps = (int) Math.floor(dTime / dtMax);\n\t \n\t // compute a new 'goal' point for the mainbug to attract toward - every 7 seconds\n\t if ((computeClock) - (goalPickClock) > 7)\n\t {\n\t \t// pick a new random goal point\n\t \tgoal = new Point3d(rgen.nextDouble()*16-8, rgen.nextDouble()*16-8, 0);\n\t \tgoalPickClock = computeClock;\n \t\n\t \ttarget = (int)rgen.nextDouble()*(critters.size()-2);\n\t \twhile (critters.get(target) == predator || critters.get(target) == mainBug)\n\t \t\ttarget = (int)(rgen.nextDouble()*(critters.size()-1));\n\t }\n\t \n\t // Here is the rough structure of what you'll need\n\t //\n\t\t// numSteps = how many steps to take for stable integration\n\t // do numSteps times\n\t // - reset acceleration\n\t // - compute acceleration (adding up accelerations from attractions,\n\t // repulsions, drag, ...)\n\t // - integrate (by dTime/numSteps)\n\t // end\n\t //\n\t // ...\n\t for (int i = 0; i < numSteps; i++)\n\t {\n\t \tfor (int k = 0; k < critters.size(); k++)\n\t \t{\n\t \t\tCritter tmp = critters.get(k);\n\t \t\ttmp.accelReset();\n\t \t\ttmp.accelDrag(0.6); // dampening\n\t \t\t\n\n\t \t\t\n\t \t\tif (tmp == mainBug)// big bug follows randomized 'goal' point (food? water? shelter? )\n\t \t\t{\n\t \t\t\ttmp.accelAttract(goal, 0.1, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.3, -2);\n\t \t\t\ttmp.accelAttract(origin, 0.25, 1);\t \t\t\t // attraction toward center of scene\n\t \t\t}\n\t \t\telse if (tmp == predator )\n\t \t\t{\n \t\t\t\t\ttmp.accelAttract(critters.get(target).getLocation(), rgen.nextDouble()*0.4, 2);\t \t\t\t\t\t\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t// baby bugs follow big bug and are repelled from other baby bugs and predator!\n\t \t\t\ttmp.accelAttract(mainBug.getLocation(), rgen.nextDouble()*0.3, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.45, -3);\n\t \t\t\tfor (int m = 0; m < critters.size(); m++)\n\t \t\t\t{\n\t \t\t\t\tif (critters.get(m) != mainBug && critters.get(m) != tmp)\n\t \t\t\t\t\ttmp.accelAttract(critters.get(m).getLocation(), -rgen.nextDouble()*0.5, -1);\t \t\t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t\n\t\t \t// repulsion away from obstacles\n\t\t \tfor (int j = 0; j < obstacles.size(); j++)\n\t\t \t{\n\t\t \t\ttmp.accelAttract(obstacles.get(j).getLocation(), -0.5, -2);\n\t\t \t}\n\t\t \t\n\t\t \ttmp.integrate(dTime/numSteps);\n\t \t}\n\t }\n\t\n\t // Keyframe motion for each critter\n\t for (int i = 0; i < critters.size(); i++)\n\t {\n\t \tcritters.get(i).keyframe(critters.get(i).dist);\n\t }\n }", "@Override\r\n\tpublic void physics() {\n\t\tSystem.out.println(\"Every Thursday evening\");\r\n\t\t\r\n\t}", "public static void periodic() {\n a2 = limelightTable.getEntry(\"ty\").getDouble(0); //Sets a2, the y position of the target\n d = Math.round((h2-h1) / Math.tan(Math.toRadians(a1+a2))); //Calculates distance using a tangent\n\n if(m_gamepad.getStartButtonReleased()) { //Reset errorSum to 0 when start is released\n errorSum = 0;\n }\n\n shooting(); //Determine when we should be shooting\n reportStatistics(); //Report telemetry to the Driver Station\n }", "void do_physics(CAR car, double delta_t) {\n// sn = Math.sin(car.angle);\n// cs = Math.cos(car.angle);\n//\n// velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n// velocity.y = cs * car.velocity_wc.x - sn * car.velocity_wc.y;\n//\n// double yawSpeed = 0.5 * car.cartype.wheelbase * car.angularvelocity;\n//\n// double rotationAngle = 0;\n// double sideSlip = 0;\n// if (velocity.x != 0) {\n// //car is moving forwards\n// rotationAngle = Math.atan(yawSpeed / velocity.x);\n// }\n//\n// if (velocity.x != 0) {\n// sideSlip = Math.atan(velocity.y / velocity.x);\n// }\n//\n// if (velocity.x == 0) {\n// car.angularvelocity = 0;\n// }\n//\n//\n// double slipAngleFront = sideSlip + rotationAngle - car.steerangle;\n// double slipAngleRear = sideSlip - rotationAngle;\n//\n// // weight per axle = half car mass times 1G (=9.8m/s^2)\n// double weight = car.cartype.mass * 9.8 * 0.5;\n//\n// Vector2D frontWheelLateralForce = new Vector2D();\n// frontWheelLateralForce.setX(0);\n// frontWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_F * slipAngleFront));\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * weight);\n//\n// if (front_slip == 1) {\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * 0.5d);\n// }\n//\n// Vector2D rearWheelLateralForce = new Vector2D();\n// rearWheelLateralForce.setX(0);\n// rearWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_R * slipAngleRear));\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * weight);\n//\n// if (rear_slip == 1) {\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * 0.5d);\n// }\n//\n//\n// Vector2D tractionForce = new Vector2D();\n// tractionForce.setX(100 * (car.throttle - car.brake * SGN(velocity.x)));\n// tractionForce.setY(0);\n//\n// if (rear_slip == 1) {\n// tractionForce.setX(tractionForce.getX() * 0.5d);\n// }\n//\n// Vector2D resistance = new Vector2D();\n// double rollingResistanceX = -RESISTANCE * velocity.x;\n// double rollingResistanceY = -RESISTANCE * velocity.y;\n// double dragResistanceX = -DRAG * velocity.x * ABS(velocity.x);\n// double dragResistanceY = -DRAG * velocity.y * ABS(velocity.y);\n// resistance.setX(rollingResistanceX + dragResistanceX);\n// resistance.setY(rollingResistanceY + dragResistanceY);\n//\n// // sum forces\n// Vector2D totalForce = new Vector2D();\n// double frontWheelLateralX = Math.sin(car.steerangle) * frontWheelLateralForce.getX();\n// double rearWheelLateralX = rearWheelLateralForce.getX();\n// double frontWheelLateralY = Math.cos(car.steerangle) * frontWheelLateralForce.getY();\n// double rearWheelLateralY = rearWheelLateralForce.getY();\n//\n// totalForce.setX(tractionForce.getX() + frontWheelLateralX + rearWheelLateralX + resistance.getX());\n// totalForce.setY(tractionForce.getY() + frontWheelLateralY + rearWheelLateralY + resistance.getY());\n//\n//\n// double frontTorque = frontWheelLateralForce.getY() * car.cartype.b;\n// double rearTorque = rearWheelLateralForce.getY() * car.cartype.c;\n// double torque = frontTorque - rearTorque;\n//\n// Vector2D acceleration = new Vector2D();\n// acceleration.setX(totalForce.getX() / car.cartype.mass);\n// acceleration.setY(totalForce.getY() / car.cartype.mass);\n// // Newton F = m.a, therefore a = F/m\n// //TODO: add inertia to the vehicle\n// double angularAcceleration = torque / car.cartype.inertia;\n//\n// acceleration.setX(normalise(acceleration.getX(), 0.1d));\n// acceleration.setY(normalise(acceleration.getY(), 0.1d));\n//\n//\n// Vector2D worldReferenceAcceleration = new Vector2D();\n// worldReferenceAcceleration.setX(cs * acceleration.getY() + sn * acceleration.getX());\n// worldReferenceAcceleration.setY(-sn * acceleration.getY() + cs * acceleration.getX());\n//\n// // velocity is integrated acceleration\n// Vector2D worldReferenceVelocity = new Vector2D();\n// worldReferenceVelocity.setX(car.velocity_wc.x + (delta_t * worldReferenceAcceleration.getX()));\n// worldReferenceVelocity.setY(car.velocity_wc.y + (delta_t * worldReferenceAcceleration.getY()));\n//\n// // position is integrated velocity\n// Vector2D newPosition = new Vector2D();\n// newPosition.setX(delta_t * worldReferenceVelocity.getX() + car.position_wc.x);\n// newPosition.setY(delta_t * worldReferenceVelocity.getY() + car.position_wc.y);\n//\n//\n// car.velocity_wc.x = normalise(worldReferenceVelocity.getX(), 0.1d);\n// car.velocity_wc.y = normalise(worldReferenceVelocity.getY(), 0.1d);\n//\n// if (car.velocity_wc.x == 0 && car.velocity_wc.y == 0) {\n// car.angularvelocity = 0;\n// } else {\n// car.angularvelocity += delta_t * angularAcceleration;\n// }\n//\n// car.angle += delta_t * car.angularvelocity;\n// car.position_wc.x = newPosition.getX();\n// car.position_wc.y = newPosition.getY();\n//\n// /**\n\n sn = Math.sin(car.angle);\n cs = Math.cos(car.angle);\n\n // SAE convention: x is to the front of the car, y is to the right, z is down\n // transform velocity in world reference frame to velocity in car reference frame\n velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n velocity.y = -sn * car.velocity_wc.y + cs * car.velocity_wc.x;\n\n // Lateral force on wheels\n //\n // Resulting velocity of the wheels as result of the yaw rate of the car body\n // v = yawrate * r where r is distance of wheel to CG (approx. half wheel base)\n // yawrate (ang.velocity) must be in rad/s\n //\n yawspeed = car.cartype.wheelbase * 0.5 * car.angularvelocity;\n\n if (velocity.x == 0) // TODO: fix Math.singularity\n rot_angle = 0;\n else\n rot_angle = Math.atan(yawspeed / velocity.x);\n // Calculate the side slip angle of the car (a.k.a. beta)\n if (velocity.x == 0) // TODO: fix Math.singularity\n sideslip = 0;\n else\n sideslip = Math.atan(velocity.y / velocity.x);\n\n // Calculate slip angles for front and rear wheels (a.k.a. alpha)\n slipanglefront = sideslip + rot_angle - car.steerangle;\n slipanglerear = sideslip - rot_angle;\n\n // weight per axle = half car mass times 1G (=9.8m/s^2)\n weight = car.cartype.mass * 9.8 * 0.5;\n\n // lateral force on front wheels = (Ca * slip angle) capped to friction circle * load\n flatf.x = 0;\n flatf.y = CA_F * slipanglefront;\n flatf.y = Math.min(MAX_GRIP, flatf.y);\n flatf.y = Math.max(-MAX_GRIP, flatf.y);\n flatf.y *= weight;\n if (front_slip == 1)\n flatf.y *= 0.5;\n\n // lateral force on rear wheels\n flatr.x = 0;\n flatr.y = CA_R * slipanglerear;\n flatr.y = Math.min(MAX_GRIP, flatr.y);\n flatr.y = Math.max(-MAX_GRIP, flatr.y);\n flatr.y *= weight;\n if (rear_slip == 1)\n flatr.y *= 0.5;\n\n // longtitudinal force on rear wheels - very simple traction model\n ftraction.x = 100 * (car.throttle - car.brake * SGN(velocity.x));\n ftraction.y = 0;\n if (rear_slip == 1)\n ftraction.x *= 0.5;\n\n // Forces and torque on body\n\n // drag and rolling resistance\n resistance.x = -(RESISTANCE * velocity.x + DRAG * velocity.x * ABS(velocity.x));\n resistance.y = -(RESISTANCE * velocity.y + DRAG * velocity.y * ABS(velocity.y));\n\n // sum forces\n force.x = ftraction.x + Math.sin(car.steerangle) * flatf.x + flatr.x + resistance.x;\n force.y = ftraction.y + Math.cos(car.steerangle) * flatf.y + flatr.y + resistance.y;\n\n // torque on body from lateral forces\n torque = car.cartype.b * flatf.y - car.cartype.c * flatr.y;\n\n // Acceleration\n\n // Newton F = m.a, therefore a = F/m\n acceleration.x = force.x / car.cartype.mass;\n acceleration.y = force.y / car.cartype.mass;\n angular_acceleration = torque / car.cartype.inertia;\n\n // Velocity and position\n\n // transform acceleration from car reference frame to world reference frame\n acceleration_wc.x = cs * acceleration.y + sn * acceleration.x;\n acceleration_wc.y = -sn * acceleration.y + cs * acceleration.x;\n\n // velocity is integrated acceleration\n //\n car.velocity_wc.x += delta_t * acceleration_wc.x;\n car.velocity_wc.y += delta_t * acceleration_wc.y;\n\n // position is integrated velocity\n //\n car.position_wc.x += delta_t * car.velocity_wc.x;\n car.position_wc.y += delta_t * car.velocity_wc.y;\n\n\n // Angular velocity and heading\n\n // integrate angular acceleration to get angular velocity\n //\n car.angularvelocity += delta_t * angular_acceleration;\n\n // integrate angular velocity to get angular orientation\n //\n car.angle += delta_t * car.angularvelocity;\n\n }", "@Override\n protected void execute() {\n m_currentTime = Timer.getFPGATimestamp();\n// used for more precise calculations\n m_currentError = m_desiredDistance - Robot.m_drive.Position();\n// ^^ tells how much further the Robot goes\n m_derivative = (m_currentError - m_oldError) / (m_currentTime - m_oldTime);\n// ^^ PID formula stuff. The change of error / change of time to be more precise\n m_output = m_currentError * constants.kP + constants.kD * m_derivative;\n// tells how much power the motor will change\n Robot.m_drive.SetPower(m_output);\n// changes motor power\n\n m_oldError = m_currentError;\n// how error distance updates so it won't repeat old mistake\n m_oldTime = m_currentTime;\n// same as line above\n }", "public static void main(String[] args) {\n Double T = Double.valueOf(args[0]);\n Double dt = Double.valueOf(args[1]);\n String fileName = args[2];\n double radius = NBody.readRadius(fileName);\n Body[] Bodies = NBody.readBodies(fileName);\n\n StdDraw.setScale(-radius, radius);\n StdDraw.clear();\n String background = \"images/starfield.jpg\";\n StdDraw.picture(0, 0, background);\n\n for (Body b : Bodies) {\n b.draw();\n }\n\n double time = 0;\n while (time < T) {\n double[] xForces = new double[Bodies.length];\n double[] yForces = new double[Bodies.length];\n for (int i = 0; i < xForces.length; ++i) {\n xForces[i] = Bodies[i].calcNetForceExertedByX(Bodies);\n yForces[i] = Bodies[i].calcNetForceExertedByY(Bodies);\n }\n for (int i = 0; i < xForces.length; ++i) {\n Bodies[i].update(dt, xForces[i], yForces[i]);\n }\n StdDraw.picture(0, 0, background);\n\n for (Body b : Bodies) {\n b.draw();\n }\n\n StdDraw.show();\n StdDraw.pause(10);\n time += dt;\n }\n StdDraw.show();\n }", "private void physicsTickAlive() {\n\t\t// Physics stuff\n\t\tsetThrusts();\n\t\tmoveEverything(deltaTimeAlive);\n\t\tageScoreMarkers(deltaTimeAlive);\n\t\tshootBullets();\n\t\t\n\t\tcollideTankToWall();\n\t\tcollideTankToTank();\n\t\tcollideBulletToWall();\n\t\tcollideBulletToTank();\n\t}", "public void run() {\n\n renderingForce = true;\n //file.play();\n\n\n if (haplyBoard.data_available()) {\n /* GET END-EFFECTOR STATE (TASK SPACE) */\n widgetOne.device_read_data();\n\n angles.set(widgetOne.get_device_angles()); \n posEE.set(widgetOne.get_device_position(angles.array()));\n posEE.set(posEE.copy().mult(200));\n }\n\n s.setToolPosition(edgeTopLeftX+worldWidth/2-(posEE).x, edgeTopLeftY+(posEE).y-7); \n\n\n s.updateCouplingForce();\n fEE.set(-s.getVirtualCouplingForceX(), s.getVirtualCouplingForceY());\n fEE.div(100000); //dynes to newtons\n\n torques.set(widgetOne.set_device_torques(fEE.array()));\n widgetOne.device_write_torques();\n\n world.step(1.0f/1000.0f);\n\n\n checkSplat();\n\n renderingForce = false;\n }", "public abstract void update(float dt);", "public abstract void update(float dt);", "public abstract void update(float dt);", "public void update() {\n\t\t\n\t\t// Calculating all forces to apply to the physics shapes\n\t\tArrayList<Object[]> forces = new ArrayList<Object[]>();\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tfor(PhysicsShape shape2 : shapes) {\n\t\t\t\tif(!(shape == shape2))\n\t\t\t\t\tforces.addAll(shape.allForcesFromShape(shape2));\n\t\t\t}\n\t\t}\n\n\t\t// Adding force of gravity to each shape, directly downward.\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tif(!shape.equals(ground))\n\t\t\t\tforces.add(new Object[] {shape, shape.getX(), shape.getY(), shape.getMass() * 9.81f, 0 - (float) (Math.PI / 2.0) } );\n\t\t}\n\t\t\n\t\t// tester, applies sideways force to the left\n\t\tif(shapes.get(1).getY() == 200.0f) {\n\t\t\tforces.add(new Object[] {shapes.get(1), 300f, 125f, 1000f, (float) Math.PI});\n\t\t}\n\t\t\n\t\t// Applying each force to the shapes to set new vX, vY and omega values for this tick.\n\t\t// Force array is in format [PhysicsShape, x, y, magnitude, direction]\n\t\tfor(Object[] force : forces) {\n\t\t\t\n\t\t\tPhysicsShape shape = (PhysicsShape) force[0];\n\t\t\tfloat x = (float) force[1];\n\t\t\tfloat y = (float) force[2];\n\t\t\tfloat magnitude = (float) force[3];\n\t\t\tfloat direction = (float) force[4];\n\t\t\t\n\t\t\tshape.applyForce(x, y, magnitude, direction);\n\t\t}\n\t\t\n\t\t// Tells each PhysicsShape to move one tick forwards with the new vX, vY and omega values\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tshape.act();\n\t\t}\n\t\t\n\t}", "protected void execute() {\n \t// Scales the speed based on a proportion of ideal voltage over actual voltage\n \tRobot.shooter.talon.set(0.59 * (12.5 / Robot.pdp.getVoltage()));\n// \tRobot.shooter.talon.enable();\n// \tRobot.shooter.talon.set(Shooter.IDEAL_SPEED * (12.5 / Robot.pdp.getVoltage()));\n }", "public void run() {\n\t\ttry {\n\t\t\tcurrentTime = System.currentTimeMillis();\n\t\t\twhile (distanciaAtual < distanciaTotal) {\n\t\t\t\tsteps++;\n\t\t\t\tRandom gerador = new Random();\n\t\t\t\tint passo = gerador.nextInt(6);\n\t\t\t\tdistanciaAtual += passo;\n\t\t\t\tif (steps % 10 == 0) {\n\t\t\t\t\tSystem.out.println(\"A Tartaruga Número \" + idTartaruga + \" deu: \" + steps + \" passos. E andou: \" + distanciaAtual + \" centímetros.\");\n\t\t\t\t}\n\t\t\t\tThread.sleep(gerador.nextInt(4));\n\t\t\t}\n\t\t\tdouble completedTime = System.currentTimeMillis() - currentTime;\n\t\t\tcorrida.setTempoPassosGasto(idTartaruga, completedTime, steps);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n protected void execute() {\n double now = Timer.getFPGATimestamp();\n double deltaT = now - startT;\n if(deltaT < 1){\n Robot.hatchIntake.hatchSolenoid(false);\n }else if(deltaT > 1 && deltaT < 1.5){\n Robot.hatchIntake.hatchSolenoid(true);\n }\n }", "@Override\n public void update(double dt) {\n myLifetime -= dt;\n \n if (myLifetime <= 0) {\n destroy();\n }\n else {\n double d = SPEED * dt;\n double angle = Math.toRadians(getRotation());\n translate(d * Math.cos(angle), d * Math.sin(angle));\n \n // add momentum term\n translate(dt * myMomentum[0], dt * myMomentum[1]);\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}", "public void startTimer() {\n // TODO = handle more aspects of the behaviour required by the specification\n System.out.println(\"starting timer\");\n initialHeroCastle();\n isPaused = false;\n // trigger adding code to process main game logic to queue. JavaFX will target\n // framerate of 0.3 seconds\n timeline = new Timeline(new KeyFrame(Duration.seconds(0.1), event -> {\n if (world.getMode() == -1){\n modeSelectionSwitchToMainMenu();\n }\n world.runTickMoves();\n world.runBattles();\n world.updateGoal();\n if (world.goalAchieved()) {\n world.gameOver();\n deadSwitchToMainMenu(true);\n return;\n }\n List<Soldier> soldiers = world.possiblySpawnSoldiers();\n for (Soldier s : soldiers) {\n loadSoldier(s);\n }\n List<BasicEnemy> deadEnemies = world.cleanEnemies();\n for (BasicEnemy e : deadEnemies) {\n reactToEnemyDefeat(e);\n }\n List<BasicEnemy> newEnemies = world.possiblySpawnEnemies();\n for (BasicEnemy newEnemy : newEnemies) {\n loadEnemies(newEnemy);\n }\n printThreadingNotes(\"HANDLED TIMER\");\n loopNumber.setText(\"Loop: \" + (int) world.getCurrentLoop().get());\n if (world.isCharacterDead()) {\n if (!world.useOneRing())\n deadSwitchToMainMenu(false);\n return;\n }\n if (world.isAtHeroCastle() && world.shouldShopAppear()) {\n System.out.println(\"At Hero Castle. Shopping!\");\n shopSwitchToMainMenu();\n }\n }));\n timeline.setCycleCount(Animation.INDEFINITE);\n timeline.play();\n }", "public void act() \r\n {\r\n addDrone();\r\n if(droneTimer>0)\r\n {\r\n droneTimer--;\r\n }\r\n }", "public void physics(double rate){\n\t\tfloat nextTop=0;\r\n\t\tif(getContained()==null){\r\n\t\t\tint year=Main.world.timeline.getTerra();\r\n\r\n\t\t\tgx=(int)Math.floor(x);\r\n\t\t\tgy=(int)Math.floor(y);\r\n\t\t\tif(gx<0){\r\n\t\t\t\tgx=0;\r\n\t\t\t}\r\n\t\t\tif(gy<0){\r\n\t\t\t\tgy=0;\r\n\t\t\t}\r\n\t\t\tMain.world.contacts(this);\r\n\t\t\tif(getTopObjects()>0){\r\n\t\t\t\ttop=getTopObjects();\r\n\t\t\t}else{\r\n\t\t\t\ttop=(Main.world.land.getHigh(year,gx,gy));\r\n\t\t\t}\r\n\r\n\t\t\tif(dx<pit){\r\n\t\t\t\tdx=pit;\r\n\t\t\t}\r\n\t\t\tif(dy<pit){\r\n\t\t\t\tdy=pit;\r\n\t\t\t}\r\n\t\t\tfloat mm=Main.level.getStats().getSize()-pit;\r\n\t\t\tif(dx>mm ){\r\n\t\t\t\tdx=mm;\r\n\t\t\t}\r\n\t\t\tif(dy>mm ){\r\n\t\t\t\tdy=mm;\r\n\t\t\t}\r\n\r\n\t\t\tnextTop=Main.world.land.getHigh(year,(int)Math.floor(dx), (int)Math.floor(dy));\r\n\t\t}else{\r\n\t\t\tfloat smx=getContained().boundsx;\r\n\t\t\tfloat smy=getContained().boundsy;\r\n\t\t\tfloat emx=getContained().boundex;\r\n\t\t\tfloat emy=getContained().boundey;\r\n\r\n\t\t\tif(dx<smx){\r\n\t\t\t\tdx=smx;\r\n\t\t\t}else if(dx>emx){\r\n\t\t\t\tdx=emx;\r\n\t\t\t}\r\n\r\n\t\t\tif(dy<smy){\r\n\t\t\t\tdy=smy;\r\n\t\t\t}else if(dy>emy){\r\n\t\t\t\tdy=emy;\r\n\t\t\t}\r\n\t\t\tgetContained().innerTouch(this);\r\n\t\t}\r\n\r\n\t\tint m=Main.level.getStats().getSize()-1;\r\n\t\tpz=z;\r\n\t\tz+=vz*rate;\r\n\t\tfloat hz=z-top;\r\n\t\tif(z<-2){\r\n\t\t\tz=-2;\r\n\t\t\tfallDamage();\r\n\t\t}\r\n\t\tif(hz>0){\r\n\t\t\tif(submerged()){\r\n\t\t\t\tvz-=UserData.getWaterGravity()*rate;\r\n\t\t\t\tif(vz<-1){\r\n\t\t\t\t\tvz=-1;\r\n\t\t\t\t}\r\n\t\t\t\tfloat zu=Main.world.land.getWaterHigh(gx,gy);\r\n\t\t\t\tfloat z1=zu;\r\n\t\t\t\tfloat z2=zu;\r\n\t\t\t\tfloat z3=zu;\r\n\t\t\t\tfloat z4=zu;\r\n\r\n\t\t\t\tif(gx>0){\r\n\t\t\t\t\tz1=Main.world.land.getWaterHigh(gx-1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gx<m){\r\n\t\t\t\t\tz2=Main.world.land.getWaterHigh(gx+1,gy);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy>0){\r\n\t\t\t\t\tz3=Main.world.land.getWaterHigh(gx,gy-1);\r\n\t\t\t\t}\r\n\t\t\t\tif(gy<m){\r\n\t\t\t\t\tz4=Main.world.land.getWaterHigh(gx,gy+1);\r\n\t\t\t\t}\r\n\t\t\t\tif(z1>zu){\r\n\t\t\t\t\tvx+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z2>zu){\r\n\t\t\t\t\tvx-=rate;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(z3>zu){\r\n\t\t\t\t\tvy+=rate;\r\n\t\t\t\t}\r\n\t\t\t\tif(z4>zu){\r\n\t\t\t\t\tvy-=rate;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvz-=UserData.getGravity()*rate;\r\n\t\t\t}\r\n\t\t\tgrounded=false;//vz>=-0.02;\r\n\t\t}else{\r\n\t\t\tif(!grounded){\r\n\t\t\t\tgrounded=true;\r\n\t\t\t\tland();\r\n\r\n\t\t\t}\r\n\t\t\tvz=0;\r\n\t\t\tz=top;\r\n\t\t}\r\n\r\n\t\tdx+=vx*rate;\r\n\t\tdy+=vy*rate;\r\n\r\n\t\tfloat sz=nextTop-z;\r\n\t\tfloat sx=(float) (rate*(dx-x)/5f);\r\n\t\tfloat sy=(float) (rate*(dy-y)/5f);\r\n\r\n\t\tif(sz<=stepHeight && Math.abs(vx)<0.01f && Math.abs(vy)<0.01f){\r\n\t\t\tpx=x;\r\n\t\t\tpy=y;\r\n\t\t\tx+=sx;\r\n\t\t\ty+=sy;\r\n\t\t}else{\r\n\t\t\tdx=x;\r\n\t\t\tdy=y;\r\n\t\t}\r\n\t\tif(Math.abs(sx)<0.006 &&Math.abs(sy)<0.006){\r\n\t\t\tmoving=false;\r\n\t\t}else{\r\n\t\t\tmoving=true;\r\n\t\t}\r\n\t}", "private void forestIncomeTimerStart(){\n forestIncomeTimer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n\n\n forestModel.setWood(forestModel.getWood()\n .add(forestModel.getElfIncome())\n .add(forestModel.getLumberjackIncome())\n .add(forestModel.getWoodcutterIncome()));\n setWoodLabel();\n setWoodIncomeLabel();\n\n\n\n\n\n }\n\n }, 1, 1000);\n }", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "public void addDrone()\r\n {\r\n if (droneTimer==0)\r\n {\r\n getWorld().addObject(new Drone(),(int)(Math.random()*(getWorld().getWidth()-50)+25),0);\r\n droneTimer =droneDelay;\r\n getWorld().addObject(new LightGunship(),(int)(Math.random()*(getWorld().getWidth()-50)+25),0);\r\n getWorld().addObject(new HeavyGunship(),(int)(Math.random()*(getWorld().getWidth()-50)+25),0);\r\n if(droneDelay >3)\r\n {\r\n droneDelay-=2;\r\n }\r\n }\r\n }", "protected void execute()\n\t{\n\t\tdouble speed = Robot.oi.getActuatorSpeed();\n\t\t// Treat a zone around the center position as zero to prevent fluctuating\n\t\t// motor speeds when the joystick is at rest in the center position.\n\t\tRobot.linearActuator.setSpeed(Math.abs(speed) >= .1 ? speed : 0);\n\t}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n \n // m_driveTrain.driveBase();\n\n // ros_string = workingSerialCom.read();\n // System.out.println(ros_string);\n // gulce = workingSerialCom.StringConverter(ros_string, 1);\n // m_driveTrain.run(gulce);\n // // System.out.println(Robot.m_driveTrain.driveTrainRightFrontMotor.getSelectedSensorVelocity());\n\n // LeftFront = (Robot.m_driveTrain.driveTrainLeftFrontMotor.getSelectedSensorVelocity()*6)/4096;\n // RightFront = (Robot.m_driveTrain.driveTrainRightFrontMotor.getSelectedSensorVelocity()*6)/4096;\n // LeftFront_ros = workingSerialCom.floattosString(LeftFront);\n // RigthFront_ros = workingSerialCom.floattosString(RightFront);\n\n // workingSerialCom.write(\"S\"+LeftFront_ros+\",\"+RigthFront_ros+\"F\"+\"\\n\");\n\n }", "public void setupSimulation() {\n final Timer timerStatus = new Timer();\n\n TimerTask taskUpdateFood = new TimerTask() {\n @Override\n public void run() {\n terrain.toggleFood();\n }\n };\n timerStatus.schedule(taskUpdateFood, 0, 1000);\n\n startTime = System.currentTimeMillis();\n }", "@Override\r\n public void updateSelf(float dt) {\n \t if(this.die == -1 || this.die == -2 || this.die == 3) {\r\n \t\t return;\r\n \t }\r\n \t //if in the first wave speed in 0.01\r\n \t if(this.die == 0) {\r\n \t\t this.setPosition(this.getPosition().getX()+0.01f, this.getPosition().getY());\r\n \t }\r\n \t //if in the second wave speed in 0.03\r\n \t else if(this.die == 1) {\r\n \t\t this.setPosition(this.getPosition().getX()+0.03f, this.getPosition().getY());\r\n \t } \r\n \t //if in the second wave speed in 0.05\r\n \t else if(this.die == 2) {\r\n \t\t this.setPosition(this.getPosition().getX()+0.05f, this.getPosition().getY());\r\n \t }\r\n \t // if the duck is flying is no limit for going right however if it\r\n \t //get out of the scene will die\r\n \t /** \r\n \t * THIS MEANS SOMETIMES WHEN YOU CHOOSE A SHORTCUT,\r\n \t * YOU WILL MISS ALL THE VIEWS IN THE ROAD.\r\n \t **/\r\n \t if(head.getY() > 1 && head.getX() < 4) {\r\n \treturn;\r\n }\r\n \t //if it not landing in the wave it will die\r\n if(!checkStatus()) {\r\n \tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-2.4f);\r\n \t\t\tthis.die = -1;\r\n \t\t\tSystem.out.println(\"Game over\");\r\n }\r\n }", "protected void execute() {\r\n timespan = date.getTime() - lastTime;\r\n allaxes = accelerometer.GetAcceleration();\r\n velocityX = velocityX + allaxes.XAxis * timespan;\r\n velocityY = velocityY + allaxes.YAxis * timespan;\r\n theDash.log(velocityX,\"X\");\r\n }", "public void step() {\n\t\tfor (SimObject o : simObjects) {\n\t\t\to.step(timeScale);\n\t\t}\n\n\t\t// increment time elasped\n\t\tdaysElapsed += ((double) (timeScale)) / 86400.0;\n\n\t\t// if more than 30.42 days have elapsed, increment months\n\t\tif (daysElapsed >= 30.42) {\n\t\t\tmonthsElapsed++;\n\t\t\tdaysElapsed -= 30.42;\n\t\t}\n\n\t\t// if more than 12 months have elapsed, increment years\n\t\tif (monthsElapsed >= 12) {\n\t\t\tyearsElapsed++;\n\t\t\tmonthsElapsed -= 12;\n\t\t}\n\t}", "@Override\n protected void update(Engine engine) {\n\t\trs = (GL4RenderSystem) engine.getRenderSystem();\n\t\t\n\t\telapsTime += engine.getElapsedTimeMillis();\n\t\telapsTimeSec = Math.round(elapsTime/1000.0f);\n\t\telapsTimeStr = Integer.toString(elapsTimeSec);\n\t\t\n\t\t//player.update(elapsTimeSec);\n\t\tSceneNode dragon = engine.getSceneManager().getSceneNode(\"dragonNPCNode\");\n\t\t\n\t\tdIter++;\n\t\t//if(dIter == 200)\n\t\t//{\n\t\t\t//dir = dir*-1;\n\t\t\t//dIter = 0;\n\t\t//}\n\t\tif(dIter <= 200)\n\t\tdragon.moveBackward(dir);\n\t\t\n\t\tif(dIter > 200 && dIter <= 400 )\n\t\t\tdragon.moveLeft(dir);\n\t\t\n\t\tif(dIter > 400 && dIter <= 600 )\n\t\t\tdragon.moveForward(dir);\n\t\t\n\t\tif(dIter > 600 && dIter <= 800 )\n\t\t\tdragon.moveRight(dir);\n\t\t\n\t\tif(dIter == 800 )\n\t\t\tdIter = 0;\n\t\t//SkeletalEntity dragonSE =\n\t\t\t\t//(SkeletalEntity) engine.getSceneManager().getEntity(\"dragonSkeleton\");\n\t\t//dragonSE.update();\n\t\t\n\t\tfloat time = engine.getElapsedTimeMillis();\n\t\t\n\t\tfloat playerFloat[] = player.getNode().getLocalTransform().toFloatArray();\n\t\t//playerFloat[7] = player.getNode().getLocalPosition().y();\n\t\tdouble playerMat[] = toDoubleArray(playerFloat);\n\t\tMatrix4 mat3;\n\t\tmat3 = Matrix4f.createFrom(toFloatArray(player.getNode().getPhysicsObject().getTransform()));\n\t\t//player.getNode().setLocalPosition(playerFloat[3],mat3.value(1,3), playerFloat[11]);\n\t\t//double playerMat[] = toDoubleArray(player.getNode().getLocalTransform().toFloatArray());\n\t\tplayerFloat = player.getNode().getLocalTransform().toFloatArray();\n\t\t//playerFloat[7] = player.getNode().getLocalPosition().y();\n\t\tplayerFloat[7] = mat3.value(1,3);//set y coordinate to physics world\n\t\tplayerMat = toDoubleArray(playerFloat);\n\t\tSystem.out.println(\"player.getNode().getLocalTransform(): \" + player.getNode().getLocalTransform());\n\t player.getNode().getPhysicsObject().setTransform(playerMat);\n\t \n\t player.update(elapsTimeSec);\n\t SkeletalEntity manSE =\n \t\t(SkeletalEntity) engine.getSceneManager().getEntity(\"knightSkeleton\");\n \t\tmanSE.update();\n\n\t \n\t\tif (running)\n\t\t{ \n\t\t\tMatrix4 mat;\n\t\t\tphysicsEng.update(time);\n\t\t\tfor (SceneNode s : engine.getSceneManager().getSceneNodes())\n\t\t\t{ \n\t\t\t\t//if (s.getPhysicsObject() != null && s.getName() != player.getNode().getName())\n\t\t\t\t//if (s.getPhysicsObject() != null /*&& s.getName() != player.getNode().getName()*/)\n\t\t\t\t{ \n\t\t\t\t\tmat = Matrix4f.createFrom(toFloatArray(s.getPhysicsObject().getTransform()));\n\t\t\t\t\ts.setLocalPosition(mat.value(0,3),mat.value(1,3), mat.value(2,3));\n\t\t\t\t} \n\t\t\t} \n\t\t}\n\n\t\tdispStr=\"Time = \" + elapsTimeStr + \" Score: \"+player.getScore();\n\t\trs.setHUD(dispStr, 15, 15);\n\t\tif(player.isBoostActive()) dispStr+=\" Boost Active!\";\n\t\tim.update(elapsTime);\n\t\tprocessNetworking(elapsTime);\n\t\t\n\t\tcheckForCollisions();\n\t\t//player.update(elapsTimeSec);\n\t\tSystem.out.println(\"ball transform: \" + ball2Node.getLocalTransform() );\n\t\tSystem.out.println(\"ball physycs object transform: \" + ball2Node.getPhysicsObject().getTransform()[0] + ',' \n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[1] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[2] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[3] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[4] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[5] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[6] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[7] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[8] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[9] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[10] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[11] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[12] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[13] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[14] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[15] + ',');\n\t\tSystem.out.println(\"ball linear velocity: \" + ball2Node.getPhysicsObject().getLinearVelocity());\n\t\tif(distanceTo(player.getNode().getLocalPosition(),ball2Node.getLocalPosition()) <= 4)\n\t\t{\n\t\t\tball2Node.setLocalPosition(0,10,0);\n\t\t\tfloat velocityArray[] = { 0, 5, 0};\n\t\t\tball2Node.getPhysicsObject().setLinearVelocity(velocityArray);\n\t\t\tfloat floTemp[] = ball2Node.getLocalTransform().toFloatArray();\n\t\t\tdouble dubTemp[] = {(double)floTemp[0], (double)floTemp[1], (double)floTemp[2], (double)floTemp[3], (double)floTemp[4],\n\t\t\t\t\t(double)floTemp[5],(double)floTemp[6],(double)floTemp[7], (double)floTemp[8], (double)floTemp[9], (double)floTemp[10], (double)floTemp[11]\n\t\t\t\t\t\t\t, (double)floTemp[12], (double)floTemp[13], (double)floTemp[14], (double)floTemp[15] };\n\t\t\t\n\t\t\tdouble dubTemp2[] = toDoubleArray(floTemp);\n\n\n\t\t\t Matrix4 mat2;\n\t\t\tball2Node.getPhysicsObject().setTransform(dubTemp2);\n\t\t\t\n\t\t\t//mat2 = Matrix4f.createFrom(toDoubleArray( ball2Node.getLocalTransform().toFloatArray()))\n\t\t\t//ball2Node.getPhysicsObject().setTransform(dubTemp2);\n\t\t\t//ball2Node.setPhysicsObject(ball2PhysObj);\n\t\t\t//ball2Node.getPhysicsObject().getTransform().\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t//player.playWalkAnimation();\n\t\t\n\t\t\n\t\t\n\t\t/*ball2Node.getPhysicsObject().setTransform(ball2Node.getLocalTransform());\n\t\t//ball2PhysObj.set\n\t\tphysicsEng.\n\t\ttemptf = toDoubleArray(ball1Node.getLocalTransform().toFloatArray());\n \tball1PhysObj = physicsEng.addSphereObject(physicsEng.nextUID(),\n \tmass, temptf, 2.0f);\n \tball1PhysObj.setBounciness(1.0f);\n \tball1Node.setPhysicsObject(ball1PhysObj);*/\n\t\t\n\t\t/* check if player jumped*/\n\t\t\n\t}", "public void run() {\n\t\tLooper.prepare();\n\t\tThread.currentThread().setName(\"Guidance\");\n\t\tThread.currentThread().setPriority(Thread.MAX_PRIORITY);\n\t\tcreateHandler();\n\t\t//mHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\treceiveMessage(\"DIRECT:0:0:0:0\", null);\n\t\tLooper.loop();\n\t}", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "@Override\r\n protected void execute() {\r\n // get deltaT in seconds for the controller\r\n double now = System.currentTimeMillis();\r\n double elapsed = (now - mPreviousTime) / 1000.0 ; \r\n mPreviousTime = now; \r\n \r\n // get inputs to the two PIDs\r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \r\n \r\n // update and get control output from the two PIDs\r\n double distControl = mDistController.update(dist, bearing, elapsed) ;\r\n double bearingControl = mBearingController.update(dist, bearing, orient, elapsed);\r\n // combine them\r\n double left = (distControl+bearingControl) ; // / 2.0 ;\r\n double right = (distControl-bearingControl) ; // / 2.0 ;\r\n \r\n // command the drivetrain\r\n Robot.drivetrain.tankDrive(left, right);\r\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}", "public void tick(double dt) {\n }", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "public void autonomous() {\n robot.drive(0.5); //Drives in a square\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n robot.drive(0.5);\n Timer.delay(0.5);\n robot.tankDrive(0.5, -0.5);\n Timer.delay(0.25);\n }", "@Override\n\tpublic void tick() {\n\t\tif(fighting) {\n\t\t\t//Mostrar numero de ronda\n\t\t\tif(msjRonda) {\n\t\t\t\ttiempoRondaMsj--;\n\t\t\t\tif(tiempoRondaMsj==0) {\n\t\t\t\t\tmsjRonda=false;\n\t\t\t\t\ttiempoRondaMsj=100;\n\t\t\t\t\tmsjFight=true;\n\t\t\t\t\thandler.getGame().setSoundEffect(6,true);\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar mensaje FIGHT!\n\t\t\telse if(msjFight) {\n\t\t\t\ttiempoFightMsj--;\n\t\t\t\tif(tiempoFightMsj==0) {\n\t\t\t\t\tmsjFight=false;\n\t\t\t\t\ttiempoFightMsj=100;\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar el ganador de la ronda\n\t\t\telse if(msjGanador) {\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\ttiempoGanador--;\n\t\t\t\tif(tiempoGanador==0) {\n\t\t\t\t\tmsjGanador=false;\n\t\t\t\t\ttiempoGanador=100;\n\t\t\t\t\t//Si gana la CPU no mostramos los puntos que ha hecho (nos saltamos el estado msjGanador)\n\t\t\t\t\tif((mode==1 && resultado==2) || mode==3) {\n\t\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\t\tbonus=0;\n\t\t\t\t\t\thandler.getGame().setFade(true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmsjPuntos=true;\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}\n\t\t\t//Mostrar puntos ganados\n\t\t\telse if(msjPuntos) {\n\t\t\t\ttiempoTime--;\n\t\t\t\ttiempoVital--;\n\t\t\t\t//bonus se usa para controlar el tiempo a mostrar despues de llegar hasta el maximo valor del bonus\n\t\t\t\tif(bonus>=(puntosTime+puntosVital+10000)) {\n\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\thandler.getGame().setFade(true);\t\n\t\t\t\t\tbonus=0;\n\t\t\t\t\t\n\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Comenzamos a hacer tick de la pelea cuando se han mostrado los mensajes iniciales\n\t\t\telse {\n\t\t\t\tif(handler.getGame().getKeyManager().primeraVez && primeraVez2) {\n\t\t\t\t\tprimeraVez2=false;\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getKeyManager().ESC){ // Salir juego\n\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\thandler.getGame().quererSalir=true;\n\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\thandler.getGame().xEsc=590;\n\t\t\t\t\t\thandler.getGame().yEsc=335;\n\t\t\t\t\t\thandler.getGame().widthEsc=100;\n\t\t\t\t\t\thandler.getGame().heightEsc=50;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getGame().quererSalir) {\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==2){ // yes\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==1){ // no\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\t\thandler.getGame().quererSalir=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().D){ // dcha\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==2) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().A){ // izq\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==1) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(handler.getKeyManager().P && mode!=3){ // Pause !!!!\n\t\t\t\t\t\t\t//System.out.println(\"Hola\");\n\t\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(!handler.getGame().getKeyManager().primeraVez) {\n\t\t\t\t\tprimeraVez2=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(pause) {\n\t\t\t\t\t//que se detenga el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\t\thandler.getGame().pauseState=new PauseState(handler);\n\t\t\t\t\tpause=false;\n\t\t\t\t\tState.setState(handler.getGame().pauseState);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//que avance el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(false);\n\t\t\t\t\t\n\t\t\t\t\tworld.tick();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Si se ha acabado el tiempo\n\t\t\t\tif(handler.getGame().tiempoRestante==0) {\n\t\t\t\t\t//Y el player 2 tiene mas vida, gana player 2\n\t\t\t\t\tif(handler.getWorld().getEntityManager().getPlayer_1().getVida()<\n\t\t\t\t\t handler.getWorld().getEntityManager().getPlayer_2().getVida()) {\n\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t}\n\t\t\t\t\t//Y el player 1 tiene mas vida, gana el player 1\n\t\t\t\t\telse {\n\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t}\n\t\t\t\t\tfinRonda=true;\n\t\t\t\t}\n\t\t\t\t//Player 2 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Player 1 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SUMAR LOS PUNTOS AL JUGADOR QUE CORRESPONDA SI HA TERMINADO LA RONDA\n\t\t\t\tif(finRonda) {\n\t\t\t\t\t//Si ha ganado la ronda el jugador 1, se le suman los puntos por tiempo y vida\n\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_1().getVida()*10;\n\t\t\t\t\t\t//Bonus de dificutad:\n\t\t\t\t\t\tif (handler.getGame().mode == 1) {\n\t\t\t\t\t\t\tif (handler.getGame().getDificultad() == 1 || handler.getGame().getDificultad() == 3) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.2;\n\t\t\t\t\t\t\t\tpuntosVital*=1.2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (handler.getGame().getDificultad() == 2) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.4;\n\t\t\t\t\t\t\t\tpuntosVital*=1.4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(resultado==2) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_2().getVida()*10;\n\t\t\t\t\t}\n\t\t\t\t\tmsjGanador=true;\n\t\t\t\t\tif(mode==1) {\n\t\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(19);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(20);\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}\n\t\t\t\n\t\t}\n\t\t//Si ha terminado la pelea y se muestran las caras reventadas\n\t\telse {\n\t\t\ttiempoVS--;\n\t\t\tif(tiempoVS<=0) {\n\t\t\t\ttiempoVS=250;\n\t\t\t\tif(mode==2) {\n\t\t\t\t\thandler.getGame().setPuntos1(0);\n\t\t\t\t\thandler.getGame().setPuntos2(0);\n\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\tState.setState(handler.getGame().selectFighterState2);\n\t\t\t\t}\n\t\t\t\telse if(mode==1) {\n\t\t\t\t\t//Si ha ganado la CPU se guarda el score\n\t\t\t\t\tif(mostrarScoreLose) {\n\t\t\t\t\t\tState ScoreState = new ScoreState(handler,fighter1,false);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(0);\n\t\t\t\t\t\tState.setState(ScoreState);\n\t\t\t\t\t}\n\t\t\t\t\t//Si se termina el modo historia se guarda el score\n\t\t\t\t\telse if(mostrarScoreWin) {\n\t\t\t\t\t\tState EndGameState = new EndGameState(handler,fighter1,false);\n\t\t\t\t\t\tif(fighter1==0) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(7);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fighter1==1) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tAssets.initAssets_EndGameState();\n\t\t\t\t\t\tState.setState(EndGameState);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tState selectFighterState1=new SelectFighterState1(handler,fighterToSelectFighter);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\t\tState.setState(selectFighterState1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(mode==3) {\n\t\t\t\t\thandler.getGame().finPeleaDemo=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void run()\n\t\t{\n\t\t\ttimerRunning = true;\n\t\t\tdate = new Date();\n\t\t\tstartTime = date.getTime();\n\t\t\tendTime = startTime + planet.getTimeMS();\n\t\t\tbuttonPanel.getTimeLabel().setText(\"Time: \" + planet.getTimeMS()/1000 + \" s\");\n\n\t\t\twhile(timerRunning)\n\t\t\t{\n\t\t\t\tdate = new Date();\n\t\t\t\tnowTime = date.getTime();\n\n\t\t\t\t// If the countdown has reached 0 (or less)\n\t\t\t\t// Stop the timer and other threads and end the game\n\t\t\t\tif(nowTime >= endTime)\n\t\t\t\t{\n\t\t\t\t\tstopTimer();\n\t\t\t\t\tbuttonPanel.getTimeLabel().setText(\"Time: 0 s\");\n\t\t\t\t\tstopThreads();\n\t\t\t\t\tJOptionPane.showMessageDialog(lander,\"Sorry, you ran out of time.\\nGame Over!\", \"Ran Out Of Time\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\tendGame();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbuttonPanel.getTimeLabel().setText(\"Time: \" + (endTime-nowTime)/1000 + \" s\");\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedException e) {}\n\t\t\t}\n\t\t}", "public void update(double dt, double fX, double fY){\n\n\t\tdouble aX = fX/mass;\n\t\tdouble aY = fY/mass;\n\n\t\tdouble xxNewVel = dt*aX;\n\t\tdouble yyNewVel = dt*aY;\n\n\n\t\txxVel = xxVel + xxNewVel;\n\t\tyyVel = yyVel + yyNewVel;\n\n\t\txxPos += dt*xxNewVel;\n\t\tyyPos += dt*yyNewVel;\n\t}", "@Override\n public void run() {\n long previousTime = System.currentTimeMillis();\n long timeSinceLastTick = 0L;\n long timeSinceLastDisplayFrame = 0L;\n\n final double millisecondsPerDisplayFrame = 1000.0 / DISPLAY_FPS;\n\n while (this.game.isRunning() && !this.game.isGameOver()) {\n long currentTime = System.currentTimeMillis();\n long elapsedTime = currentTime - previousTime;\n timeSinceLastTick += elapsedTime;\n timeSinceLastDisplayFrame += elapsedTime;\n\n if (timeSinceLastTick >= MILLISECONDS_PER_TICK) { // Check if enough time has passed to update the physics.\n this.updatePhysics(); // Perform one 'step' in the game.\n timeSinceLastTick = 0L;\n }\n if (timeSinceLastDisplayFrame >= millisecondsPerDisplayFrame) { // Check if enough time has passed to refresh the display.\n this.game.notifyListeners(timeSinceLastTick); // Tell the asteroids panel that it should refresh.\n timeSinceLastDisplayFrame = 0L;\n }\n\n previousTime = currentTime;\n }\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\ttry {\r\n\t\t\t\tChrono chrono = ChronoFactory.getInstance().getChrono();\r\n\t\t\t\tname=name+\"_\"+chrono.getId();\r\n\t\t\t\tlong startTime = Double.valueOf(Math.random()*1000).longValue();\r\n\t\t\t\tSystem.out.println(name+\" : startTime=\"+startTime);\r\n\t\t\t\tThread.sleep(startTime);\r\n\t\t\t\tchrono.start();\r\n\t\t\t\tThread.sleep(500);\r\n\t\t\t\tchrono.stop();\r\n\t\t\t\tSystem.out.println(name+\" : Duration=\"+chrono.getDuration());\r\n\t\t\t\tChronoFactory.getInstance().returnChrono(chrono);\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalStateException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n public void periodic() {\n if(m_Turret.OnTarget()){\n velocity = calculateRPMs();\n pidController.setReference(velocity, ControlType.kVelocity);\n SmartDashboard.putNumber(\"shooter Desired velocity\", velocity );\n SmartDashboard.putNumber(\"shooter Actual velocity\", encoder.getVelocity());\n \n if(atRPM() && accumulator > 100){\n m_Indexer.shooting();\n hasShot = true;\n }\n }else{\n accumulator = 0;\n if(hasShot){\n m_Indexer.endShooting();\n hasShot = false;\n }\n }\n\n SmartDashboard.putBoolean(\"shooter at rpm\", atRPM() && accumulator > 100);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tCalculateGravity gravity = new CalculateGravity();\n\t\t\t\t\t\tgravity.startAutomaticGravity();\n\t\t\t\t\t}", "public static void main(String[] args) {\n double T = Double.parseDouble(args[0]);\n double dt = Double.parseDouble(args[1]);\n String filename = args[2];\n Planet[] planets = readPlanets(filename);\n double radius = readRadius(filename);\n\n //Drawing the background\n String imageToDraw = \"images/starfield.jpg\";\n StdDraw.setScale(-radius, radius);\n StdDraw.picture(0, 0, imageToDraw);\n\n //Drawing all of the planets\n for(Planet p : planets) {\n p.draw();\n }\n\n //Enabling double buffering\n StdDraw.enableDoubleBuffering();\n\n //Creating animation\n for(double t=0; t<=T; t+=dt){\n double[] xForces = new double[planets.length];\n double[] yForces = new double[planets.length];\n\n /**\n * Calculating the net x and y forces for\n * each planet and storing in the arrays respectively\n */\n for(int i=0; i<planets.length; i++) {\n xForces[i] = planets[i].calcNetForceExertedByX(planets);\n yForces[i] = planets[i].calcNetForceExertedByY(planets);\n }\n\n //Updating each planets\n for(int i=0; i<planets.length; i++) {\n planets[i].update(dt, xForces[i], yForces[i]);\n }\n\n //Drawing background image\n StdDraw.picture(0, 0, imageToDraw);\n \n //Drawing all planets\n for(Planet p : planets) {\n p.draw();\n }\n\n //Showing offscreen buffer and setting pause 10 ms\n StdDraw.show();\n StdDraw.pause(10);\n }\n \n //Printing the universe\n StdOut.printf(\"%d\\n\", planets.length);\n StdOut.printf(\"%.2e\\n\", radius);\n for (int i = 0; i < planets.length; i++) {\n StdOut.printf(\"%11.4e %11.4e %11.4e %11.4e %11.4e %12s\\n\",\n planets[i].xxPos, planets[i].yyPos, planets[i].xxVel,\n planets[i].yyVel, planets[i].mass, planets[i].imgFileName); \n}\n }", "@Override\n public void teleopPeriodic() {\n double triggerVal = \n (m_driverController.getTriggerAxis(Hand.kRight)\n - m_driverController.getTriggerAxis(Hand.kLeft))\n * RobotMap.DRIVING_SPEED;\n\n double stick = \n (m_driverController.getX(Hand.kLeft))\n * RobotMap.TURNING_RATE;\n \n m_driveTrain.tankDrive(triggerVal + stick, triggerVal - stick);\n\n if(m_driverController.getAButton()){\n m_shooter.arcadeDrive(RobotMap.SHOOTER_SPEED, 0.0);\n }\n \n else{\n m_shooter.arcadeDrive(0.0, 0.0);\n }\n \n }", "public void runSimulation(WorldDescription world, boolean startPaused) {\r\n \t\tPhysicsLogger.setDefaultLoggingLevel();\r\n \t\t/* Create the simulation*/\r\n \t\tfinal PhysicsSimulation simulation = PhysicsFactory.createSimulator();\r\n \t\t\r\n \t\t/*Set ATRON robot to simulation and assign default controller to it*/\r\n \t\tATRON atron = new ATRON(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new ATRONControllerDefault() {\r\n \t\t\t\t\tpublic void activate() {\r\n \t\t\t\t\t\t//delay(10000);\r\n \t\t\t\t\t\tsuper.activate();\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\tatron.setGentle();// Currently builder supports only this type of ATRON\r\n \t\t//atron.setRubberRing();\r\n \t\tsimulation.setRobot(atron,\"ATRON\");\r\n \t\tsimulation.setRobot(atron,\"ATRON rubberRing gentle\");\r\n \t\tsimulation.setRobot(atron,\"default\");\r\n \t\t\r\n \t\t/*Set MTRAN robot to simulation and assign default controller to it*/\r\n \t\tsimulation.setRobot(new MTRAN(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new MTRANControllerDefault() {\r\n \t\t\t\t\tpublic void activate() {\r\n \t\t\t\t\t\t//delay(10000);\r\n \t\t\t\t\t\tsuper.activate();\r\n \t\t\t\t\t}\r\n \t\t\t\t};\r\n \t\t\t}},\"MTRAN\");\r\n \t\t\r\n \t\t/*Set different Odin modules to simulation and assign default controllers to them */\r\n \t\tsimulation.setRobot(new OdinMuscle(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault() {\r\n \t\t\t\t\tpublic void activate() {\r\n \t\t\t\t\t\t//delay(10000);\r\n \t\t\t\t\t\tsuper.activate();\r\n \t\t\t\t\t}\r\n \t\t\t\t};\r\n \t\t\t}},\"OdinMuscle\");\r\n \t\tsimulation.setRobot(new OdinWheel(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinWheel\");\r\n \t\tsimulation.setRobot(new OdinHinge(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinHinge\");\r\n \r\n \t\tsimulation.setRobot(new OdinBattery(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinBattery\");\r\n \r\n \t\tsimulation.setRobot(new OdinBall(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinBall\");\r\n \r\n \t\tsimulation.setRobot(new OdinSpring(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinSpring\");\r\n \r\n \t\tsimulation.setRobot(new OdinTube(){\r\n \t\t\tpublic Controller createController() {\r\n \t\t\t\treturn new OdinControllerDefault();\r\n \t\t\t}},\"OdinTube\");\t\r\n/*\t\t simulation.setRobot(new CKBotStandard(){\r\n \t \tpublic Controller createController() {\r\n \t \t\treturn new CKBotControllerDefault();\r\n\t \t}},\"CKBotStandard\");*/\r\n \t\t\r\n /*Create the world description of simulation and set it to simulation*/\r\n \t\tif(world==null) world = createWorld()\r\n \t\t;\r\n \t\tsimulation.setWorld(world);\r\n \t\t/*Simulation should be in paused state (static)in the beginning*/\r\n \t\tsimulation.setPause(startPaused);\r\n \t\t/* Start the simulation*/\r\n \t\tsimulation.start();\r\n \t}", "public static void run()\r\n\t{\r\n\t\tlong lastTime = System.nanoTime();\r\n\t\tdouble nsPerTick = 1000000000D / 30D;\r\n\t\t\r\n\t\tlong lastTimer = System.currentTimeMillis();\r\n\t\tdouble delta = 0; \r\n\r\n\t\twhile(isRunning)\r\n\t\t{\r\n\t\t\tlong now = System.nanoTime();\r\n\t\t\tdelta += (now - lastTime) / nsPerTick;\r\n\t\t\tlastTime = now;\r\n\t\t\t\r\n\t\t\twhile(delta >= 1)\r\n\t\t\t{\r\n\t\t\t\tdisplay.update();\r\n\t\t\t\tdisplay.render();\r\n\t\t\t\tdelta -= 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(System.currentTimeMillis() - lastTimer > 1000)\r\n\t\t\t{\r\n\t\t\t\tlastTimer += 1000;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }", "protected abstract void update(double deltaTime);", "private void step() {\n // Set up the times\n loopTime += calcFreq;\n t += dt*speedSlider.getValue();\n simDate.setTime(loopTime);\n \n if (loopTime % 250 == 0) {\n timeField.setValue(simDate);\n }\n \n mainPanel.repaint();\n \n // Check for collisions\n ArrayList<Body> toBeRemoved = new ArrayList<>();\n for (Body b1 : bodies) {\n for (Body b2 : bodies) {\n if (b1 != b2 && areTouching(b1, b2)) {\n Body big = b1.mass > b2.mass ? b1 : b2;\n Body small = b1 == big ? b2 : b1;\n \n if (toBeRemoved.contains(small)) {\n continue;\n } else {\n toBeRemoved.add(small);\n }\n \n double newvx = (big.state.vx*big.mass+small.state.vx*small.mass)/(big.mass+small.mass);\n double newvy = (big.state.vy*big.mass+small.state.vy*small.mass)/(big.mass+small.mass);\n double newvz = (big.state.vz*big.mass+small.state.vz*small.mass)/(big.mass+small.mass);\n double newden = (big.DENSITY*big.mass+small.DENSITY*small.mass)/(big.mass+small.mass);\n big.mass += small.mass;\n big.DENSITY = newden;\n big.setRadiusFromMass();\n big.state.vx = newvx;\n big.state.vy = newvy;\n big.state.vz = newvz;\n }\n }\n \n // Check for out of bounds\n if (!toBeRemoved.contains(b1)) {\n if (Math.abs(b1.state.x) > cubeL || Math.abs(b1.state.y) > cubeL\n || Math.abs(b1.state.z) > cubeL/2) {\n toBeRemoved.add(b1);\n }\n }\n }\n \n // Remove all that need to be removed\n for (Body b : toBeRemoved) {\n bodies.remove(b);\n totalBodiesCounter.setText(\"\"+bodies.size());\n bodiesComboBox.removeItem(b.name);\n }\n \n // Calculate the next position\n for (Body b : bodies) {\n if (b.moveable) {\n b.nextState.x = b.state.x;\n b.nextState.y = b.state.y;\n b.nextState.z = b.state.z;\n b.nextState.vx = b.state.vx;\n b.nextState.vy = b.state.vy;\n b.nextState.vz = b.state.vz;\n \n b.updateBody(t, dt*speedSlider.getValue());\n if (pathsComboBox.getSelectedItem().equals(\"Lines\") && loopTime % 20 == 0) {\n b.addPos();\n } else if (pathsComboBox.getSelectedItem().equals(\"Dots\") && loopTime % 100 == 0) {\n b.addPos();\n }\n }\n }\n \n // Set each next position\n for (Body b : bodies) {\n if (b.moveable) {\n b.state.x = b.nextState.x;\n b.state.y = b.nextState.y;\n b.state.z = b.nextState.z;\n b.state.vx = b.nextState.vx;\n b.state.vy = b.nextState.vy;\n b.state.vz = b.nextState.vz;\n }\n }\n \n // Update the edit window\n Body bufferedBody = selectedBody;\n if (bufferedBody != null) {\n if (loopTime % 50 == 0) {\n xFieldEdit.setValue(bufferedBody.state.x);\n yFieldEdit.setValue(bufferedBody.state.y);\n zFieldEdit.setValue(bufferedBody.state.z);\n vxFieldEdit.setValue(bufferedBody.state.vx);\n vyFieldEdit.setValue(bufferedBody.state.vy);\n vzFieldEdit.setValue(bufferedBody.state.vz);\n massFieldEdit.setValue(bufferedBody.mass);\n radiusFieldEdit.setValue(bufferedBody.r);\n }\n \n // Follow the body\n if (followBodyButton.isSelected()) {\n setWindowToBody(bufferedBody);\n }\n }\n }", "protected void execute() {\n \tshooterWheel.shooterWheelSpeedControllerAft.Pause();\n \tshooterWheel.shooterWheelSpeedControllerFwd.Pause();\n \t\n }", "public void run() {\r\n\t\t\t\t\r\n\t\t\t\tdouble t=0; //setting the time = 0\r\n\t\t\t\tdouble Vt = g / (4*Pi*bSize*bSize*k); // Terminal velocity\r\n\t\t\t\tdouble Vox = Vo*Math.cos(theta*Pi/180); // X component of initial velocity\r\n\t\t\t\tdouble Voy=Vo*Math.sin(theta*Pi/180); // Y component of initial velocity\r\n\t\t\t\t\r\n\t\t\t\tdouble Vx; \r\n\t\t\t\tdouble Vy;\r\n\t\t\t\t\r\n\t\t\t\tdouble Xlast=0; //defining Xlast before the simulation\r\n\t\t\t\tdouble Ylast=0; //defining Ylast before the simulation\r\n\t\t\t\t\r\n\t\t\t\tdouble KEx = 0.5*Vox*Vox; //Kinetic energy in X direction\r\n\t\t\t\tdouble KEy = 0.5*Voy*Voy; //Kinetic energy in Y direction\r\n\t\t\t\t\r\n\t\t\t\tdouble KExx =KEx; \r\n\t\t\t\tdouble KEyy = KEy;\r\n\t\t\t\t\r\n\t\t\t\tdouble X= 0;\r\n\t\t\t\tdouble Y;\r\n\t\t\t\t\r\n\t\t\t\tint ScrX;\r\n\t\t\t\tint ScrY;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\twhile (SIMRunning) { //start of the simulation loop\r\n//\t\t\t\tif(bSim.keepGoing) {\r\n\t\t\t\t\r\n\t\t\t\tX = Vox*Vt/g*(1-Math.exp(-g*t/Vt)) + Xi; // X position during simulation\r\n\t\t\t\tY = (bSize + Vt/g*(Voy+Vt)*(1-Math.exp(-g*t/Vt))-Vt*t); // Y position during simulation\r\n\t\t\t\t\r\n\t\t\t\tVy=(Y-Ylast)/DELTA;// Estimate Vy from difference\r\n\t\t\t\tVx = (X-Xlast)/DELTA; // Estimate Vx from difference\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tif (Vy<0 && Y<=bSize) { //when collision is detected \r\n\t\t\t\t\t\tKExx=KEx;\r\n\t\t\t\t\t\tKEyy=KEy;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tKEx = 0.5*Vx*Vx*(1-loss); //change of the kinetic energy in X direction\r\n\t\t\t\t\t\tKEy = 0.5*Vy*Vy*(1-loss); //change of the kinetic energy in Y direction\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t if(Vox<0) {\r\n\t\t\t\t\t\t\tVox = -Math.sqrt(KEx*2); //X component of initial velocity affected by the loss of energy\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t else {\r\n\t\t\t\t\t\t\tVox = Math.sqrt(KEx*2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tVoy = Math.sqrt(KEy*2); //Y component of initial velocity affected by the loss of energy\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tt=0;\r\n\t\t\t\t\t\tXi = X; // change of Xinit for the next parabola\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t//display updates\r\n\t\t\t\tScrX = (int) ((X-bSize)*SCALE);\r\n\t\t\t\tScrY = (int) (HEIGHT-(Y+bSize)*SCALE);\r\n\t\t\t\tmyBall.setLocation(ScrX,ScrY);\r\n\t\t\t\t\t\r\n\t\t\t\tXlast=X;\r\n\t\t\t\tYlast=Y;\r\n\t\t\t\tt += DELTA;\t\t\r\n\t\t\t\r\n\t\t\t//if the TracePoint method from bSim equals to true\r\n\t\t\t//trace the trajectory\r\n\t\t\tif(link.getTracePoint()) {\r\n\t\t\t\tdotTrace(X,Y);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ((KEx+KEy)<ETHR || (KEx+KEy)>(KExx+KEyy)) {\t//condition to break\t\r\n\t\t \t SIMRunning=false;\t\t//state of the simulation\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(50); //pause for 50 milliseconds\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcatch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\t//}\r\n//\t\t\tif((KEx+KEy)>ETHR && (KExx+KEyy>=(KEx+KEy)));\r\n//\t\t\t\tSIMRunning = false; //state of the simulation \r\n\t\t\r\n\t}", "public void tick()\r\n\t{\r\n\t\tduration = (int) (((Sys.getTime() - lastCall) * resolution) / Sys\r\n\t\t\t\t.getTimerResolution());\r\n\t\tlastCall = Sys.getTime();\r\n\t}", "void tick();", "void tick();", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "@Override\n protected void execute() {\n \n //get velocity from SmartDashboard\n double m_sideVelocity = SmartDashboard.getNumber(\"Side Velocity\", 0);\n double m_beltVelocity = SmartDashboard.getNumber(\"Belt velocity\", 0);\n // if velocity coefficients on SmartDashboard have changed, write new values to controller\n \n Robot.CD7.setSideMotor(m_sideVelocity);\n Robot.CD7.setBeltMotor(m_beltVelocity);\n }", "public static void main(String[] args) {\n CarModel carMod = new CarModel();\n\n carMod.addCar(new Volvo240());\n carMod.addCar(new Saab95());\n carMod.addCar(new Scania());\n\n TimerListener timeList = new TimerListener(carMod);\n\n //Create ControlPanel, CarView, AnimationPanel\n CarControlPanel cPanel = new CarControlPanel();\n AnimationPanel drawPanel = new DrawPanel(800, 455);\n\n AddRemoveCarPanel arcPanel = new AddRemoveCarPanel();\n ControlPanel casPanel = new CarSpeedPanel(timeList);\n CarView carView = new CarView(\"CarSim 1.0\", cPanel, drawPanel, arcPanel);\n carView.add(casPanel); //TODO nice.\n carView.setBackground(Color.LIGHT_GRAY);\n //subscribe to the Observable\n casPanel.subscribe(timeList);\n cPanel.subscribe(timeList);\n drawPanel.subscribe(timeList);\n\n //Add the observer(s)\n timeList.add(casPanel);\n timeList.add(cPanel);\n timeList.add(drawPanel);\n\n\n CarController cc = new CarController(carView, carMod, cPanel);\n //carView.subscribe(timeList);\n\n //Set the Timer in the CarController to: delay, and our TimerListener\n cc.setTimer(new Timer(cc.getDelay(), timeList));\n cc.getTimer().start();\n }", "@Override\n\tpublic void SimulaSe(int DiffTime) {\n\n\t\tX+=velx*DiffTime/1000.0f;\n\t\tY+=vely*DiffTime/1000.0f;\n\t\ttimerColisaoMeteoro+=DiffTime;\n\t//\tSystem.out.println(+this.dx+\" \"+this.dy+\" \"+Y+\" \"+X);\n\t\t boolean aux=false;\n\t\t \n\t\t\tif (typ==1) { //tiro da nave\n\t\t\t\t\n\t\t\t\tfor (int i =0;i<CanvasGame.listadeagentes.size();i++) {\n\t\t\t\t\tInimigo ag = (Inimigo)CanvasGame.listadeagentes.get(i);\n\t\t\t\tif (Constantes.colidecircular(X, Y, sizeX, ag.X+ag.sizeX/2, ag.Y+ag.sizeY/2, ag.sizeY/2)) {\n\t\t\t\t\t\taux=true;\n\t\t\t\t\t\tCanvasGame.listadeagentes.get(i).vida-=2*Constantes.DANO_TIRO;\n\t\t\t\t\t\tCanvasGame.gerenciadorEfeitos.ganhouXp( (int)X, (int)Y,Constantes.DANO_TIRO);\n\t\t\t\t\t\t//GamePanel.minhaNave.evoluiu();\n\t\t\t\t\t\tCanvasGame.minhaNave.gerenciaXP();\n//\t\t\t\t\t\tCanvasGame.gerenciadorEfeitos.explosao(ag.X+ag.sizeX/4,ag.Y+ag.sizeY/4,-velx,vely);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tfor (int i =0;i<CanvasGame.listadeMeteoro.size();i++) {\n\t\t\t\t\tMeteoro ag = (Meteoro)CanvasGame.listadeMeteoro.get(i);\n\t\t\t\tif (Constantes.colidecircular(X-sizeX/2, Y-sizeY/2, sizeX/2, ag.X+ag.sizeX/2, ag.Y+ag.sizeY/2, ag.sizeY/2)) {\n\t\t\t\t\t\taux=true;\n\t\t\t\t\t\tag.colidiu(this);\n\t\n\t\t\t\t\t\tCanvasGame.gerenciadorEfeitos.ganhouXp( (int)X, (int)Y,ag.XP);\n\t\t\t\t\t\tCanvasGame.minhaNave.gerenciaXP();\n\t\t\t\t\t\t//GamePanel.minhaNave.evoluiu();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\n\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\tif (typ==2) { //tiro dos inimigos\n\t\t\t\t\n//\t\t\t\tfor (int i =0;i<GamePanel.listadeagentes.size();i++) {\n//\t\t\t\t\tMeuAgente ag = (MeuAgente)GamePanel.listadeagentes.get(i);\n\t\t\t\tif (Constantes.colidecircular(X-sizeX/2, Y-sizeY/2, sizeX/2, CanvasGame.minhaNave.X+CanvasGame.minhaNave.sizeX/2, CanvasGame.minhaNave.Y+CanvasGame.minhaNave.sizeY/2, 10)) {\n\t\t\t\t\t\taux=true;\n\t\t\t\t\t\tCanvasGame.minhaNave.life-=Constantes.DANO_TIRO;\n\t\t\t\t\t}\n\t\t\t\tfor (int i =0;i<CanvasGame.listadeMeteoro.size();i++) {\n\t\t\t\t\tMeteoro ag = (Meteoro)CanvasGame.listadeMeteoro.get(i);\n\t\t\t\tif (!bateuMeteoro&&Constantes.colidecircular(X, Y, sizeX/2, ag.X, ag.Y, ag.sizeX/2)) {\n\t\t\t\t\t\n\t\t\t\t\t\tag.colidiu(this);\n\n\t\t\t\t\t\t//GamePanel.minhaNave.evoluiu();\n\t\t\t\t\t\tbateuMeteoro=true;\n\t\t\t\t\t\ttimerColisaoMeteoro=0;\n\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}\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\tif (X>GamePanel.PWIDTH+GamePanel.PWIDTH/8||X<-GamePanel.PWIDTH/8||Y<-GamePanel.PHEIGHT/8||Y>GamePanel.PHEIGHT+GamePanel.PWIDTH/8) \n\t\t\tvivo=false;\t\n\t\t\n\t\t\n\t\tif (aux) EXPLODIU=true;\n\t\t\n\t\tif(EXPLODIU){\n\t\t\tParticula part;\n\t\t\t\tfor(int B = 0; B < 100;B++){\n\t\t\t\t\tint modv = -GamePanel.rnd.nextInt(200)+50;\n\t\t\t\t\t\n\t\t\t\t\tint pvx = 0;\n\t\t\t\t\tint pvy = 0;\n\t\t\t\t\n\t\t\t\t\t\tpvx = velx + modv;\n\t\t\t\t\t\tpvy = vely - modv;\n\n\t\t\t\t\t\n\t\t\t\t\tpvx = (int)(pvx*(0.4+0.25*GamePanel.rnd.nextFloat()));\n\t\t\t\t\tpvy = (int)(pvy*(0.4+0.25*GamePanel.rnd.nextFloat()));\n\t\t\t\t\t\n\t\t\t\t\tif(B%2==0){\n\t\t\t\t\t\tcor = Color.red;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcor = Color.cyan;\n\t\t\t\t\t}\n//\t\t\t\t\tif (B%4==0) {\n\t\t\t\t\t\tpart = (Particula)new Faisca(X,Y,pvx/4,pvy/4,GamePanel.rnd.nextInt(300)+100,cor);\n//\t\t\t\t\t}else {\n//\t\t\t\t\t\tpart = (Particula)new Faisca(X,Y,-pvx/4,-pvy/4,GamePanel.rnd.nextInt(400)+100,cor);\n//\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCanvasGame.particulas.add(part);\n\t\t\t\t\tvivo = false;\n\t\t\t\t}\n\t\n\t\t\n\t\t}\n\n\n\t}", "public void update (float dTime)\n\t{\n\t\t\n\t\tfor (ColliderPair<ColliderEntity> pairs : mRepo.getColliderPairs())\n\t\t{\n\t\t\tif (\tpairs.getFirst().isActive() && \n\t\t\t\t\tFamilies.FRICTION.matches(pairs.getFirst().getEntity()) &&\n\t\t\t\t\thasFriction(pairs.getFirst(), pairs.getSecond()))\n\t\t\t{\n\t\t\t\tVector3 friction = computeFriction(pairs.getFirst(), pairs.getSecond(), dTime);\n\t\t\t\tForce activeForce = CompoMappers.FORCE.get(pairs.getFirst().getEntity());\n\t\t\t\tactiveForce.add(friction);\n\t\t\t}\n\n\t\t\tif (\tpairs.getSecond().isActive() &&\n\t\t\t\t\tFamilies.FRICTION.matches(pairs.getSecond().getEntity()) &&\n\t\t\t\t\thasFriction(pairs.getSecond(), pairs.getFirst()))\n\t\t\t{\n\t\t\t\tVector3 friction = computeFriction(pairs.getSecond(), pairs.getFirst(), dTime);\n\t\t\t\tForce activeForce = CompoMappers.FORCE.get(pairs.getSecond().getEntity());\n\t\t\t\tactiveForce.add(friction);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void update(float dt) {\n\t\t\n\t}", "private void updatePhysics ( ECSEntity entity, long t )\n {\n // Constants.\n \n final double SCREEN_HEIGHT = 600.0;\n final double FRICTION_COEFFICIENT = 0.0001 / SCREEN_HEIGHT;\n final double ACCELERATION = 0.001 / SCREEN_HEIGHT;\n \n // Initialize working variables.\n \n double ax = 0.0;\n double ay = 0.0;\n \n // Retrieve the entity's components.\n \n this.transform = ( ComponentTransform ) entity.getComponent ( Constants.COMPONENT_TRANSFORM );\n this.physics = ( ComponentPhysics ) entity.getComponent ( Constants.COMPONENT_PHYSICS );\n \n // Initialize working variables.\n \n Vector2D a = new Vector2D ( this.physics.acceleration );\n Vector2D v = new Vector2D (); \n Vector2D d = new Vector2D ();\n Vector2D u = new Vector2D ();\n Vector2D dUp = new Vector2D ( 0.0, 1.0 );\n Vector2D dDown = new Vector2D ( 0.0, -1.0 );\n Vector2D dRight = new Vector2D ( 1.0, 0.0 );\n Vector2D dLeft = new Vector2D ( -1.0, 0.0 );\n double p = FRICTION_COEFFICIENT;\n double vMax = this.physics.vMax;\n \n // Calculate velocity.\n \n v.setVector ( a.scale ( t ) ); // Acceleration: a = v/t ↔ v = a·t (Newtonian acceleration).\n \n // Apply accelerator.\n \n if ( v.magnitude() < vMax / t )\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.add ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.add ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.add ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.add ( dLeft.scale ( ACCELERATION ) ) ); } \n } \n else\n { \n if ( this.physics.accelerateUp ) { a.setVector ( a.subtract ( dUp.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateDown ) { a.setVector ( a.subtract ( dDown.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateRight ) { a.setVector ( a.subtract ( dRight.scale ( ACCELERATION ) ) ); }\n if ( this.physics.accelerateLeft ) { a.setVector ( a.subtract ( dLeft.scale ( ACCELERATION ) ) ); }\n }\n \n // Calculate displacement. ( Distance to move in this time slice ).\n \n d.setVector ( v.scale ( t ) ); // Velocity: v = d/t ↔ d = v·t (Newtonian velocity).\n \n // Apply friction coefficient.\n \n double a2 = 4.0; // Friction amplifier. Used to speed up lateral deceleration, which improves the sense of control response experienced by the user.\n \n ax = a.getX ();\n ay = a.getY ();\n \n if ( this.physics.accelerateUp || this.physics.accelerateDown )\n {\n // If the user is currently accelerating up or down, then use the friction amplifier to speed up deceleration along the horizontal axis.\n \n if ( ax < 0 ) ax += p*a2;\n if ( ax > 0 ) ax -= p*a2;\n if ( ay < 0 ) ay += p;\n if ( ay > 0 ) ay -= p;\n }\n else if ( this.physics.accelerateLeft || this.physics.accelerateRight )\n {\n // If the user is currently accelerating left or right, then use the friction amplifier to speed up deceleration along the vertical axis.\n \n if ( ax < 0 ) ax += p;\n if ( ax > 0 ) ax -= p;\n if ( ay < 0 ) ay += p*a2;\n if ( ay > 0 ) ay -= p*a2;\n }\n else\n {\n // If the user is not accelerating in any direction, then just apply the normal friction coefficient in all direction.\n \n if ( ax < 0 ) { ax += p; if ( ax > 0.0 ) ax = 0.0; }\n if ( ax > 0 ) { ax -= p; if ( ax < 0.0 ) ax = 0.0; }\n if ( ay < 0 ) { ay += p; if ( ay > 0.0 ) ay = 0.0; }\n if ( ay > 0 ) { ay -= p; if ( ay < 0.0 ) ay = 0.0; }\n }\n \n a.setVector ( ax, ay );\n \n // Update physics.\n \n this.physics.acceleration.setVector ( a );\n this.physics.velocity.setVector ( v );\n \n // Update translation.\n \n this.transform.translation.setVector ( this.transform.translation.add ( d ) );\n }", "public void tick()\r\n\t{\r\n\t\tsuper.tick();\r\n\t\t\r\n\t\tswitch(state) {\r\n\t\tcase ENTERING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase STOPPED:\r\n\t\t\tif (speed() > 0) {\r\n\t\t\t\tsetSpeed(0);\r\n\t\t\t}\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\tcase EXITING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\t//turn();\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Check to see if enity has entered a box\r\n\t\tBox box = getBox();\r\n\t\tif( box != null){\r\n\t\t//check to see if the box contains the vehicle, and check ot see if the pedsetrian is already in the box\r\n\t\t//if so add it to the box\r\n\t\t\tif( box.insideBox(this) && !inBox && state == State.EXITING){ \r\n\t\t\t\tbox.addEntity(this);\r\n\t\t\t\tinBox = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//Check for boundary crossing\r\n\t\tif ((x() < lane.road().getIntersection().getMinX() || x() > lane.road().getIntersection().getMaxX()) || (y() < lane.road().getIntersection().getMinY() || y() > lane.road().getIntersection().getMaxY())) {\r\n\t\t\tlane.removePedestrian(this);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void preStep(float invDT) {\r\n\r\n\t\t// calculate the spring's vector (pointing from body1 to body2) and length\r\n\t\tspring = new Vector2f(body2.getPosition());\r\n\t\tspring.add(r2);\r\n\t\tspring.sub(body1.getPosition());\r\n\t\tspring.sub(r1);\r\n\t\tspringLength = spring.length();\r\n\t\t\r\n\t\t// the spring vector needs to be normalized for applyImpulse as well!\r\n\t\tspring.normalise();\r\n\t\t\r\n\t\t// calculate the spring's forces\r\n\t\t// note that although theoretically invDT could never be 0\r\n\t\t// but here it can\r\n\t\tfloat springConst;\r\n\t\t\r\n\t\tif ( springLength < minSpringSize || springLength > maxSpringSize ) { \r\n\t\t\t// Pre-compute anchors, mass matrix, and bias.\r\n\t\t\tMatrix2f rot1 = new Matrix2f(body1.getRotation());\r\n\t\t\tMatrix2f rot2 = new Matrix2f(body2.getRotation());\r\n\t\r\n\t\t\tr1 = MathUtil.mul(rot1,localAnchor1);\r\n\t\t\tr2 = MathUtil.mul(rot2,localAnchor2);\r\n\t\t\t\r\n\t\t\t// the mass normal or 'k'\r\n\t\t\tfloat rn1 = r1.dot(spring);\r\n\t\t\tfloat rn2 = r2.dot(spring);\r\n\t\t\tfloat kNormal = body1.getInvMass() + body2.getInvMass();\r\n\t\t\tkNormal += body1.getInvI() * (r1.dot(r1) - rn1 * rn1) + body2.getInvI() * (r2.dot(r2) - rn2 * rn2);\r\n\t\t\tmassNormal = 1 / kNormal;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// The spring is broken so apply force to correct it\r\n\t\t\t// note that we use biased velocities for this\r\n\t\t\tfloat springImpulse =\r\n\t\t\t\tinvDT != 0 ? brokenSpringConst * (springLength - springSize) / invDT : 0;\r\n\t\t\t\r\n\t\t\tVector2f impulse = MathUtil.scale(spring, springImpulse);\r\n\t\t\tbody1.adjustBiasedVelocity(MathUtil.scale(impulse, body1.getInvMass()));\r\n\t\t\tbody1.adjustBiasedAngularVelocity((body1.getInvI() * MathUtil.cross(r1, impulse)));\r\n\r\n\t\t\tbody2.adjustBiasedVelocity(MathUtil.scale(impulse, -body2.getInvMass()));\r\n\t\t\tbody2.adjustBiasedAngularVelocity(-(body2.getInvI() * MathUtil.cross(r2, impulse)));\r\n\t\t\t\r\n\t\t\tisBroken = true;\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t} else if ( springLength < springSize ) {\r\n\t\t\tspringConst = compressedSpringConst;\r\n\t\t\tisBroken = false;\r\n\t\t} else { // if ( springLength >= springSize )\r\n\t\t\tspringConst = stretchedSpringConst;\r\n\t\t\tisBroken = false;\r\n\t\t}\r\n\t\t\r\n\t\tfloat springImpulse =\r\n\t\t\tinvDT != 0 ? springConst * (springLength - springSize) / invDT : 0;\r\n\r\n\t\t// apply the spring's forces\r\n\t\tVector2f impulse = MathUtil.scale(spring, springImpulse);\r\n\t\tbody1.adjustVelocity(MathUtil.scale(impulse, body1.getInvMass()));\r\n\t\tbody1.adjustAngularVelocity((body1.getInvI() * MathUtil.cross(r1, impulse)));\r\n\r\n\t\tbody2.adjustVelocity(MathUtil.scale(impulse, -body2.getInvMass()));\r\n\t\tbody2.adjustAngularVelocity(-(body2.getInvI() * MathUtil.cross(r2, impulse)));\r\n\t}", "public void teleopPeriodic() {\n joystick1X = leftStick.getAxis(Joystick.AxisType.kX);\n joystick1Y = leftStick.getAxis(Joystick.AxisType.kY);\n joystick2X = rightStick.getAxis(Joystick.AxisType.kX);\n joystick2Y = rightStick.getAxis(Joystick.AxisType.kY);\n \n mapped1Y = joystick1Y/2 + 0.5;\n mapped1X = joystick1X/2 + 0.5;\n mapped2X = joystick2X/2 + 0.5;\n mapped2Y = joystick2Y/2 + 0.5;\n \n X1testServo.set(mapped1X);\n Y1testServo.set(mapped1Y);\n X2testServo.set(mapped2X);\n Y2testServo.set(mapped2Y);\n }", "protected abstract void tick();", "@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void update(double dt,double fX,double fY){\n\t\tdouble ax = fX/mass;\n\t\tdouble ay = fY/mass; \n\t\txxVel= xxVel + ax * dt;\n\t\tyyVel= yyVel + ay * dt;\n\t\txxPos = xxPos + xxVel * dt;\n\t\tyyPos = yyPos + yyVel * dt; \n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\tif(change_tempo){\r\n\t\t\t\t\t\t\t\t\t\t\tPatternMaker.changeSpeed(pattern, ratio);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tgotoPractice(pattern);\r\n\t\t\t\t\t\t\t\t\t}", "public void run() {\n R.autonomousCounter = 0;\n while ((Math.floor(R.autonomousCounter / loopsPerSecond)) <= DriveClass.seconds) {\n if (forward) {\n theRobot.drive(-robotDriveSpeed, gyro.getAngle() * gyroModifierSpeed);\n }else if (!forward) {\n theRobot.drive(robotDriveSpeed, gyro.getAngle() * gyroModifierSpeed);\n }\n Timer.delay(timerDelay);\t\n }\n theRobot.drive(0.0, 0.0);\n }", "public void run()\n\t\t{\n\t\t\tput(\"Hood Angle\", Robot.hood.getAngle());\n\t\t\tput(\"Turret Angle\", Robot.turret.getAngle());\n\t\t\ttry\n\t\t\t{\n\t\t\t\tput(\"DistanceFromCamera\", VisionServer.Data.get(\"DistanceFromCamera\"));\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\tput(\"DistanceFromCamera\", \"null\");\n\t\t\t}\n\t\t}", "public abstract void tick();", "protected void execute() {\n \t\n \tcurrent_time = System.currentTimeMillis();\n \t\n \tlift.liftDown(LIFT_SPEED);\n }", "@Override\n public void execute() {\n swerve.drive(0, 0, \n turnPID.calculate(swerve.getHeadingDouble(), angleSetpoint) * Constants.Swerve.kMaxAngularSpeed\n , false);\n }", "public void tick();", "public void tick();", "public void tick();", "protected void execute() {\n double rightSpeed, leftSpeed, x, y;\n //Set x and y to their axis values\n x = driver.getRawAxis(InputConstants.rightXAxis);\n y = driver.getRawAxis(InputConstants.leftYAxis);\n //Drive Smoothing\n\n //Set the left and rightspeed using x and y\n leftSpeed = y - x;\n rightSpeed = y + x;\n \n\n //Set the left and right side of the drive\n driveTrain.setLeftVBus(-leftSpeed);\n driveTrain.setRightVBus(-rightSpeed);\n\n\n\n }", "public void periodic() {\n useOutput(lEncoder.getVelocity(), setpoint);\n SmartDashboard.putNumber(\"LauncherSpeed in RPM\", lEncoder.getVelocity());\n SmartDashboard.putNumber(\"Launcher Current\", launcher1.getOutputCurrent());\n //setSetpoint(SmartDashboard.getNumber(\"LauncherSetpoint in RPM\", setpoint));\n SmartDashboard.putNumber(\"LauncherSetpoint in RPM\", setpoint);\n /*getController().setP(SmartDashboard.getNumber(\"Kp\", getController().getP()));\n getController().setI(SmartDashboard.getNumber(\"Ki\", getController().getI()));\n getController().setD(SmartDashboard.getNumber(\"Kd\", getController().getD()));\n SmartDashboard.putNumber(\"Kp\", getController().getP());\n SmartDashboard.putNumber(\"Ki\", getController().getI());\n SmartDashboard.putNumber(\"Kd\", getController().getD());*/\n SmartDashboard.putNumber(\"Launcher get\",launcher1.get());\n }", "void update(long dT);", "public void run(){\n\t\twhile(true){\n\n\t\t\ttry {\n\t\t\t\tsleep(200);\n\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// sleep mode\n\t\t\tif(isSuspended==true)\n\t\t\t\tsynchronized (this) {\n\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\twait();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t//movement\n\t\t\tif(isSuspended==false)\n\t\t\t{\n\n\t\t\t\tif(state.toString() == \"Satiated\"&&counter%Frequency==0&&(!Singleton.getInstance().getFood())){\n\t\t\t\t\tnew Hungry().SetState(this);\t\n\t\t\t\t\tnotifyObservers();\n\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\tcounter++;\n\n\t\t\t\t//checking food\n\t\t\t\tif(Singleton.getInstance().getFood() && state.toString() == \"Hungry\") //, set movement to the center\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbarrier.await();\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} catch (BrokenBarrierException 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\n\t\t\t\t\tv_old = Math.sqrt(x_speed*x_speed + y_speed*y_speed); \t\t\t\t\t\t\t\n\t\t\t\t\tdouble K = Math.abs( (double)(y_front - MyFrame.getHeight()/2) / (double)(x_front - MyFrame.getWidth()/2));\n\t\t\t\t\tv_hor_new = v_old / Math.sqrt(K*K+1);\t\t\t\t\t\n\t\t\t\t\tv_ver_new = v_hor_new * K;\t\t\t\t\t\t\t\t\t\t\t\n\n\n\t\t\t\t\twhile(Singleton.getInstance().getFood()==true)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsleep(200);\n\t\t\t\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(x_front>MyFrame.getWidth()/2)\n\t\t\t\t\t\t\tx_dir = -1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tx_dir=1;\n\t\t\t\t\t\tif(y_front>MyFrame.getHeight()/2)\n\t\t\t\t\t\t\ty_dir=-1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty_dir=1;\n\n\t\t\t\t\t\tx_front+=(int)v_hor_new*x_dir;\n\t\t\t\t\t\ty_front+=(int)v_ver_new*y_dir;\n\n\t\t\t\t\t\tif((Math.abs(x_front-MyFrame.getWidth()/2) <= 5) && (Math.abs(y_front-MyFrame.getHeight()/2) <= 5))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.eatInc();\n\t\t\t\t\t\t\tSingleton.getInstance().eatFood();\n\t\t\t\t\t\t\tnew Satiated().SetState(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMyFrame.repaint();\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse //no food\n\t\t\t\t{\n\t\t\t\t\tx_front+=x_speed*x_dir;\n\t\t\t\t\ty_front+=y_speed*y_dir;\n\t\t\t\t\tMyFrame.repaint();\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//check if direction changed\n\n\t\t\tif(x_front>=MyFrame.getWidth())\n\t\t\t{\n\t\t\t\tx_dir=-1;\n\n\t\t\t}\n\t\t\tif(y_front>=MyFrame.getHeight())\n\t\t\t{\n\t\t\t\ty_dir=-1;\n\n\t\t\t}\n\t\t\tif(x_front<=0)\n\t\t\t{\n\t\t\t\tx_dir=1;\n\n\t\t\t}\n\n\t\t\tif(y_front<=0)\n\t\t\t{\n\t\t\t\ty_dir=1;\n\n\t\t\t}\n\n\t\t\tMyFrame.repaint();\n\n\n\n\t\t}\n\n\t}", "@SuppressWarnings(\"static-access\")\n\t@Override\n\tpublic void run() \n\t{\n\t\tint currentdx = 0;\n\t\tint currentdy = 0;\n\t\twhile(currentdy < Math.abs(dy) || currentdx < Math.abs(dx))\n\t\t{\n\t\t\tif(time == 0)\n\t\t\t{\n\t\t\t\tif(dx < 0 || dy < 0){\n\t\t\t\tdy = -dy;\n\t\t\t\tdx = -dx;\n\t\t\t\tcurrentdy = dy;\n\t\t\t\tcurrentdx = dx;\n\t\t\t\tMainController.getInstance().moveImage(name, -dx, -dy);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurrentdy = dy;\n\t\t\t\t\tcurrentdx = dx;\n\t\t\t\t\tMainController.getInstance().moveImage(name, dx, dy);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(currentdy < Math.abs(dy) && currentdx < Math.abs(dx)){\n\t\t\t\tcurrentdy++;\n\t\t\t\tcurrentdx++;\t\t\t\t\n\t\t\t\tMainController.getInstance().moveImage(name, dx/Math.abs(dx), dy/Math.abs(dy));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(currentdy < Math.abs(dy)){\n\t\t\t\t\tcurrentdy++;\t\n\t\t\t\t\tMainController.getInstance().moveImage(name, 0, dy/Math.abs(dy));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(currentdx < Math.abs(dx)){\n\t\t\t\t\tcurrentdx++;\t\t\t\t\n\t\t\t\t\tMainController.getInstance().moveImage(name, dx/Math.abs(dx), 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tthis.sleep(time * 1000 / (( Math.max(Math.abs(dx), Math.abs(dy) ))+1));\n\t\t\t\tMainController.getInstance().repaint();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t\tif((currentdx % 100 == 0 && currentdx != dx )|| (currentdy % 100 == 0&& currentdy!=dy))\n\t\t\t\tSystem.out.println(currentdx + \" \" + currentdy);\n\t\t}\n\t}", "public static void main(String[] args) {\n double T = Double.parseDouble(args[0]);\n double deltaT = Double.parseDouble(args[1]);\n \n // declares double t, sets to 0\n double t = 0.0;\n \n // declares and sets gravitational constant\n double g = 6.67e-11;\n \n // declares string \"background\" for background image\n String background = \"starfield.jpg\";\n \n // read the first 2 input values from the input\n int N = StdIn.readInt();\n double R = StdIn.readDouble();\n \n // sets the size of the universe\n setUniverse(R);\n \n // declare arrays for each category, each of which has\n // N elements, one for each particle\n double[] px = new double[N]; // array for position of x\n double[] py = new double[N]; // array for position of y\n double[] vx = new double[N]; // array for velocity of x\n double[] vy = new double[N]; // array for velocity of y\n double[] mass = new double[N]; // array for mass\n String[] picture = new String[N]; // array for pictures of particles\n \n \n // fills each array with input information\n for (int i = 0; i < N; i++) {\n \n px[i] = StdIn.readDouble();\n py[i] = StdIn.readDouble();\n vx[i] = StdIn.readDouble();\n vy[i] = StdIn.readDouble();\n mass[i] = StdIn.readDouble();\n picture[i] = StdIn.readString();\n \n }\n \n // draw the universe background\n drawUniverse(background);\n \n // draw each particle in its initial position:\n for (int i = 0; i < N; i++) {\n StdDraw.picture(px[i], py[i], picture[i]);\n }\n \n// Part 3: Update the universe at each time-step\n \n // The following while loop will allow us to calculate the\n // change in position for each particle (based on the force\n // from all other particles), and then redraw the background\n // and particles. The loop also tallies how much \"time\" \n // has gone by so that once the time has summed to T, \n // the program stops executing.\n \n while (t < T) {\n \n // declare new arrays forcex and forcey for the\n // x and y components of the force for each planet\n _______________________________;\n _______________________________;\n \n // In the next section, we want to calculate the force that each\n // body experiences, from all the other bodies combined. To do this,\n // we will need to use a double for loop. It is your job to figure\n // out what happens in each for loop.\n \n // For each body x, for each body y, you'll want to calculate the force\n // that y exerts on x, which is a function of the distance between\n // x and y and the size of x and y. You'll calculate both the force\n // in the x direction and the force in the y direction.\n \n // fills the arrays, with each element\n // corresponding to a different particle\n for (______________________) {\n \n // Runs through the particles, calculating the force\n // from each particle j on the particle i in question\n for (______________________) {\n \n // declares variables for x and y distances between the bodies\n double dx = _______________;\n double dy = _______________;\n \n // calculates the distance between planets i and j\n // note: you can use a method for this!\n double distance = _____________________;\n \n // calculates the overall force between i and j\n double forcej = _______________;\n \n // calculates x and y components of force between i and j\n double forcejx = ______________________;\n double forcejy = ______________________;\n \n // keep track of the net force on particle i \n // in both x and y directions\n forcex[i] = ______________________;\n forcey[i] = ______________________;\n \n }\n }\n \n // draw the universe background\n _______________________________;\n \n // calculate the new velocity and position for each particle\n for (int i = 0; i < N; i++) {\n \n // calculates acceleration in x and y directions\n double ax = _____________________________;\n double ay = _____________________________;\n \n // calculates velocity in x and y directions\n vx[i] = _____________________________;\n vy[i] = _____________________________;\n \n // calculates new x and y coordinates\n // to determine position\n px[i] = _____________________________;\n py[i] = _____________________________;\n \n // draws each particle in its new position\n _____________________________________;\n \n }\n \n // waits 40 milliseconds before continuing\n StdDraw.show();\n StdDraw.pause(20);\n \n // increments t by deltaT\n t = t + deltaT;\n \n }\n \n \n \n \n }", "public void doInitialSchedules() {\r\n\r\n\t\t// create the servicer, here make a vancarrier\r\n\t\tfor (int i = 0; i < vcNumber; i++) {\r\n\t\t\tVC vancarrier = new VC(this, \"Van Carrier\", true);\r\n\r\n\t\t\t// put the vancarrier on duty with placing it on the event-list\r\n\t\t\t// first\r\n\t\t\t// it will deactivate itself into waiting status\r\n\t\t\t// for the first truck right after activation\r\n\t\t\tvancarrier.activate();\r\n\t\t}\r\n\r\n\t\t// create a truck spring\r\n\t\tTruckGenerator firstarrival = new TruckGenerator(this, \"TruckArrival\", false);\r\n\r\n\t\t// place the truck generator on the event-list, in order to\r\n\t\t// start producing truck arrivals when the first truck comes\r\n\t\t// therefore we must use \"schedule\" instead of \"activate\"\r\n\t\tfirstarrival.schedule(new TimeSpan(getTruckArrivalTime()));\r\n\r\n\t}", "public void onUpdateTimerTick() {\r\n\t\tx = x+dx;\r\n\t\ty = y+dy;\r\n\t\tgame.updateWorld();\r\n\r\n\t}", "public Derivative evaluate(State initial, double t, double dt, Derivative d)\n\t{\n\n\t\tState state = initial;\n\t state.position = initial.position.add(d.dx.scale(dt));\n\t state.momentum = initial.momentum.add(d.dv.scale(dt)); \n\n\t Derivative output = new Derivative();\n\t output.dx = state.momentum;\n\t output.dv = state.efield.scale(state.charge);\n\t return output;\n\t}", "@Override\r\n\tpublic void update(float dt) {\n\r\n\t}", "@Override\n public void periodic() {\n m_odometry.update(\n Rotation2d.fromDegrees(m_gyro.getAngle()),\n new SwerveModulePosition[] {\n m_frontLeft.getPosition(),\n m_frontRight.getPosition(),\n m_rearLeft.getPosition(),\n m_rearRight.getPosition()\n });\n }", "@Override\n public void simulationPeriodic() {\n }", "private void physicsTickDead() {\n\t\t// Check the round end counter\n\t\tif (checkRoundEndCounter()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Physics stuff\n\t\tsetThrusts();\n\t\tmoveEverything(deltaTimeDead);\n\t\tageScoreMarkers(deltaTimeAlive);\n\t\tshootBullets();\n\t\t\n\t\tcollideTankToWall();\n\t\tcollideBulletToWall();\n\t}", "@Override\n public void run() {\n\n // Get the current game information\n gameInfoResponse = gameEngine.gameInfo(selectedGameId);\n GameInfoResponse.Game currentGame = gameInfoResponse.getGame();\n MapConfiguration mapConfiguration = currentGame.getMapConfiguration();\n\n System.out.println(\"#################### ROUND \" + currentGame.getRound() + \" ####################\");\n System.out.println(\"SCORE : \" + currentGame.getScores().getScores());\n\n // Query the submarines\n SubmarinesResponse submarinesResponse = gameEngine.submarines(selectedGameId);\n List<Submarine> submarineList = submarinesResponse.getSubmarines();\n if (submarineList == null || submarineList.isEmpty()) {\n System.out.println(\"Submarine list is empty!\");\n return;\n }\n fleet.setSubmarines(submarineList);\n\n // Set new target if needed\n // TODO Find better way to do this\n fleet.setTarget(new Coordinate(900, submarineList.get(0).getPosition().y > 400 ? 600: 200 ));\n if(fleet.hasReachedTarget()) {\n fleet.setTarget(new Coordinate(900, 400));\n }\n\n // Gather sonar information for fleet\n List <Entity> visibleEntities = new ArrayList<>();\n for (Submarine submarine : submarineList) {\n // TODO Extend sonars somehow for fleet\n SonarResponse sonarResponse = gameEngine.sonar(selectedGameId, submarine.getId());\n List<Entity> entityList = sonarResponse.getEntities();\n if (entityList == null) {\n System.out.println(\"Entity list is null, continue with next submarine.\");\n } else {\n visibleEntities.addAll(entityList);\n }\n }\n fleet.setVisibleEntities(visibleEntities);\n\n // Move the fleet\n Map<Integer, MoveModification> moveModifications = fleet.getMoveModifications();\n for (Integer shipId: moveModifications.keySet()) {\n MoveModification moveModification = moveModifications.get(shipId);\n gameEngine.move(selectedGameId, shipId, moveModification.getSpeed(), moveModification.getTurn());\n }\n\n // Fire torpedoes\n Map<Integer, Double> shootingAngles = fleet.getShootingAngles();\n for (Integer shipId: shootingAngles.keySet()) {\n Double shootingAngle = shootingAngles.get(shipId);\n gameEngine.shoot(selectedGameId, shipId,shootingAngle);\n }\n\n\n\n\n\n /*\n // Give orders to each submarine\n for (Submarine submarine : submarineList) {\n // Use extended sonar whenever we can\n if (currentGame.getRound() != 0 && (currentGame.getRound() % mapConfiguration.getExtendedSonarCooldown() == 0)) {\n System.out.println(\"Sonar extended!\");\n gameEngine.extendSonar(selectedGameId, submarine.getId());\n }\n\n printSubmarineInformation(submarine);\n\n // Get the sonar information\n SonarResponse sonarResponse = gameEngine.sonar(selectedGameId, submarine.getId());\n List<Entity> entityList = sonarResponse.getEntities();\n\n if (entityList == null) {\n System.out.println(\"Entity list is null, continue with next submarine.\");\n continue;\n }\n\n guiEntities.addAll(entityList);\n\n int cooldownLeft = cooldownStore.get(submarine.getId());\n cooldownLeft = cooldownLeft > 0 ? cooldownLeft - 1 : 0;\n cooldownStore.put(submarine.getId(), cooldownLeft);\n\n System.out.println(\"visible entities:\");\n\n // Loop through each entity the sonar is seeing.\n for (Entity e : entityList) {\n printEntityInformation(e);\n\n if(!e.getOwner().getName().equals(\"Thats No Moon\") && e.getType().equals(\"Submarine\")) { // && IT IS A SHIP!\n if (cooldownLeft == 0) {\n // Red Alert\n // TODO Check for torpedo cooldown!\n try {\n double shootingAngle = ShootingComputer.getShootingAngle(submarine.getPosition(), e.getPosition(), e.getVelocity(), e.getAngle());\n System.out.println(\"Firing!\");\n gameEngine.shoot(selectedGameId, submarine.getId(), shootingAngle);\n cooldownStore.put(submarine.getId(), mapConfiguration.getTorpedoCooldown());\n } catch (Exception ise) {\n System.out.println(ise.getMessage());\n }\n } else {\n System.out.println(\"Reload is complete in \" + cooldownLeft + \" rounds.\");\n }\n }\n }\n\n System.out.println(\"---------------------------------------------------------------------------------\");\n\n\n }\n */\n guiInfoMessage.setEntities(visibleEntities);\n guiInfoMessage.setSubmarines(submarineList);\n guiInfoMessage.setGame(gameInfoResponse.getGame());\n\n // Update spark server with new informations\n sparkServer.updateMessage(guiInfoMessage);\n }", "public void runSimulation() throws IOException {\n deleteFile(\"data/mm1.out\");\n\t \n\t\t/* Open input and output files. */\n\n infile = new BufferedReader(new FileReader(\"data/mm1.in\"));\n outfile = new BufferedWriter(new FileWriter(\"data/mm1.out\"));\n\n\t\t/* Specify the number of events for the timing function. */\n\n num_events = 2;\n\n\t\t/* Read input parameters. */\n String[] params = infile.readLine().trim().split(\"\\\\s+\");\n assert params.length == 3;\n mean_interarrival = Double.valueOf(params[0]);\n mean_service = Double.valueOf(params[1]);\n num_delays_required = Integer.valueOf(params[2]);\n\n\t\t/* Write report heading and input parameters. */\n outfile.write(\"Single-server queueing system\\n\\n\");\n outfile.write(\"Mean interarrival time \" + mean_interarrival\n + \" minutes\\n\\n\");\n outfile.write(\"Mean service time \" + mean_service + \" minutes\\n\\n\");\n outfile.write(\"Number of customers \" + num_delays_required + \"\\n\\n\");\n\n\t\t/* Initialize the simulation. */\n\n initialize();\n\n\t\t/* Run the simulation while more delays are still needed. */\n\n while (num_custs_delayed < num_delays_required) {\n\n\t\t\t/* Determine the next event. */\n\n timing();\n\n\t\t\t/* Update time-average statistical accumulators. */\n\n update_time_avg_stats();\n\n\t\t\t/* Invoke the appropriate event function. */\n\n switch (next_event_type) {\n case 1:\n arrive();\n break;\n case 2:\n depart();\n break;\n }\n }\n\n\t\t/* Invoke the report generator and end the simulation. */\n\n report();\n\n infile.close();\n outfile.close();\n\n }", "@Override\n public void main() throws InterruptedException {\n this.motorLeft = this.hardwareMap.dcMotor.get(\"motorLeft\");\n this.motorRight = this.hardwareMap.dcMotor.get(\"motorRight\");\n\n motorLeft.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n motorRight.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n\n motorRight.setDirection(DcMotor.Direction.REVERSE);\n\n// boolean test = true;\n// while (test) {\n// motorLeft.setPower(1.0);\n// motorRight.setPower(1.0);\n//\n// if (updateGamepads())\n// {\n// if (gamepad1.b)\n// {\n// test = false;\n// }\n// }\n// }\n\n // while (opModeIsActive())\n // gamepad1.a\n while (true)\n {\n if (updateGamepads())\n {\n motorLeft.setPower(gamepad1.left_stick_y);\n motorRight.setPower(gamepad1.right_stick_y);\n\n // move the arm with controller bumpers\n if (gamepad1.right_bumper)\n {\n motorArm.setPower(0.5);\n Thread.sleep(100);\n }\n else if (gamepad1.left_bumper)\n {\n motorArm.setPower(-0.5);\n Thread.sleep(100);\n }\n else\n {\n motorArm.setPower(0);\n }\n }\n\n telemetry.update();\n idle();\n }\n }", "protected void execute() {\n\n\t\tspeed = oi.getLeftY();\n\n\t\tleftTicks = drive.getLeftRotation();\n\t\trightTicks = drive.getRightRotation();\n\n\t\t/*\n\t\t * if (startAngle == drive.getAngle()) { drive.setBoth(oi.getLeftY()); }\n\t\t * else if (startAngle < drive.getAngle()) { if (oi.getLeftY() > 0)\n\t\t * drive.setBoth(oi.getLeftY(), .9 * oi.getLeftY()); else drive.setBoth(\n\t\t * .9 * oi.getLeftY(),oi.getLeftY()); } else if (startAngle >\n\t\t * drive.getAngle()) { if (oi.getLeftY() > 0)\n\t\t * drive.setBoth(oi.getLeftY(), .9 * oi.getLeftY()); else\n\t\t * drive.setBoth(.9 * oi.getLeftY(), oi.getLeftY()); }\n\t\t */\n\t\tif (leftTicks == 0 || rightTicks == 0)\n\t\t\tdrive.setBoth(speed);\n\t\telse\n\t\t\tdrive.setBoth(MathUtil.setLimits((rightTicks / leftTicks) * speed, -1.0, 1.0),\n\t\t\t\t\tMathUtil.setLimits((leftTicks / rightTicks) * speed, -1.0, 1.0));\n\n\t}", "public void computer()\n\t{\n\t\tif( this.days <= 5 )\n\t\t\tthis.charge = 500 * this.days ; \n\t\telse if( this.days <= 10)\n\t\t\tthis.charge = 400 * (this.days-5) + 2500 ; \n\t\telse\n\t\t\tthis.charge = 200 * (this.days-10) + 2500 + 2000 ;\n\t}", "@Override\r\n public void run() {\n if (start == true && player.getX() > 0) {\r\n //Updates objects\r\n for (Terrain t: terrain) {\r\n t.update();\r\n }\r\n for (Barrier b: barriers) {\r\n b.update();\r\n }\r\n for (Platform p: platforms) {\r\n p.update();\r\n }\r\n for (Bird bi: birds) {\r\n bi.update();\r\n }\r\n for (Bomb bo: bombs) {\r\n bo.update();\r\n bo.grav();\r\n }\r\n player.grav();\r\n playerTwo.grav();\r\n playerTwo.update();\r\n \r\n //Controls when bombs drop\r\n if (bombAct % 150 == 0 && score > 2500) {\r\n bombs.add(new Bomb((int) (Math.random() * 1000), (int) (Math.random() * 100)));\r\n }\r\n \r\n //Sets pace of the game\r\n if (tempo % 1500 == 0) {\r\n for (Terrain t: terrain) {\r\n t.setDX(t.getDX() + 1);\r\n }\r\n for (Barrier b: barriers) {\r\n b.setDX(b.getDX() + 1);\r\n }\r\n for (Platform p: platforms) {\r\n p.setDX(p.getDX() + 1);\r\n }\r\n for (Bird bi: birds) {\r\n bi.setDX(bi.getDX() - 1);\r\n }\r\n }\r\n \r\n //Timers\r\n tempo++;\r\n bombAct++;\r\n score++;\r\n }\r\n\r\n //Always runs\r\n player.update();\r\n \r\n \r\n collision(player);\r\n collision(playerTwo);\r\n borderCollision(player);\r\n borderCollision(playerTwo);\r\n \r\n repaint();\r\n }", "public void run() {\n // Main loop:\n // Perform simulation steps of 64 milliseconds\n // and leave the loop when the simulation is over\n while (step(64) != -1) {\n // Read the _distanceSensors:\n // Enter here functions to read sensor data, like:\n // double val = distanceSensor.getValue();\n\n // Process sensor data here\n\n // Enter here functions to send actuator commands, like:\n // led.set(1);\n };\n }" ]
[ "0.5891519", "0.5680837", "0.56767285", "0.5530413", "0.5510339", "0.5500637", "0.5497429", "0.54842883", "0.54372376", "0.54284", "0.54284", "0.54284", "0.54191417", "0.54162794", "0.537233", "0.536219", "0.53470224", "0.5340974", "0.5326415", "0.52864677", "0.5284493", "0.5239304", "0.52322644", "0.5206811", "0.51890147", "0.51869965", "0.5186106", "0.51698595", "0.5167527", "0.51621556", "0.51522225", "0.51388156", "0.5135982", "0.51227176", "0.51202977", "0.51109993", "0.51109004", "0.5109423", "0.51071846", "0.51019156", "0.5093722", "0.508947", "0.50868094", "0.5079626", "0.5077801", "0.50758016", "0.5074438", "0.5074362", "0.50416", "0.504054", "0.50357115", "0.5032628", "0.50313526", "0.5030106", "0.5017095", "0.50166595", "0.5009308", "0.5009308", "0.50038517", "0.50032467", "0.5000136", "0.4986062", "0.49838635", "0.49831986", "0.49820778", "0.4980073", "0.49783808", "0.4975919", "0.4966766", "0.49638173", "0.49635687", "0.495794", "0.49537247", "0.49465978", "0.49462724", "0.49454957", "0.49398753", "0.4939147", "0.4939147", "0.4939147", "0.49389508", "0.49384108", "0.49368772", "0.4932841", "0.49233443", "0.49225986", "0.49221423", "0.49214494", "0.49199036", "0.49193203", "0.49170583", "0.49139905", "0.49122158", "0.49103796", "0.4907293", "0.49006137", "0.49003884", "0.49000707", "0.4895004", "0.48914626" ]
0.65652263
0
Calculates and returns the linear and angular accelerations of the drone (in world frame).
private static Vector3f[] calculateAccelerations(Drone drone, float stepsize) throws MaxAoAException { return calculateAccelerations(drone, calculateForces(drone, stepsize)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Vector3f[] calculateAccelerations(Drone drone, Vector3f[] forces) {\r\n\t\t// linear acceleration\r\n\t\tVector3f linearAccelerationW = new Vector3f(forces[0].x / drone.getMass(), forces[0].y / drone.getMass(),\r\n\t\t\t\tforces[0].z / drone.getMass());\r\n\r\n\t\t// rotational inertia values\r\n\t\tfloat iXx = drone.getInertiaMatrix().m00;\r\n\t\tfloat iYy = drone.getInertiaMatrix().m11;\r\n\t\tfloat iZz = drone.getInertiaMatrix().m22;\r\n\r\n\t\t// angular velocity\r\n\t\tVector3f omega = drone.getAngularVelocity();\r\n\r\n\t\t// angular acceleration\r\n\t\tVector3f angularAccelerationW = new Vector3f();\r\n\t\tangularAccelerationW.x = (forces[1].x + (iYy - iZz) * omega.y * omega.z) / iXx;\r\n\t\tangularAccelerationW.y = (forces[1].y + (iZz - iXx) * omega.x * omega.z) / iYy;\r\n\t\tangularAccelerationW.z = (forces[1].z + (iXx - iYy) * omega.x * omega.y) / iZz;\r\n\r\n\t\t// return the results\r\n\t\treturn new Vector3f[] { linearAccelerationW, angularAccelerationW };\r\n\t}", "double getAcceleration ();", "@Override\n\tpublic double[] getDx() {\n\t double object[] = new double[2];\n\t for(int i = 0; i < x.length; i++){\n\t object[0] += theta[0] + theta[1] * x[i] - y[i];\n\t object[1] += (theta[0] + theta[1] * x[i] - y[i])*x[i];\n\t }\n\t theta[0] -= eta * object[0];\n\t theta[1] -= eta * object[1];\n\n\t return theta;\n }", "@Override\n\tpublic double getRx() {\n\ndouble object = 0;\n for(int i = 0; i < x.length; i++){\n object += Math.pow(y[i] - ( theta[0] + theta[1] * x[i]), 2);\n }\n return object / 2 ;\n }", "@Override\n public final void onSensorChanged(SensorEvent event) {\n linearAccelerations = event.values;\n linearAccelerations[0] = linearAccelerations[0]-xOff;\n linearAccelerations[1] = linearAccelerations[1]-yOff;\n linearAccelerations[2] = linearAccelerations[2]-zOff;\n xAccel = (float) round(linearAccelerations[0]/9.8, 3);\n yAccel = (float) round(linearAccelerations[1]/9.8, 3);\n zAccel = (float) round(linearAccelerations[2]/9.8, 3);\n// Log.i(appLabel, \"Acceleration: (\"+xAccel+\", \"+yAccel+\", \"+zAccel+\")\");\n xAccelSquared = (float) round(xAccel*xAccel, 3);\n yAccelSquared = (float) round(yAccel*yAccel, 3);\n zAccelSquared = (float) round(zAccel*zAccel, 3);\n //If they are negative accelerations, squaring them will have made them positive\n if (xAccel < 0) {\n xAccelSquared = xAccelSquared*-1;\n }\n if (yAccel < 0) {\n yAccelSquared = yAccelSquared*-1;\n }\n if (zAccel < 0) {\n zAccelSquared = zAccelSquared*-1;\n }\n xAccelOutput.setText(String.valueOf(xAccel));\n yAccelOutput.setText(String.valueOf(yAccel));\n zAccelOutput.setText(String.valueOf(zAccel));\n// Log.i(appLabel, \"Acceleration squares: \"+xAccelSquared+\", \"+yAccelSquared+\", \"+zAccelSquared);\n float accelsSum = xAccelSquared+yAccelSquared+zAccelSquared;\n double accelsRoot;\n if (accelsSum < 0) {\n accelsSum = accelsSum * -1;\n accelsRoot = Math.sqrt(accelsSum) * -1;\n } else {\n accelsRoot = Math.sqrt(accelsSum);\n }\n// Log.i(appLabel, \"Acceleration squares sum: \"+accelsSum);\n// Log.i(appLabel, \"Acceleration sqrt:\"+accelsRoot);\n cAccel = (float) round(accelsRoot, 3);\n// Log.i(appLabel, \"Net Acceleration: \"+cAccel);\n //Store the maximum acceleration\n if (cAccel > maxAccel) {\n maxAccel = cAccel;\n }\n accelOutput.setText(String.valueOf(cAccel));\n if (isRunning) {\n setSpeed();\n }\n if (speed >= 60) {\n timeToSixty = seconds;\n timeToSixtyOutput.setText(String.valueOf(timeToSixty));\n stopTimer();\n }\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularAcceleration() { return nAngularAcceleration(address()); }", "@Override\n\t\tpublic void updateVariables(){\n\t\t\tthis.currentX = odometer.getCurrentX();\n\t\t\tthis.currentY = odometer.getCurrentY();\n\t\t\tthis.currentAngle = odometer.getHeadingAngle();\n\t\t\tthis.currentAverageVelocity = odometer.getCurrentAverageVelocity();\n\t\t}", "public void calcAcceleration() {\n double firstSpeed = get(0).distanceTo(get(1)) / ((get(1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n double lastSpeed = get(length() - 2).distanceTo(get(length() - 1))\n / ((get(length() - 1).getTime() - get(length() - 2).getTime()) * INTER_FRAME_TIME);\n avgAcceleration = (firstSpeed + lastSpeed) / ((get(length() - 1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n }", "float[] calculate(float[] acc, float[] oldAcc, float[] gyr , float[] oldGyr,float[] oldGra, float[] oldAccVelDisGra)\n {\n// System.out.println(\"inside method acc:\"+acc[0]+\", \"+acc[1]+\", \"+acc[2]+\", oldAcc:\"+oldAcc[0]+\", \"+oldAcc[1]+\", \"+oldAcc[2]);\n// System.out.println(\"inside method gravity:\"+oldGra[0]+\", \"+oldGra[1]+\", \"+oldGra[2]);\n if (oldAccVelDisGra==null)\n {\n oldAccVelDisGra= new float[9];\n for (int i = 0; i <9; i++) {\n oldAccVelDisGra[i]=0.0f;\n }\n }\n float[] oldDynamicAcc = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldVelocity = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldDistance = new float[]{0.0f, 0.0f, 0.0f};\n float[] newGra = gravityFromRotation(oldGra, gyr);\n\n for (int i = 0; i < 3; i++) {\n oldDynamicAcc[i] = oldAccVelDisGra[i];\n oldVelocity[i] = oldAccVelDisGra[i+3];\n oldDistance[i] = oldAccVelDisGra[i+6];\n }\n float[] accVelDisGra = new float[]{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};\n float[] dynAccDiff = dynamicAccDiff(acc,gyr,oldGra,oldAcc,oldGyr);\n float[] dynamicAcc = dynamicAcc(oldDynamicAcc, dynAccDiff);\n float[] velocity = velocity(oldVelocity,dynamicAcc);\n float[] distance = distance(oldDistance, velocity);\n for (int i = 0; i < 3; i++) {\n accVelDisGra[i]=dynamicAcc[i];\n accVelDisGra[i+3]= velocity[i];\n accVelDisGra[i+6]=distance[i];\n accVelDisGra[i+9]=newGra[i];\n }\n return accVelDisGra;\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f LinearAcceleration() { return nLinearAcceleration(address()); }", "private static Vector2 calculateAcceleration(PhysicsGameObject obj){\n Vector2 gravity = gravityForce(obj);\n Vector2 friction = frictionForce(obj);\n return new Vector2(friction.x + gravity.x,friction.y + gravity.y);\n }", "private native void UpdateAcceleration(float infAccelerationX, float infAccelerationY, float infAccelerationZ);", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "public double getAcceleration() {\r\n return acceleration;\r\n }", "public double getAcceleration() {\n return acceleration;\n }", "private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesList.size();i++)\n\t\t{\n\t\t\tnewAcceleration.x += forcesList.get(i).force.x / mass;\n\t\t\tnewAcceleration.y += forcesList.get(i).force.y / mass;\n\t\t\t\n\t\t\tif(forcesList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveForce(forcesList.get(i));\n\t\t\t}\n\t\t}\n\t\tacceleration = newAcceleration;\n\t\t\n\t\tfloat newAngularAcc = 0;\n\t\t\n\t\tfor(int i=0;i<torqueList.size();i++)\n\t\t{\n\t\t\tnewAngularAcc += torqueList.get(i).torqueVal / mass;\n\t\t\tif(torqueList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveTorque(torqueList.get(i));\n\t\t\t}\n\t\t}\n\t\tangularAcceleration = newAngularAcc;\n\t\t\n\t}", "public float getAngularSpeed() {\n return this.movementComposer.getAngularSpeed();\n }", "public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }", "private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) {\r\n\r\n\t\t\r\n\t\t// calculate the average linear velocity\r\n\t\tVector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]);\r\n\r\n\t\t// calculate the translation\r\n\t\tVector3f deltaPositionW = (Vector3f) avgLinearVelocityW.scale(dt);\r\n\r\n\t\t// calculate the average angular velocity\r\n\t\tVector3f avgAngularVelocityW = average(drone.getAngularVelocity(), newVelocities[1]);\r\n\r\n\t\t// calculate the rotation\r\n\t\tVector3f deltarotationW = ((Vector3f) avgAngularVelocityW.scale(dt));\r\n\r\n\t\treturn new Vector3f[] { deltaPositionW, deltarotationW };\r\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n theta = (float) Math.toDegrees(Math.atan(event.values[1] / event.values[2]));\n\n\n }", "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}", "private void updateLinearDrive() {\n// double rotations = (getLeftRotations() + getRightRotations()) / 2;\n// linearDriveDistance = Conversion.rotationsToInches(rotations, Constants.driveWheelDiameter);\n// double angleController = turnControl.getOutput(linearDriveMultiplier * (navX.getAngle() - linearDriveTargetAngle));\n// double driveController = driveControl.getOutput(linearDriveTargetDistance - linearDriveDistance);\n// setOutput(driveController + angleController, driveController - angleController);\n }", "public Vector2D getAcceleration()\n\t{\n\t\treturn acceleration;\n\t}", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "protected void calcAcceleration()\n\t{\n\t\tfloat aLength = getAcceleration().getExactLength();\n\t\tif (aLength > 1) { // limit to circular movement\n\t\t\tgetAcceleration().quickNormalize(aLength);\n\t\t}\n\t\tsetAcceleration(Vector2D.getScaled(getAcceleration(), getThrust()));\n\t}", "public void onAccelerationChanged(float x, float y, float z) {\n\n }", "private void updateSensors()\r\n\t{\t\t\r\n\t\tthis.lineSensorRight\t\t= perception.getRightLineSensor();\r\n\t\tthis.lineSensorLeft \t\t= perception.getLeftLineSensor();\r\n\t\t\r\n\t\tthis.angleMeasurementLeft \t= this.encoderLeft.getEncoderMeasurement();\r\n\t\tthis.angleMeasurementRight \t= this.encoderRight.getEncoderMeasurement();\r\n\r\n\t\tthis.mouseOdoMeasurement\t= this.mouseodo.getOdoMeasurement();\r\n\r\n\t\tthis.frontSensorDistance\t= perception.getFrontSensorDistance();\r\n\t\tthis.frontSideSensorDistance = perception.getFrontSideSensorDistance();\r\n\t\tthis.backSensorDistance\t\t= perception.getBackSensorDistance();\r\n\t\tthis.backSideSensorDistance\t= perception.getBackSideSensorDistance();\r\n\t}", "public Vector3d getAcceleration() {\n return getMotion().getAcceleration();\n }", "public double getAcceleration(ADXL345_I2C.Axes axis)\n {\n return accel.getAcceleration(axis);\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n Sensor mySensor = event.sensor;\n\n //double checking if we are referencing the correct sensor type\n if(mySensor.getType()==Sensor.TYPE_ACCELEROMETER)\n {\n //reading the sensor values\n // x- axis lateral movement\n float x = event.values[0];\n //y axis vertical movement\n float y = event.values[1];\n //z-axis movement in and out of the plane\n float z= event.values[2];\n mAccelLast = mAccelCurrent;\n mAccelCurrent = (float) Math.sqrt((double) (x*x + y*y + z*z));\n float delta = mAccelCurrent - mAccelLast;\n mAccel = mAccel * 0.9f + delta; // perform low-cut filter\n displayAcceleration();\n }\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}", "@Override public void onSensorChanged(SensorEvent event) \n\t{\n\t\tif (Sensor.TYPE_ACCELEROMETER == event.sensor.getType())\n\t\t{\n\t\t\t//The values provided from the accelerometer are always relative to the default screen orientation which can change\n\t\t\t//from device to device. To alleviate this we are converting into \"screen\" coordinates. This has been taken from\n\t\t\t//the nvidia accelerometer white paper which can be found at : http://developer.download.nvidia.com/tegra/docs/tegra_android_accelerometer_v5f.pdf\n\t\t\tActivity activity = CSApplication.get().getActivity();\n\t\t\tWindowManager windowManager = (WindowManager)activity.getSystemService(Activity.WINDOW_SERVICE);\n\t\t\tint rotationIndex = windowManager.getDefaultDisplay().getRotation();\n\t\t\tAxisSwap axisSwap = m_axisSwapForRotation[rotationIndex];\n\t\t\tfloat fScreenX = ((float)axisSwap.m_negateX) * event.values[axisSwap.m_sourceX];\n\t\t\tfloat fScreenY = ((float)axisSwap.m_negateY) * event.values[axisSwap.m_sourceY];\n\t\t\tfloat fScreenZ = event.values[2];\n\n\t\t\t//the values provided by android are in ms^-2. Accelerometer values are more typically given in\n\t\t\t//terms of \"g\"'s so we are converting here. We are also converting from a x, y and z positive in the\n\t\t\t//left, up and backward directions respectively to right, up and forward directions to be more consistent with iOS.\n\t\t\tfinal float k_gravity = 9.80665f;\n\t\t\tfinal float k_accelerationX = -fScreenX / k_gravity;\n\t\t\tfinal float k_accelerationY = fScreenY / k_gravity;\n\t\t\tfinal float k_accelerationZ = -fScreenZ / k_gravity;\n\t\t\t\n\t\t\t//update acceleration on main thread.\n\t\t\tRunnable task = new Runnable()\n\t\t\t{ \n\t\t\t\t@Override public void run() \n\t\t\t\t{\n\t\t\t\t\tif (true == mbHasAccelerometer && true == mbListening)\n\t\t\t\t\t{\n\t\t\t UpdateAcceleration(k_accelerationX, k_accelerationY, k_accelerationZ);\n\t\t\t }\n\t\t\t\t}\n\t\t\t};\n\t\t\tCSApplication.get().scheduleMainThreadTask(task);\n\t\t}\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n final float alpha = (float) 0.8;\n\n // Isolate the force of gravity with the low-pass filter.\n gravity[0] = alpha * gravity[0] + (1 - alpha) * event.values[0];\n gravity[1] = alpha * gravity[1] + (1 - alpha) * event.values[1];\n gravity[2] = alpha * gravity[2] + (1 - alpha) * event.values[2];\n\n // Remove the gravity contribution with the high-pass filter.\n linear_acceleration[0] = event.values[0] - gravity[0];\n linear_acceleration[1] = event.values[1] - gravity[1];\n linear_acceleration[2] = event.values[2] - gravity[2];\n\n xValueTextView.setText(\"Valor en X: \" + linear_acceleration[0]);\n yValueTextView.setText(\"Valor en Y: \" + linear_acceleration[1]);\n zValueTextView.setText(\"Valor en Z: \" + linear_acceleration[2]);\n }", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "private float computeDeceleration(float r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.widget.OppoScroller.computeDeceleration(float):float, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.computeDeceleration(float):float\");\n }", "double motor_y () { return strut.span + DRIVING_FORCE_HEIGHT; }", "@Override\n\tpublic float getMaxAngularAcceleration() {\n\t\treturn MaxAngularAcceleration;\n\t}", "@Override\n public void run() {\n angles = imu.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n gravity = imu.getGravity();\n }", "public interface DisplacementSensor {\n\n // return current heading reported by sensor, in degrees.\n // convention is positive angles CCW, wrapping from 359-0\n public float getDisp();\n\n}", "public double getRightAcceleration() {\n return rightEnc.getAcceleration();\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 }", "protected float getGyroscopeAngle() {\n if (doGyro) {\n Orientation exangles = bosch.getAngularOrientation(AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES);\n float gyroAngle = exangles.thirdAngle;\n //exangles.\n //telemetry.addData(\"angle\", \"angle: \" + exangles.thirdAngle);\n float calculated = normalizeAngle(reverseAngle(gyroAngle));\n //telemetry.addData(\"angle2\",\"calculated:\" + calculated);\n return calculated;\n } else {\n return 0.0f;\n }\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent se) {\n\t\teventIesim++;\n\t\tif(eventIesim == THRESHOLD_EVENTS)\n\t\t{\n\n\t\t\tswitch (se.sensor.getType())\n\t\t\t{\n\t\t\t\tcase Sensor.TYPE_ACCELEROMETER:\n\t\t\t\t{\n\t\t\t\t\taccelerometerValues = se.values.clone();\n\t\t\t\t\tnew ListenerThread(accelerometerValues,delta_orientation,context,gps).start(); // use the last orientation set\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Sensor.TYPE_MAGNETIC_FIELD:\n\t\t\t\t{\n\t\t\t\t\tgeomagneticMatrix = se.values.clone();\n\t\t\t\t\tsensorReady = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t} \n\n\t\t\tif (geomagneticMatrix != null && accelerometerValues != null && sensorReady) \n\t\t\t{\n\t\t\t\tsensorReady = false;\n\n\t\t\t\tfloat[] R = new float[16];\n\t\t\t\tfloat[] I = new float[16];\n\n\t\t\t\tSensorManager.getRotationMatrix(R, I, accelerometerValues, geomagneticMatrix);\n\n\t\t\t\tfloat[] actual_orientation = new float[3];\n\t\t\t\tSensorManager.getOrientation(R, actual_orientation); // lastorientation filled with orientation in radiant\n\t\t\t\t\n\t\t\t\tdelta_orientation[0]= (delta_orientation[0] > actual_orientation[0]) ? (delta_orientation[0] - actual_orientation[0]) : (actual_orientation[0] - delta_orientation[0]);\n\t\t\t\tdelta_orientation[1]= (delta_orientation[1] > actual_orientation[1]) ? (delta_orientation[1] - actual_orientation[1]) : (actual_orientation[1] - delta_orientation[1]);\n\t\t\t\tdelta_orientation[2]= (delta_orientation[2] > actual_orientation[2]) ? (delta_orientation[2] - actual_orientation[2]) : (actual_orientation[2] - delta_orientation[2]);\n\n\t\t\t\tLog.i(TAG, \"acceleration with gravity x:\"+accelerometerValues[0]+\" y:\"+accelerometerValues[1]+\" z:\"+accelerometerValues[2]);\n\n\t\t\t\tnew ListenerThread(accelerometerValues,delta_orientation,context,gps).start();\n\n\t\t\t\tLog.i(TAG, \"orientation x:\"+delta_orientation[0]+\" y:\"+delta_orientation[1]+\" z:\"+delta_orientation[2]);\n\t\t\t\t//Toast.makeText(context, \"orientation x:\"+delta_orientation[0]+\" y:\"+delta_orientation[1]+\" z:\"+delta_orientation[2], Toast.LENGTH_SHORT).show();\n\t\t\t\t\n\t\t\t\tdelta_orientation = actual_orientation;\n\t\t\t}\n\t\t\teventIesim = 0;\n\t\t}\n\t\t\n\n\n\t}", "@Override\n\tpublic int dx() {\n\t\treturn dx;\n\t}", "public double calculateDegToAttack() {\r\n\t\tdouble randX = Math.random() * (MAX_X - MIN_X + 1) + MIN_X;\r\n\t\tdouble tempX = randX - this.getX();\r\n\t\tdouble tempY = this.getY() - Y_HEIGHT;\r\n\t\tdouble degRads = 0;\r\n\t\tdouble deg = 0;\r\n\t\tSystem.out.println(\"x: \" + tempX + \" y: \" + tempY);\r\n\t\tif(tempX<0) {\r\n\t\t\ttempX*=-1;\r\n\t\t\tdegRads = Math.atan(tempY/tempX);\r\n\t\t\tdeg = Math.toDegrees(degRads);\r\n\t\t\tdeg = deg + ((90-deg)*2);\r\n\t\t}else {\r\n\t\t\tdegRads = Math.atan(tempY/tempX);\r\n\t\t\tdeg = Math.toDegrees(degRads);\r\n\t\t}\r\n\t\tif(deg < 0) {\r\n\t\t\tdeg+=360;\r\n\t\t}\r\n\t\tSystem.out.println(\"degs: \" + deg);\r\n\t\tspaceToAttack = new space(randX, Y_HEIGHT);\r\n\t\treturn deg;\r\n\t}", "static float calculateAccelerationFromTheta(float theta) {\n return (float) (g * (Math.sin(theta) - uK * Math.cos(theta)));\n }", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "public void accelerateXR() {\n double temp;\n temp = this.getxSpeed();\n if (temp <= this.getMaxSpeed()) {\n temp += this.getMaxSpeed() / 10;\n }\n this.setxSpeed(temp);\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularVelocity() { return nAngularVelocity(address()); }", "@SuppressWarnings(\"unused\")\n \tpublic static double Distance(\tArrayList<Float> x_accel, \n \t\t\t\t\t\t\t\t\tArrayList<Float> y_accel, \n \t\t\t\t\t\t\t\t\tArrayList<Float> z_accel,\n \t\t\t\t\t\t\t\t\tArrayList<Float> t)\n \t{\n \t\tArrayList<Float> dx_veloc = new ArrayList<Float>(); dx_veloc.add(0f);\n \t\tArrayList<Float> dy_veloc = new ArrayList<Float>(); dy_veloc.add(0f);\n \t\tArrayList<Float> dz_veloc = new ArrayList<Float>(); dz_veloc.add(0f);\n \t\t\n \t\tArrayList<Float> x_veloc = new ArrayList<Float>(); x_veloc.add(0f);\n \t\tArrayList<Float> y_veloc = new ArrayList<Float>(); y_veloc.add(0f);\n \t\tArrayList<Float> z_veloc = new ArrayList<Float>(); z_veloc.add(0f);\n \t\t\n \t\t//compose velocity\n \t\tint I = x_accel.size();\n \t\tfloat dt;\n \t\tSystem.out.println(\"Composing Velocity...\\n\");\n \t\tfor( int i = 1; i < I; i++ )\n \t\t{\t\n \t\t\t//x'_i = x''_(i-1) * dt\n \t\t\t//y'_i = y''_(i-1) * dt\n \t\t\t//z'_i = z''_(i-1) * dt\n \t\t\tdt = t.get(i) - t.get(i-1);\n \t\t\tdx_veloc.add( x_accel.get(i-1) * dt);\n \t\t\tdy_veloc.add( y_accel.get(i-1) * dt);\n \t\t\tdz_veloc.add( z_accel.get(i-1) * dt);\n \t\t\tSystem.out.println(\"Step: \" + i + \"\\n\\tv_x: \"+ dx_veloc.get(i) + \"\\n\\tv_y: \" + dy_veloc.get(i) + \"\\n\\tv_z: \" + dz_veloc.get(i));\n \t\t}\n \t\tfloat temp = 0f;\n \t\tfor(float d : dx_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\tx_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\ttemp = 0;\n \t\tfor(float d : dy_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\ty_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\ttemp = 0;\n \t\tfor(float d : dz_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\tz_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\tArrayList<Float> dx_disp = new ArrayList<Float>(); dx_disp.add(0f); dx_disp.add(0f);\n \t\tArrayList<Float> dy_disp = new ArrayList<Float>(); dy_disp.add(0f); dy_disp.add(0f);\n \t\tArrayList<Float> dz_disp = new ArrayList<Float>(); dz_disp.add(0f); dz_disp.add(0f);\n \t\t\n \t\tArrayList<Float> x_disp = new ArrayList<Float>(); x_disp.add(0f); x_disp.add(0f);\n \t\tArrayList<Float> y_disp = new ArrayList<Float>(); y_disp.add(0f); y_disp.add(0f);\n \t\tArrayList<Float> z_disp = new ArrayList<Float>(); z_disp.add(0f); z_disp.add(0f);\n \t\t\n \t\t//compose displacement\n \t\tI = t.size();\n \t\tfor( int i = 2; i < I; i++ )\n \t\t{\t\n \t\t\t//x_i = x'_(i-1) * dt\n \t\t\t//y_i = y'_(i-1) * dt\n \t\t\t//z_i = z'_(i-1) * dt\n \t\t\tdt = t.get(i) - t.get(i-1);\n \t\t\tdx_disp.add( x_veloc.get(i-1) * dt);\n \t\t\tdy_disp.add( y_veloc.get(i-1) * dt);\n \t\t\tdz_disp.add( z_veloc.get(i-1) * dt);\n \t\t}\n \t\t\n \t\t//compose total displacement\n \t\tfloat distance = 0;\n \n \t\tif( true/*Euclidean_Distance_Mode */)\n \t\t{\n \t\t\t//vector addition, constructing R\n \t\t\tSystem.out.println(\"Composing R...\\n\");\n \t\t\tfloat r[] = new float[3]; //[x, y, z]\n \t\t\tfor( int i = 0; i < I; i++)\n \t\t\t{\n \t\t\t\tr[0] += dx_disp.get(i);\n \t\t\t\tr[1] += dy_disp.get(i);\n \t\t\t\tr[2] += dz_disp.get(i);\n \t\t\t\tSystem.out.println(\"Step: \" + i + \"\\n\\tr_x: \"+ r[0] + \"\\n\\tr_y: \" + r[1] + \"\\n\\tr_z: \" + r[2]);\n \t\t\t}\n \t\t\n \t\t\t//Distance formula, constructing D\n \t\t\t//D = sqrt(X^2 + Y^2 + Z^2)\n \t\t\tdistance = (float) Math.sqrt( \n \t\t\t\t\t\t\tMath.pow(r[0], 2) + \n \t\t\t\t\t\t\tMath.pow(r[1], 2) +\n \t\t\t\t\t\t\tMath.pow(r[2], 2)\n \t\t\t\t\t\t\t);\n \t\t\treturn distance;\n \t\t}\n \n \t\telse if ( false /*Path_Distance_Mode */)\n \t\t{\n \t\t\t//sum up individual distances, constructing D\n \t\t\tfor( int i = 0; i < I; i++)\n \t\t\t{\n \t\t\t\t//dD = sqrt( dx^2 + dy^2 + dz^2 )\n \t\t\t\tdistance += Math.sqrt(\n \t\t\t\t\t\t\t\tMath.pow(dx_disp.get(i), 2) +\n \t\t\t\t\t\t\t\tMath.pow(dy_disp.get(i), 2) +\n \t\t\t\t\t\t\t\tMath.pow(dz_disp.get(i), 2)\n \t\t\t\t\t\t\t\t);\n \t\t\t}\t\t\n \t\t\treturn distance;\n \t\t} \n \treturn 0; //won't get here.\n }", "double getCompass(double magnetic);", "public float getAngularVelocity () {\n\t\treturn body.getAngularVelocity();\n\t}", "public float d() {\n if (B1() || A1()) {\n return this.A + this.o + this.B;\n }\n return 0.0f;\n }", "public float getAngularDamping () {\n\t\treturn body.getAngularDamping();\n\t}", "private float[] dynamicAccDiff(float[] acc, float[] gyr,float[] gravity, float[] oldAcc, float[] oldGyr)\n {\n float[] dynAccDiff = new float[]{0.0f, 0.0f, 0.0f};\n float[] accDiff = accDiff(oldAcc, acc);\n float[] gyrDiff = gyrDiff(oldGyr, gyr);\n float[] graDiff = graDiff(gravity, gyrDiff);\n\n for (int i = 0; i < 3; i++)\n {\n dynAccDiff[i] = accDiff[i]-graDiff[i];\n }\n\n return dynAccDiff;\n\n }", "double getVz() { return vel[2]; }", "public static final double[] DRIVE_AXIS() {\n\t\tdouble reverse = driver.getRawAxis(2);\n\t\tdouble accelerate = driver.getRawAxis(3);\n\t\tdouble x = driver.getX();\n\t\tdouble y = (accelerate - reverse)*(!(DRIVE_JOY().getRawButton(DRIVE_BOOST))?1.0:Constants.NO_BOOST_MULTIPLIER);\n\t\tdouble left = 0.0;\n\t\tdouble right = 0.0;\n//\t\tif(false) {\n//\t\t\tright = (1.5*y - x > 1.0 ? 1.0 : 1.5*y - x);\n//\t\t\tright = (1.5*y - x < -1.0 ? -1.0 : right);\n//\t\t\tleft = (1.5*y + x > 1.0 ? 1.0 : 1.5*y + x);\n//\t\t\tleft = (1.5*y + x < -1.0 ? -1.0 : left);\n//\t\t} else {\n\t\t\tright = (y*Math.abs(1.0 - x) > 1.0 ? 1.0 : y*Math.abs(1.0 - x));\n\t\t\tright = (y*Math.abs(1.0 - x) < -1.0 ? -1.0 : right);\n\t\t\tleft = (y*Math.abs(1.0 + x) > 1.0 ? 1.0 : y*Math.abs(1.0 + x));\n\t\t\tleft = (y*Math.abs(1.0 + x) < -1.0 ? -1.0 : left);\n\t\t//}\n\t\treturn new double[]{left,right};\n\t}", "public float computeNetAcceleration(float[] values){\n float magnitude = (values[0]*values[0])+(values[1]*values[1])+(values[2]*values[2]);\n\n //Copy C to L , so L is last acceleration value\n LAST_ACCLRN = current_accleration;\n\n //Compute C = sqrt(magnitude)\n current_accleration = (float)Math.sqrt(magnitude);\n\n //Calculate delta : D = C - L\n float delta = current_accleration - LAST_ACCLRN;\n\n //Net accleration is always 90% of previous accelearation added with delta\n //Recurrent eqn for N = N*0.9 + D\n net_acclrn = net_acclrn*0.9f + delta;\n //return N\n return net_acclrn;\n }", "public abstract float getMomentOfInertia();", "public void function_yaw(int x, int y,int gyro){\n\n\n }", "@Override\n\tpublic int getMotorSpeed() {\n\t\tupdateIR();\n\t\treturn direction*360;\n\t}", "public float MoveForward(){\n motorLeft1Power = normalSpeed;\n motorLeft2Power = normalSpeed;\n motorRight1Power = normalSpeed;\n motorRight2Power = normalSpeed;\n\n startOrientation = imu.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX).firstAngle;\n motorPID = new PIDController(startOrientation);\n return startOrientation;\n }", "double getVx() { return vel[0]; }", "double deltaX() {\n return -Math.cos(Math.toRadians(this.theta)) * this.length;\n }", "public void update() {\n vel.add(acc);\n vel.limit(max_vel);\n loc.add(vel);\n acc.mult(0);\n }", "private void calculateMovement() {\r\n \tmovementY = (int)(movementSpeed * Math.sin(Math.toRadians(movementDirection - 90)));\r\n \tmovementX = (int)(movementSpeed * Math.cos(Math.toRadians(movementDirection - 90)));\r\n }", "public static StateVector acceleration( StateVector state, int ai ){\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n a = 0;\r\n StateVector acc = new StateVector();\r\n StateVector s = new StateVector();\r\n\r\n acc.copyStateVectors( state ); // set accelerations to zero\r\n acc.ax = 0;\r\n acc.ay = 0;\r\n acc.az = 0;\r\n\r\n for( int n=0; n<ap.ss.nbodies; n++ ) {\r\n if ( body.activated && body.inFreeMotion && (n != body.num) && (ap.ss.b[n].status == 3) ) {\r\n\r\n x = state.x - ap.ss.b[n].advanced[ai].x; // x distance from m\r\n y = state.y - ap.ss.b[n].advanced[ai].y; // y distance .. ..\r\n z = state.z - ap.ss.b[n].advanced[ai].z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n\r\n // only find interactions with massive bodies > 1 kg mass\r\n if ( ap.ss.b[n].m > 1.0 ) {\r\n\r\n // gravitational accelerations act on bodies if > 5 metres distance (to avoid large accelarations)\r\n if ( ap.ss.b[n].status == 3 && ap.ss.b[n].activated && ( r > 5.0 ) ) {\r\n a = -(G * ap.ss.b[n].m) / (r * r); // acceleration towards that\r\n acc.ax = acc.ax + a * x / r; // x component of accel\r\n acc.ay = acc.ay + a * y / r; // y component of accel\r\n acc.az = acc.az + a * z / r; // z component of accel\r\n }\r\n }\r\n }\r\n }\r\n\r\n return( acc );\r\n }", "public float getAngularOffset() {\n return jniGetAngularOffset(addr);\n }", "public double getAverageAcceleration() {\n return (leftEnc.getAcceleration() + rightEnc.getAcceleration()) / 2;\n }", "double getVy() { return vel[1]; }", "@Override\n\tpublic float getAngularVelocity() {\n\t\treturn body.getAngularVelocity();\n\t}", "protected void execute() {\n \tSystem.out.println(\"Gyro: \" + Drivetrain.gyro.getAngle());\n\t\tif (degrees > 0) {\n\t\t\twhile (Drivetrain.gyro.getAngle() < degrees) {\n\t\t\t\tDrivetrain.frontRight.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, 0.25);\n\t\t\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, 0.25);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\twhile (Drivetrain.gyro.getAngle() > degrees) {\n\t\t\t\tDrivetrain.frontRight.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.rearRight.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.frontLeft.set(ControlMode.PercentOutput, -0.25);\n\t\t\t\tDrivetrain.rearLeft.set(ControlMode.PercentOutput, -0.25);\n\t\t\t}\n\t\t}\n }", "public Vector3 getEulerAnglesAcceleration() {\n\t\treturn eulerAnglesAcceleration;\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n mAccelerometer = event.values;\n }\n if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {\n mGeomagnetic = event.values;\n }\n\n if (mAccelerometer != null && mGeomagnetic != null) {\n float R[] = new float[9];\n float I[] = new float[9];\n boolean success = SensorManager.getRotationMatrix(R, I, mAccelerometer, mGeomagnetic);\n if (success) {\n float orientation[] = new float[3];\n SensorManager.getOrientation(R, orientation);\n // at this point, orientation contains the azimuth(direction), pitch and roll values.\n azimuth = 180*orientation[0] / Math.PI;\n double pitch = 180*orientation[1] / Math.PI;\n double roll = 180*orientation[2] / Math.PI;\n\n // Toast.makeText(getApplicationContext(),azimuth+\"--\",Toast.LENGTH_SHORT).show();\n }\n }\n }", "public double getAccelZ() {\n return m_accelerometer.getZ();\n }", "@Override\n public void onSensorChanged (SensorEvent event) {\n\n Sensor mySensor = event.sensor;\n\n if (mySensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n// output.setText(\"x=\" + x + \"y=\" + y + \"z=\" + z);\n // Log.i(\"acc\",(\"x=\" + x + \"y=\" + y + \"z=\" + z));\n// try {\n// String value=String.valueOf(x)+\",\"+String.valueOf(y)+\",\"+ String.valueOf(z);\n// // outvalue.write(value.getBytes());\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// Log.i(\"acc\", Float.toString(x) + Float.toString(y)+Float.toString(z));\n\n }\n }", "public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }", "public int getVelocity()\n\t{\n\t\treturn logDx;\n\t}", "public static void applyPhysics(Drone drone, float dt) throws DroneCrashException, MaxAoAException {\r\n\t\t\r\n\t\t// stepsize bepalen\r\n\t\tfloat h;\r\n\t\tif (dt - drone.getPredictionMethod().getStepSize() >= 0) {\r\n\t\t\th = drone.getPredictionMethod().getStepSize();\r\n\t\t} else if (dt > 0) {\r\n\t\t\th = dt;\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t// huidige versnellingen bepalen\r\n\t\tVector3f[] currentAccelerationsW = calculateAccelerations(drone, h);\r\n\t\t\r\n\t\t// snelheid voorspellen in functie van de huidige vernsellingen en posities\r\n\t\tVector3f[] newVelocities = drone.getPredictionMethod().predictVelocity(drone.getLinearVelocity(), drone.getAngularVelocity(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentAccelerationsW[0], currentAccelerationsW[1], h);\r\n\t\t\r\n\t\t// nieuwe positie berekenen aan de hand van de nieuwe snelheid\r\n\t\tVector3f[] deltaPositions = calculatePositionDifferences(drone, newVelocities, h);\r\n\r\n\t\t// nieuwe snelheid opslaan\r\n\t\tdrone.setLinearVelocity(newVelocities[0]);\r\n\t\tdrone.setAngularVelocity(newVelocities[1]);\r\n\r\n\t\t// translatie en rotatie uitvoeren\r\n\t\tdrone.translate(deltaPositions[0]);\r\n\r\n\t\tif (!deltaPositions[1].equals(new Vector3f(0, 0, 0))) {\r\n\t\t\tVector3f rotationAxis = new Vector3f(0, 0, 0);\r\n\t\t\tdeltaPositions[1].normalise(rotationAxis);\r\n\t\t\tdrone.rotate(deltaPositions[1].length(), rotationAxis);\r\n\t\t}\r\n\r\n\t\t// checken of de drone crasht\r\n\t\tVector3f leftWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getLeftWing().getCenterOfMass()), drone.getPosition(), leftWingCenterOfMass);\r\n\t\tVector3f rightWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getRightWing().getCenterOfMass()),drone.getPosition(), rightWingCenterOfMass);\r\n\t\t\r\n\t\tif (drone.transformToWorldFrame(drone.getEnginePosition()).y + drone.getPosition().y <=\tgroundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the engine hit the ground!\");\r\n\t\t} if (drone.transformToWorldFrame(drone.getTailMassPosition()).y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the tail hit the ground!\");\r\n\t\t} if (leftWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the left wing hit the\tground!\");\r\n\t\t} if (rightWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the right wing hit the ground!\");\r\n\t\t}\r\n\t\tfor (Tyre tyre : drone.getTyres()) {\r\n\t\t\tif (tyre.getRadius() < tyre.getCompression()) {\r\n\t\t\t\tthrow new DroneCrashException(\"Drone Crashed: tyre compressed too much!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// recursieve oproep\r\n\t\tPhysicsEngine.applyPhysics(drone, (dt - h));\r\n\t}", "public double getAccelY() {\n return m_accelerometer.getY();\n }", "private static void norm2JS() {\n\n // Drive\n axLeftX.setAxis(leftJoystick, 0); //Mecanum (Arcade) Left/Right turn\n axLeftY.setAxis(leftJoystick, 1); //Mecanum (Arcade) Fwd/Bkwd\n axRightX.setAxis(rightJoystick, 0); //Mecanum Rotate orientation\n axRightY.setAxis(rightJoystick, 1); //unassigned\n\n btnGyroReset.setButton(rightJoystick, 6); // reset gyro to 0\n\n btnHoldLeft.setButton(rightJoystick, 4); //??\n btnHoldCenter.setButton(rightJoystick,3); //??\n btnHoldRight.setButton(rightJoystick, 5); //??\n \n // Gear\n btnPickupGear.setButton(leftJoystick, 2); // Pickup gear off floor\n btnPlaceGear.setButton( leftJoystick, 5); // Place gear on ship peg\n \n // Shooter\n btnShooter.setButton( leftJoystick, 1); // Start shooter then feeder(s)\n btnAgitator.setButton(leftJoystick, 3); // Agitate the ball bin\n \n // Climb\n btnClimber.setButton(leftJoystick, 8); // Climber rotating\n\n }", "public void reviseMotorSpeed() {\n\t\tmHandler.removeMessages(EVAL_MOTOR_SPEED);\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\t//Retrieve current orientation.\t\t\n\t\t\n\t\tmAzimuth = mStatus.getReadingField(AZIMUTH);\t\t\n\t\tmPitchDeg = mStatus.getReadingField(PITCH);\n\t\tmRollDeg = -mStatus.getReadingField(ROLL);\n\t\t\n\t\tdouble[] errors = new double[4];\n\t\tsynchronized (mAngleTarget) {\n\t\t\t//logArray(\"mAngleTarget\", mAngleTarget);\n\t\t\terrors[0] = mAngleTarget[0] - mRollDeg;\n\t\t\terrors[1] = mAngleTarget[1] - mPitchDeg;\n\t\t\terrors[2] = mAngleTarget[2] - mStatus.getGpsField(dALT);\n\t\t\terrors[3] = mAngleTarget[3] - mAzimuth;\n\t\t\t//logArray(\"errors\", errors);\n\t\t}\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tString errs = \"errors: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\terrs += errors[i] + \": \";\n\t\t}\n\t\t//Log.v(TAG, errs);\n\t\t//For azimuth, multiple possibilities exist for error, each equally valid; but only the error nearest zero makes practical sense.\n\t\tif (errors[3] > 180.0)\n\t\t\terrors[3] -= 360.0;\n\t\tif (errors[3] < -180.0)\n\t\t\terrors[3] += 360.0;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t//Calculate proportional errors\n\t\t\tdouble err = errors[i];//mTarget[i] - mCurrent[i];\n\t\t\t\n\n\t\t\t//Calculate derivative errors.\n\t\t\tlong timeInterval = starttime - mLastUpdate;\n\t\t\tif (timeInterval != 0) {\n\t\t\t\tmErrors[i][2] = (err - mErrors[i][0]) * 1000.0 / timeInterval;\n\t\t\t} else {\n\t\t\t\tmErrors[i][2] = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Mark proportional error\n\t\t\tmErrors[i][0] = err;\n\t\t\t/*if (i == 2)\n\t\t\t\tLog.v(TAG, \"guid, dalt err is \" + err);*/\n\t\t\t//Update integral errors\n\t\t\tmErrors[i][1] -= mIntegralErrors[i][mIntegralIndex];\n\t\t\tmIntegralErrors[i][mIntegralIndex] = err;\n\t\t\tmErrors[i][1] += err;\n\t\t\tmIntegralIndex = ++mIntegralIndex % PIDREPS;\n\t\t\t\n\t\t\t//Calculate changes in output\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tmControlVars[i] += mErrors[i][j] * mGain[i][j];\n\t\t\t}\n\t\t}\n\t\tif (mGuidanceMode.get() == MANUAL) {\n\t\t\tsynchronized (mAngleTarget) {\n\t\t\t\tmControlVars[2] = mAngleTarget[2];\n\t\t\t}\n\t\t}\n\t\tmLastUpdate = starttime;\n\t\t\n\t\t// Constrain control vars:\n\t\tmControlVars[0] = constrainValue(mControlVars[0], -1, 1);\n\t\tmControlVars[1] = constrainValue(mControlVars[1], -1, 1);\n\t\tmControlVars[2] = constrainValue(mControlVars[2], 0, 1);\n\t\tmControlVars[3] = constrainValue(mControlVars[3], -2, 2);\n\t\t\n\t\t/*String vars = \"Control vars: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tvars += mControlVars[i] + \": \";\n\t\t}\n\t\tLog.v(TAG, vars);*/\n\t\t\n\t\tcontrolVarsToMotorSpeeds();\n\t\t\n\t\t//Send motor values to motors here:\n\t\tupdateMotors();\n\t\tupdateAngleTarget();\n\t\t//Log.v(TAG, \"motors: \" + mMotorSpeed[0] + \", \" + mMotorSpeed[1] + \", \" + mMotorSpeed[2] + \", \" + mMotorSpeed[3]);\n\t\t//Sleep a while\n\t\tlong timetonext = (1000 / PIDREPS) - (System.currentTimeMillis() - starttime);\n\t\t//Log.v(TAG, \"time to next: \" + timetonext);\n\t\tint currentMode = mGuidanceMode.get();\n\t\tif ((currentMode == MANUAL) || (currentMode == AUTOPILOT)) {\n\t\t\tif (timetonext > 0)\n\t\t\t\tmHandler.sendEmptyMessageDelayed(EVAL_MOTOR_SPEED, timetonext);\n\t\t\telse {\n\t\t\t\tLog.e(TAG, \"Guidance too slow\");\n\t\t\t\tmHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\t\t}\n\t\t}\n\t}", "public float getSpring_damping_ang_x() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 116);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 108);\n\t\t}\n\t}", "float getYaw();", "float getYaw();", "private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "private void getAcceleroMeterAndMagneticFieldSensorIfNeeded() {\n if( !hasAppropriateSensor() ) { // no rotation vector\n List acceleroMeterSensorList = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER);\n List magneticFieldSensorList = sensorManager.getSensorList(Sensor.TYPE_MAGNETIC_FIELD);\n if( acceleroMeterSensorList != null && !acceleroMeterSensorList.isEmpty() &&\n magneticFieldSensorList != null && !magneticFieldSensorList.isEmpty() ) {\n Log.d(\"Ball\", \"Accelerometer and magnetic field is available\");\n sensorList = new ArrayList<Sensor>();\n sensorList.addAll(acceleroMeterSensorList);\n sensorList.addAll(magneticFieldSensorList);\n } else {\n Log.d(\"Ball\", \"Accelerometer and magnetic field is NOT available\");\n }\n }\n }", "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "private void updateAngles(){\n double xCompassVal, yCompassVal, radCompassVal, compassHeading;\n xCompassVal = compass.getValues()[0];\n yCompassVal = compass.getValues()[2];\n radCompassVal = Math.atan2(yCompassVal, xCompassVal);\n compassHeading = (radCompassVal - 1.5708);\n\n if(compassHeading < 0.0){\n compassHeading = compassHeading + (2 * Math.PI);\n }\n this.currentHeading = compassHeading;\n\n\n //Update difference to position\n double dx = 0.0;\n double dy = 0.0;\n double bearing = 0;\n if(this.currentNode != null && this.nextNode != null ){\n System.out.println(\"Nodes Not Null\");\n dx = this.nextNode.getX() - this.currentNode.getX();\n dy = this.nextNode.getY() - this.currentNode.getY();\n\n }\n\n if (dx > 0 ){\n System.out.println(\"RADD CHECK \" + Math.atan(dy/dx));\n bearing = (Math.PI/2) - Math.atan(dy/dx);\n\n }\n\n if (dx > 0 ){\n System.out.println(\"RADD \" + Math.atan(dy/dx));\n bearing = (0.75 * Math.PI) - Math.atan(dy/dx);\n\n }\n\n if (dx == 0){\n System.out.println(\"dx == 0; Avoiding divide by 0...\");\n\n if (dy > 0) bearing = 0;\n if (dy < 0) bearing = Math.PI;\n if (dy == 0) bearing = 0;\n }\n\n this.bearingAngle = bearing;\n\n }", "protected void execute() {\r\n timespan = date.getTime() - lastTime;\r\n allaxes = accelerometer.GetAcceleration();\r\n velocityX = velocityX + allaxes.XAxis * timespan;\r\n velocityY = velocityY + allaxes.YAxis * timespan;\r\n theDash.log(velocityX,\"X\");\r\n }", "public AccOrientation calculateAngle(SensorEvent event) {\t\t\n\t final int _DATA_X = 0;\n\t final int _DATA_Y = 1;\n\t final int _DATA_Z = 2;\n\t // Angle around x-axis thats considered almost perfect vertical to hold\n\t // the device\n\t final int PIVOT = 20;\n\t // Angle around x-asis that's considered almost too vertical. Beyond\n\t // this angle will not result in any orientation changes. f phone faces uses,\n\t // the device is leaning backward.\n\t final int PIVOT_UPPER = 65;\n\t // Angle about x-axis that's considered negative vertical. Beyond this\n\t // angle will not result in any orientation changes. If phone faces uses,\n\t // the device is leaning forward.\n\t final int PIVOT_LOWER = -10;\n\t // Upper threshold limit for switching from portrait to landscape\n\t final int PL_UPPER = 295;\n\t // Lower threshold limit for switching from landscape to portrait\n\t final int LP_LOWER = 320;\n\t // Lower threshold limt for switching from portrait to landscape\n\t final int PL_LOWER = 270;\n\t // Upper threshold limit for switching from landscape to portrait\n\t final int LP_UPPER = 359;\n\t // Minimum angle which is considered landscape\n\t final int LANDSCAPE_LOWER = 235;\n\t // Minimum angle which is considered portrait\n\t final int PORTRAIT_LOWER = 60;\n\t \n\t // Internal value used for calculating linear variant\n\t final float PL_LF_UPPER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float PL_LF_LOWER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t // Internal value used for calculating linear variant\n\t final float LP_LF_UPPER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float LP_LF_LOWER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t \n\t int mSensorRotation = -1; \n\t \n\t\t\tfinal boolean VERBOSE = true;\n float[] values = event.values;\n float X = values[_DATA_X];\n float Y = values[_DATA_Y];\n float Z = values[_DATA_Z];\n float OneEightyOverPi = 57.29577957855f;\n float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);\n float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;\n int rotation = -1;\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n AccOrientation result = new AccOrientation();\n \n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n result.orientation = orientation;\n result.angle = zyangle; \n result.threshold = 0;\n if ((zyangle <= PIVOT_UPPER) && (zyangle >= PIVOT_LOWER)) {\n // Check orientation only if the phone is flat enough\n // Don't trust the angle if the magnitude is small compared to the y value\n \t/*\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n normalize to 0 - 359 range\n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n mOrientation.setText(String.format(\"Orientation: %d\", orientation));\n */ \n // Orientation values between LANDSCAPE_LOWER and PL_LOWER\n // are considered landscape.\n // Ignore orientation values between 0 and LANDSCAPE_LOWER\n // For orientation values between LP_UPPER and PL_LOWER,\n // the threshold gets set linearly around PIVOT.\n if ((orientation >= PL_LOWER) && (orientation <= LP_UPPER)) {\n float threshold;\n float delta = zyangle - PIVOT;\n if (mSensorRotation == ROTATION_090) {\n if (delta < 0) {\n // Delta is negative\n threshold = LP_LOWER - (LP_LF_LOWER * delta);\n } else {\n threshold = LP_LOWER + (LP_LF_UPPER * delta);\n }\n rotation = (orientation >= threshold) ? ROTATION_000 : ROTATION_090;\n if (mShowLog) \n \tLog.v(TAG, String.format(\"CASE1. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n } else {\n if (delta < 0) {\n // Delta is negative\n threshold = PL_UPPER+(PL_LF_LOWER * delta);\n } else {\n threshold = PL_UPPER-(PL_LF_UPPER * delta);\n }\n rotation = (orientation <= threshold) ? ROTATION_090: ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE2. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n }\n result.threshold = threshold;\n } else if ((orientation >= LANDSCAPE_LOWER) && (orientation < LP_LOWER)) {\n rotation = ROTATION_090;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE3. 90 (%d)\", orientation));\n } else if ((orientation >= PL_UPPER) || (orientation <= PORTRAIT_LOWER)) {\n rotation = ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE4. 00 (%d)\", orientation)); \n } else {\n \tif (mShowLog)\n \t\tLog.v(TAG, \"CASE5. \"+orientation);\n }\n if ((rotation != -1) && (rotation != mSensorRotation)) {\n mSensorRotation = rotation;\n if (mSensorRotation == ROTATION_000) {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 00\");\n }\n else if (mSensorRotation == ROTATION_090) \n {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 90\");\n } \n }\n result.rotation = rotation;\n } else {\n \t//Log.v(TAG, String.format(\"Invalid Z-Angle: %2.4f (%d %d)\", zyangle, PIVOT_LOWER, PIVOT_UPPER));\n }\t\n return result;\n\t\t}", "protected void execute() {\n \t\n \tdouble rightJoystickXAxis, leftJoystickYAxis, leftMotorOutput, rightMotorOutput;\n \t\n \trightJoystickXAxis = JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.RIGHT_JOYSTICK_X),\n \t\t\t0.0, 0.0, 1.0, 1.0);\n \tif(Robot.driveTrain.isRightSideOutputInverted()) {\n \t\tleftJoystickYAxis = -JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.LEFT_JOYSTICK_Y),\n \t\t\t0.0, 0.0, 1.0, -1.0);\n \t}\n \telse\n \t{\n \t\tleftJoystickYAxis = JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.LEFT_JOYSTICK_Y),\n \t\t\t0.0, 0.0, 1.0, -1.0);\n \t}\n \t\n \t\n \tif ( rightJoystickXAxis == 0.0 && leftJoystickYAxis != 0.0 )\t//straight forward or reverse with the x axis in deadband\n \t{\n \t\tleftMotorOutput = leftJoystickYAxis;\n \t\trightMotorOutput = leftJoystickYAxis;\n \t}\n \t\n \telse if ( rightJoystickXAxis > 0.0 && leftJoystickYAxis != 0.0 )\t//quadrant I or IV\n \t{\n \t\tleftMotorOutput = leftJoystickYAxis;\n \t\trightMotorOutput = leftJoystickYAxis - rightJoystickXAxis;\n \t}\n \t\n \telse if ( rightJoystickXAxis < 0.0 && leftJoystickYAxis != 0.0 )\t//quadrant II or III\n \t{\n \t\trightMotorOutput = leftJoystickYAxis;\n \t\tleftMotorOutput = leftJoystickYAxis + rightJoystickXAxis;\n \t}\n \t\n \telse if ( leftJoystickYAxis == 0.0 && rightJoystickXAxis != 0.0 )\t//rotate left or right with the y axis in deadband\n \t{\n \t\tleftMotorOutput = rightJoystickXAxis;\n \t\trightMotorOutput = -rightJoystickXAxis;\n \t}\n \t\n \telse\t//x axis in deadband and y axis in deadband\n \t{\n \t\tleftMotorOutput = 0.0;\n \t\trightMotorOutput = 0.0;\n \t}\n \t\n \tbrakeFactor = JoystickAxisScaling.getY(Robot.oi.joystickDriver.getRawAxis(Constants.LEFT_TRIGGER),\n \t\t\t0.0, 0.0, 1.0, 0.8);\n \t\n \tRobot.driveTrain.updateDriveSpeeds(leftMotorOutput * (1-brakeFactor), rightMotorOutput * (1-brakeFactor));\n \t\n }", "Double getTensionForce();", "@Override\n public int getSteeringAngle(int[] pixels) {\n leftLine.clearPoints();\n rightLine.clearPoints();\n findLaneLines(pixels, getCameraHeight() - START_SEARCH, getCameraWidth() / 2, getCameraWidth() / 2);\n setMidPoints(calculateMidPoints());\n setSteerPoint(calculateSteerPoint());\n setLeftPoints(leftLine.getLanePoints());\n setRightPoints(rightLine.getLanePoints());\n return getDegreeOffset(getOrigin(), getSteerPoint());\n }", "@Override\npublic int accelerate(int speed) {\n\tint carSpeed=getSpeed();\n\treturn carSpeed;\n}", "float getDir() {\n return degrees(_rotVector.heading());\n }", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }", "public void calculateRotation() {\r\n float x = this.getX();\r\n float y = this.getY();\r\n\r\n float mouseX = ((float) Mouse.getX() - 960) / (400.0f / 26.0f);\r\n float mouseY = ((float) Mouse.getY() - 540) / (400.0f / 23.0f);\r\n\r\n float b = mouseX - x;\r\n float a = mouseY - y;\r\n\r\n rotationZ = (float) Math.toDegrees(Math.atan2(a, b)) + 90;\r\n\r\n forwardX = (float) Math.sin(Math.toRadians(rotationZ));\r\n forwardY = (float) -Math.cos(Math.toRadians(rotationZ));\r\n }" ]
[ "0.6672496", "0.6631986", "0.6522913", "0.6218627", "0.62127674", "0.6187674", "0.60686815", "0.5958533", "0.59359336", "0.59097075", "0.5853644", "0.5820635", "0.581361", "0.5789621", "0.5778642", "0.5772283", "0.5767283", "0.57443005", "0.57297975", "0.5688987", "0.5676046", "0.56491035", "0.5614144", "0.5593763", "0.5539846", "0.55209464", "0.5508183", "0.5492119", "0.5487264", "0.54800826", "0.5438122", "0.54284567", "0.5376037", "0.53754973", "0.53528804", "0.535153", "0.5334644", "0.5332532", "0.53184867", "0.5310407", "0.5307591", "0.5295167", "0.52907115", "0.5286279", "0.52797365", "0.52794886", "0.52741754", "0.52708346", "0.5268901", "0.526295", "0.52564657", "0.5253855", "0.52520114", "0.52256316", "0.52249587", "0.522296", "0.5220002", "0.5215943", "0.52135295", "0.5213093", "0.52108586", "0.5204735", "0.5202174", "0.5200658", "0.51965165", "0.51927346", "0.5181362", "0.5178302", "0.5176169", "0.51712215", "0.5168734", "0.5159488", "0.5154158", "0.5131276", "0.5129535", "0.5120975", "0.51176405", "0.5115654", "0.5112519", "0.51047087", "0.5102206", "0.5100422", "0.50954086", "0.5094142", "0.5093532", "0.5093532", "0.5090872", "0.5090118", "0.5089626", "0.5088345", "0.5085185", "0.5082589", "0.5082039", "0.5081666", "0.50811374", "0.5080754", "0.50794274", "0.50788784", "0.50742674", "0.5072499" ]
0.6076306
6
Calculates and returns the linear and angular accelerations of the drone (in world frame). The given forces Vector3f[] array is assumed to contain the forces at index 0 and torque at index 1, both in drone frame.
private static Vector3f[] calculateAccelerations(Drone drone, Vector3f[] forces) { // linear acceleration Vector3f linearAccelerationW = new Vector3f(forces[0].x / drone.getMass(), forces[0].y / drone.getMass(), forces[0].z / drone.getMass()); // rotational inertia values float iXx = drone.getInertiaMatrix().m00; float iYy = drone.getInertiaMatrix().m11; float iZz = drone.getInertiaMatrix().m22; // angular velocity Vector3f omega = drone.getAngularVelocity(); // angular acceleration Vector3f angularAccelerationW = new Vector3f(); angularAccelerationW.x = (forces[1].x + (iYy - iZz) * omega.y * omega.z) / iXx; angularAccelerationW.y = (forces[1].y + (iZz - iXx) * omega.x * omega.z) / iYy; angularAccelerationW.z = (forces[1].z + (iXx - iYy) * omega.x * omega.y) / iZz; // return the results return new Vector3f[] { linearAccelerationW, angularAccelerationW }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Vector3f[] calculateAccelerations(Drone drone, float stepsize) throws MaxAoAException {\r\n\t\treturn calculateAccelerations(drone, calculateForces(drone, stepsize));\r\n\t}", "private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesList.size();i++)\n\t\t{\n\t\t\tnewAcceleration.x += forcesList.get(i).force.x / mass;\n\t\t\tnewAcceleration.y += forcesList.get(i).force.y / mass;\n\t\t\t\n\t\t\tif(forcesList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveForce(forcesList.get(i));\n\t\t\t}\n\t\t}\n\t\tacceleration = newAcceleration;\n\t\t\n\t\tfloat newAngularAcc = 0;\n\t\t\n\t\tfor(int i=0;i<torqueList.size();i++)\n\t\t{\n\t\t\tnewAngularAcc += torqueList.get(i).torqueVal / mass;\n\t\t\tif(torqueList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveTorque(torqueList.get(i));\n\t\t\t}\n\t\t}\n\t\tangularAcceleration = newAngularAcc;\n\t\t\n\t}", "private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) {\r\n\r\n\t\t\r\n\t\t// calculate the average linear velocity\r\n\t\tVector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]);\r\n\r\n\t\t// calculate the translation\r\n\t\tVector3f deltaPositionW = (Vector3f) avgLinearVelocityW.scale(dt);\r\n\r\n\t\t// calculate the average angular velocity\r\n\t\tVector3f avgAngularVelocityW = average(drone.getAngularVelocity(), newVelocities[1]);\r\n\r\n\t\t// calculate the rotation\r\n\t\tVector3f deltarotationW = ((Vector3f) avgAngularVelocityW.scale(dt));\r\n\r\n\t\treturn new Vector3f[] { deltaPositionW, deltarotationW };\r\n\t}", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularAcceleration() { return nAngularAcceleration(address()); }", "public void updateAcceleration (Body[] bodies) {\n\n boolean collision;\n\n for (int i = 0; i < bodies.length; i ++) {\n\n Body otherBody = bodies[i];\n if (this.merged == false && otherBody.merged == false) {\n collision = this.collisionDetection(otherBody);\n\n // if there's a collision between this and another body, stop the loop\n if (collision == true) {\n this.collisionPhsysics(otherBody);\n System.out.println(\"Collision occured!\");\n break;\n }\n else {\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n // catch division / 0\n temp_acc = 0;\n }\n this.ax += temp_acc * (otherBody.x - this.x);\n this.ay += temp_acc * (otherBody.y - this.y);\n }\n\n if (otherBody.name != this.name){\n // computes and updates axplusone and ayplusone\n\n double r = Math.sqrt(Math.pow((this.euler_x - otherBody.euler_x),2) + Math.pow((this.euler_y - otherBody.euler_y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n temp_acc = 0;\n }\n this.axplusone += temp_acc * (otherBody.euler_x - this.euler_x);\n this.ayplusone += temp_acc * (otherBody.euler_y - this.euler_y);\n }\n }\n }\n }\n\n }", "private static Vector2 calculateAcceleration(PhysicsGameObject obj){\n Vector2 gravity = gravityForce(obj);\n Vector2 friction = frictionForce(obj);\n return new Vector2(friction.x + gravity.x,friction.y + gravity.y);\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f LinearAcceleration() { return nLinearAcceleration(address()); }", "public void CalculateForces(){\n\n Vec3f gravon= mult(this.gravity,this.mass);\n this.force.add(gravon);\n// Totalforce.add(force);\n }", "public void accelerate(float acceleration)\n\t{\n\t\t\n\t\tif(type == PhysicsType.BULLET)\n\t\t{\n\t\t\t// apply double force to front wheels instead of single force to all wheels\n\t\t\tbulletVehicleControl.accelerate(0, 2*acceleration);\n\t\t\tbulletVehicleControl.accelerate(1, 2*acceleration);\n\t\t}\n\t\telse\n\t\t\tchronoVehicleControl.setAcceleratorPedalIntensity(-acceleration/1000f);\n\t}", "public void applyForce(PVector force) {\n acceleration.add(force);\n }", "public void applyForce(PVector force) {\n acceleration.add(force);\n }", "public void applyForce(PVector force) {\n acceleration.add(force);\n }", "@SuppressWarnings(\"unused\")\n \tpublic static double Distance(\tArrayList<Float> x_accel, \n \t\t\t\t\t\t\t\t\tArrayList<Float> y_accel, \n \t\t\t\t\t\t\t\t\tArrayList<Float> z_accel,\n \t\t\t\t\t\t\t\t\tArrayList<Float> t)\n \t{\n \t\tArrayList<Float> dx_veloc = new ArrayList<Float>(); dx_veloc.add(0f);\n \t\tArrayList<Float> dy_veloc = new ArrayList<Float>(); dy_veloc.add(0f);\n \t\tArrayList<Float> dz_veloc = new ArrayList<Float>(); dz_veloc.add(0f);\n \t\t\n \t\tArrayList<Float> x_veloc = new ArrayList<Float>(); x_veloc.add(0f);\n \t\tArrayList<Float> y_veloc = new ArrayList<Float>(); y_veloc.add(0f);\n \t\tArrayList<Float> z_veloc = new ArrayList<Float>(); z_veloc.add(0f);\n \t\t\n \t\t//compose velocity\n \t\tint I = x_accel.size();\n \t\tfloat dt;\n \t\tSystem.out.println(\"Composing Velocity...\\n\");\n \t\tfor( int i = 1; i < I; i++ )\n \t\t{\t\n \t\t\t//x'_i = x''_(i-1) * dt\n \t\t\t//y'_i = y''_(i-1) * dt\n \t\t\t//z'_i = z''_(i-1) * dt\n \t\t\tdt = t.get(i) - t.get(i-1);\n \t\t\tdx_veloc.add( x_accel.get(i-1) * dt);\n \t\t\tdy_veloc.add( y_accel.get(i-1) * dt);\n \t\t\tdz_veloc.add( z_accel.get(i-1) * dt);\n \t\t\tSystem.out.println(\"Step: \" + i + \"\\n\\tv_x: \"+ dx_veloc.get(i) + \"\\n\\tv_y: \" + dy_veloc.get(i) + \"\\n\\tv_z: \" + dz_veloc.get(i));\n \t\t}\n \t\tfloat temp = 0f;\n \t\tfor(float d : dx_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\tx_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\ttemp = 0;\n \t\tfor(float d : dy_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\ty_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\ttemp = 0;\n \t\tfor(float d : dz_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\tz_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\tArrayList<Float> dx_disp = new ArrayList<Float>(); dx_disp.add(0f); dx_disp.add(0f);\n \t\tArrayList<Float> dy_disp = new ArrayList<Float>(); dy_disp.add(0f); dy_disp.add(0f);\n \t\tArrayList<Float> dz_disp = new ArrayList<Float>(); dz_disp.add(0f); dz_disp.add(0f);\n \t\t\n \t\tArrayList<Float> x_disp = new ArrayList<Float>(); x_disp.add(0f); x_disp.add(0f);\n \t\tArrayList<Float> y_disp = new ArrayList<Float>(); y_disp.add(0f); y_disp.add(0f);\n \t\tArrayList<Float> z_disp = new ArrayList<Float>(); z_disp.add(0f); z_disp.add(0f);\n \t\t\n \t\t//compose displacement\n \t\tI = t.size();\n \t\tfor( int i = 2; i < I; i++ )\n \t\t{\t\n \t\t\t//x_i = x'_(i-1) * dt\n \t\t\t//y_i = y'_(i-1) * dt\n \t\t\t//z_i = z'_(i-1) * dt\n \t\t\tdt = t.get(i) - t.get(i-1);\n \t\t\tdx_disp.add( x_veloc.get(i-1) * dt);\n \t\t\tdy_disp.add( y_veloc.get(i-1) * dt);\n \t\t\tdz_disp.add( z_veloc.get(i-1) * dt);\n \t\t}\n \t\t\n \t\t//compose total displacement\n \t\tfloat distance = 0;\n \n \t\tif( true/*Euclidean_Distance_Mode */)\n \t\t{\n \t\t\t//vector addition, constructing R\n \t\t\tSystem.out.println(\"Composing R...\\n\");\n \t\t\tfloat r[] = new float[3]; //[x, y, z]\n \t\t\tfor( int i = 0; i < I; i++)\n \t\t\t{\n \t\t\t\tr[0] += dx_disp.get(i);\n \t\t\t\tr[1] += dy_disp.get(i);\n \t\t\t\tr[2] += dz_disp.get(i);\n \t\t\t\tSystem.out.println(\"Step: \" + i + \"\\n\\tr_x: \"+ r[0] + \"\\n\\tr_y: \" + r[1] + \"\\n\\tr_z: \" + r[2]);\n \t\t\t}\n \t\t\n \t\t\t//Distance formula, constructing D\n \t\t\t//D = sqrt(X^2 + Y^2 + Z^2)\n \t\t\tdistance = (float) Math.sqrt( \n \t\t\t\t\t\t\tMath.pow(r[0], 2) + \n \t\t\t\t\t\t\tMath.pow(r[1], 2) +\n \t\t\t\t\t\t\tMath.pow(r[2], 2)\n \t\t\t\t\t\t\t);\n \t\t\treturn distance;\n \t\t}\n \n \t\telse if ( false /*Path_Distance_Mode */)\n \t\t{\n \t\t\t//sum up individual distances, constructing D\n \t\t\tfor( int i = 0; i < I; i++)\n \t\t\t{\n \t\t\t\t//dD = sqrt( dx^2 + dy^2 + dz^2 )\n \t\t\t\tdistance += Math.sqrt(\n \t\t\t\t\t\t\t\tMath.pow(dx_disp.get(i), 2) +\n \t\t\t\t\t\t\t\tMath.pow(dy_disp.get(i), 2) +\n \t\t\t\t\t\t\t\tMath.pow(dz_disp.get(i), 2)\n \t\t\t\t\t\t\t\t);\n \t\t\t}\t\t\n \t\t\treturn distance;\n \t\t} \n \treturn 0; //won't get here.\n }", "public ULine[] applyWheels(Wheel[] wheels) {\n accelerationVector = new Point(0,0);\n rotationalAcceleration = 0;\n for (Wheel wheel : wheels) {\n accelerationVector = accelerationVector.add(wheel.getPosition());\n rotationalAcceleration += (Math.PI/2) * Math.sin(wheel.getPosition().rotation() - defaults.getWheel(wheel.getLocation()).getPosition().rotation());\n }\n //rotationalAcceleration *= accelerationVector.length();\n return renderWheels(wheels);\n }", "public void EulerNextPos(Body[] bodies, int dt) {\n double ax = 0;\n double ay = 0;\n double temp_vx = this.vx;\n double temp_vy = this.vy;\n for (int i = 0; i < bodies.length; i++) {\n Body otherBody = bodies[i];\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){ \n temp_acc = 0;\n }\n ax += temp_acc * (otherBody.x - this.x);\n ay += temp_acc * (otherBody.y - this.y);\n }\n }\n // change temp_vx and temp_vy based on acceleration\n temp_vx += ax * dt;\n temp_vy += ay * dt;\n \n this.euler_x = this.x + temp_vx * dt;\n this.euler_y = this.y + temp_vy * dt;\n }", "@Override\n\tpublic double[] getDx() {\n\t double object[] = new double[2];\n\t for(int i = 0; i < x.length; i++){\n\t object[0] += theta[0] + theta[1] * x[i] - y[i];\n\t object[1] += (theta[0] + theta[1] * x[i] - y[i])*x[i];\n\t }\n\t theta[0] -= eta * object[0];\n\t theta[1] -= eta * object[1];\n\n\t return theta;\n }", "public float getForce() { \n \treturn force; \n }", "public void calcAcceleration() {\n double firstSpeed = get(0).distanceTo(get(1)) / ((get(1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n double lastSpeed = get(length() - 2).distanceTo(get(length() - 1))\n / ((get(length() - 1).getTime() - get(length() - 2).getTime()) * INTER_FRAME_TIME);\n avgAcceleration = (firstSpeed + lastSpeed) / ((get(length() - 1).getTime() - get(0).getTime()) * INTER_FRAME_TIME);\n }", "float[] calculate(float[] acc, float[] oldAcc, float[] gyr , float[] oldGyr,float[] oldGra, float[] oldAccVelDisGra)\n {\n// System.out.println(\"inside method acc:\"+acc[0]+\", \"+acc[1]+\", \"+acc[2]+\", oldAcc:\"+oldAcc[0]+\", \"+oldAcc[1]+\", \"+oldAcc[2]);\n// System.out.println(\"inside method gravity:\"+oldGra[0]+\", \"+oldGra[1]+\", \"+oldGra[2]);\n if (oldAccVelDisGra==null)\n {\n oldAccVelDisGra= new float[9];\n for (int i = 0; i <9; i++) {\n oldAccVelDisGra[i]=0.0f;\n }\n }\n float[] oldDynamicAcc = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldVelocity = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldDistance = new float[]{0.0f, 0.0f, 0.0f};\n float[] newGra = gravityFromRotation(oldGra, gyr);\n\n for (int i = 0; i < 3; i++) {\n oldDynamicAcc[i] = oldAccVelDisGra[i];\n oldVelocity[i] = oldAccVelDisGra[i+3];\n oldDistance[i] = oldAccVelDisGra[i+6];\n }\n float[] accVelDisGra = new float[]{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};\n float[] dynAccDiff = dynamicAccDiff(acc,gyr,oldGra,oldAcc,oldGyr);\n float[] dynamicAcc = dynamicAcc(oldDynamicAcc, dynAccDiff);\n float[] velocity = velocity(oldVelocity,dynamicAcc);\n float[] distance = distance(oldDistance, velocity);\n for (int i = 0; i < 3; i++) {\n accVelDisGra[i]=dynamicAcc[i];\n accVelDisGra[i+3]= velocity[i];\n accVelDisGra[i+6]=distance[i];\n accVelDisGra[i+9]=newGra[i];\n }\n return accVelDisGra;\n }", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "public double computeForces(Density density, Parameters1 p1, boolean verbose, PrintWriter forceWriter) {\n\t\tVectorDouble tangent, u_plus = null, u_minus = null;\n\t\tVectorDouble gradF;\n\t\tVectorDouble springF;\n\t\tVectorDouble angleF;\n\t\tdouble gradFNorms = 0.0;\n\t\tdouble springFNorms = 0.0;\n\t\tdouble angleFNorms = 0.0;\n\t\tdouble totalFNorms = 0.0;\n\t\t\n\t\tfor (int i = 1; i < points.length - 1; i++) {\n\t\t\ttangent = tangentInstance.getTangent(points[i - 1], points[i], points[i + 1]);\n\t\t\tu_plus = VectorDouble.subtract(points[i + 1], points[i]);\n\t\t\tu_minus = VectorDouble.subtract(points[i], points[i - 1]);\n\n\t\t\tgradF = VectorDouble.perpendicularProjection(tangent, density.getGradient(points[i]));\n\t\t\tgradF.scalarMult(p1.gradConst);\n\t\t\tgradFNorms += gradF.norm();\n\n\t\t\tspringF = VectorDouble.scalarMult((u_plus.norm() - u_minus.norm()) / tangent.norm(), tangent);\n\t\t\tspringFNorms += springF.norm();\n\n\t\t\tangleF = p1.anglePenalty.getAnglePenalty(u_plus, u_minus);\n\t\t\tangleFNorms += angleF.norm();\n\t\t\tforces[i] = VectorDouble.linearCombination(1.0, gradF, 1.0, springF, 1.0, angleF);\n\t\t\ttotalFNorms += forces[i].norm();\n\t\t}\n\n\t\tdouble averageGradFNorm = gradFNorms / (double) (points.length - 2);\n\t\tdouble averageSpringFNorm = springFNorms / (double) (points.length - 2);\n\t\tdouble averageAngleFNorm = angleFNorms / (double) (points.length - 2);\n\t\tdouble averageTotalFNorm = totalFNorms / (double) (points.length - 2);\n\t\t\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"Average gradient force = \" + averageGradFNorm);\n\t\t\tSystem.out.println(\"Average spring force = \" + averageSpringFNorm);\n\t\t\tSystem.out.println(\"Average angle force = \" + averageAngleFNorm);\n\t\t\tSystem.out.println(\"Average total force = \" + averageTotalFNorm);\n\t\t}\n\t\tforceWriter.print(averageGradFNorm + \", \");\n\t\tforceWriter.print(averageSpringFNorm + \", \");\n\t\tforceWriter.print(averageAngleFNorm + \", \");\n\t\tforceWriter.println(averageTotalFNorm);\n\n\t\treturn averageTotalFNorm;\n\t}", "Double getTensionForce();", "private void applyForce(PVector force)\n\t{\n\t\tacceleration.add(force);\n\t}", "public void applyForce(PVector force) {\n PVector f = force.get();\n f.div(mass); // ignoring mass right now\n acceleration.add(f);\n }", "private static Vector2D getAcceleration(Vector2D affectedPosition,\n Vector2D influencer1Position, Vector2D influencer2Position,\n Vector2D influencer3Position, Vector2D influencer4Position,\n double affectedMass,\n double influencer1Mass, double influencer2Mass,\n double influencer3Mass, double influencer4Mass) {\n final Vector2D influencer1Force = Utils\n .gravitationalForce(affectedMass, influencer1Mass, affectedPosition, influencer1Position);\n final Vector2D influencer2Force = Utils\n .gravitationalForce(affectedMass, influencer2Mass, affectedPosition, influencer2Position);\n final Vector2D influencer3Force = Utils\n .gravitationalForce(affectedMass, influencer3Mass, affectedPosition, influencer3Position);\n final Vector2D influencer4Force = Utils\n .gravitationalForce(affectedMass, influencer4Mass, affectedPosition, influencer4Position);\n return Stream.of(influencer1Force, influencer2Force, influencer3Force, influencer4Force)\n .reduce(Vector2D.ZERO, Vector2D::add).scalarMultiply(1 / affectedMass);\n }", "public static StateVector acceleration( StateVector state, int ai ){\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n a = 0;\r\n StateVector acc = new StateVector();\r\n StateVector s = new StateVector();\r\n\r\n acc.copyStateVectors( state ); // set accelerations to zero\r\n acc.ax = 0;\r\n acc.ay = 0;\r\n acc.az = 0;\r\n\r\n for( int n=0; n<ap.ss.nbodies; n++ ) {\r\n if ( body.activated && body.inFreeMotion && (n != body.num) && (ap.ss.b[n].status == 3) ) {\r\n\r\n x = state.x - ap.ss.b[n].advanced[ai].x; // x distance from m\r\n y = state.y - ap.ss.b[n].advanced[ai].y; // y distance .. ..\r\n z = state.z - ap.ss.b[n].advanced[ai].z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n\r\n // only find interactions with massive bodies > 1 kg mass\r\n if ( ap.ss.b[n].m > 1.0 ) {\r\n\r\n // gravitational accelerations act on bodies if > 5 metres distance (to avoid large accelarations)\r\n if ( ap.ss.b[n].status == 3 && ap.ss.b[n].activated && ( r > 5.0 ) ) {\r\n a = -(G * ap.ss.b[n].m) / (r * r); // acceleration towards that\r\n acc.ax = acc.ax + a * x / r; // x component of accel\r\n acc.ay = acc.ay + a * y / r; // y component of accel\r\n acc.az = acc.az + a * z / r; // z component of accel\r\n }\r\n }\r\n }\r\n }\r\n\r\n return( acc );\r\n }", "private static double calculateAcceleration(double force, double mass) {\n return force / mass;\n }", "private native void UpdateAcceleration(float infAccelerationX, float infAccelerationY, float infAccelerationZ);", "public void inertia_x() {\n if (!isMovingLeft && !isMovingRight) {\n if (Math.abs(speedX) < acceleration) speedX = 0;\n else if (speedX < 0) speedX += acceleration;\n else speedX -= acceleration;\n }\n }", "public Vector3d getAcceleration() {\n return getMotion().getAcceleration();\n }", "public void applyForce()\r\n {\n\tVector2d v = new Vector2d();\r\n\tv.sub(x, R.getPosition());\r\n\tdouble L = v.length();\r\n\tv.normalize();\r\n\tVector2d vel = R.getVelocityLinear();//fragile ref\r\n\t//double vn = vel.dot(v);\r\n\tdouble k = Constants.STIFFNESS_STRETCH_DENSITY * R.getMass();\r\n\tv.scale( k*L ); //- 0.2*k*vn );//force\r\n\tR.applyWrenchW(v, 0);//at center of mass, so no torque\r\n\r\n\t/// DAMP RIGIDBODY MOTION\r\n\tv.set(vel);\r\n\tv.scale( -0.2 * k );\r\n\tR.applyWrenchW(v, 0);\r\n }", "@Override\n public final void onSensorChanged(SensorEvent event) {\n linearAccelerations = event.values;\n linearAccelerations[0] = linearAccelerations[0]-xOff;\n linearAccelerations[1] = linearAccelerations[1]-yOff;\n linearAccelerations[2] = linearAccelerations[2]-zOff;\n xAccel = (float) round(linearAccelerations[0]/9.8, 3);\n yAccel = (float) round(linearAccelerations[1]/9.8, 3);\n zAccel = (float) round(linearAccelerations[2]/9.8, 3);\n// Log.i(appLabel, \"Acceleration: (\"+xAccel+\", \"+yAccel+\", \"+zAccel+\")\");\n xAccelSquared = (float) round(xAccel*xAccel, 3);\n yAccelSquared = (float) round(yAccel*yAccel, 3);\n zAccelSquared = (float) round(zAccel*zAccel, 3);\n //If they are negative accelerations, squaring them will have made them positive\n if (xAccel < 0) {\n xAccelSquared = xAccelSquared*-1;\n }\n if (yAccel < 0) {\n yAccelSquared = yAccelSquared*-1;\n }\n if (zAccel < 0) {\n zAccelSquared = zAccelSquared*-1;\n }\n xAccelOutput.setText(String.valueOf(xAccel));\n yAccelOutput.setText(String.valueOf(yAccel));\n zAccelOutput.setText(String.valueOf(zAccel));\n// Log.i(appLabel, \"Acceleration squares: \"+xAccelSquared+\", \"+yAccelSquared+\", \"+zAccelSquared);\n float accelsSum = xAccelSquared+yAccelSquared+zAccelSquared;\n double accelsRoot;\n if (accelsSum < 0) {\n accelsSum = accelsSum * -1;\n accelsRoot = Math.sqrt(accelsSum) * -1;\n } else {\n accelsRoot = Math.sqrt(accelsSum);\n }\n// Log.i(appLabel, \"Acceleration squares sum: \"+accelsSum);\n// Log.i(appLabel, \"Acceleration sqrt:\"+accelsRoot);\n cAccel = (float) round(accelsRoot, 3);\n// Log.i(appLabel, \"Net Acceleration: \"+cAccel);\n //Store the maximum acceleration\n if (cAccel > maxAccel) {\n maxAccel = cAccel;\n }\n accelOutput.setText(String.valueOf(cAccel));\n if (isRunning) {\n setSpeed();\n }\n if (speed >= 60) {\n timeToSixty = seconds;\n timeToSixtyOutput.setText(String.valueOf(timeToSixty));\n stopTimer();\n }\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularVelocity() { return nAngularVelocity(address()); }", "protected void calcAcceleration()\n\t{\n\t\tfloat aLength = getAcceleration().getExactLength();\n\t\tif (aLength > 1) { // limit to circular movement\n\t\t\tgetAcceleration().quickNormalize(aLength);\n\t\t}\n\t\tsetAcceleration(Vector2D.getScaled(getAcceleration(), getThrust()));\n\t}", "public static Quaternion calculateQuaternionSixAxis(double accel1, double accel2, double accel3, double gyro1, double gyro2, double gyro3){\n\t\t\n\t\tif(currentTime != 0){\n\t\t\tlong sampleTime = System.currentTimeMillis() - currentTime;\n//\t\t\tSystem.out.println(\"Sample time: \"+sampleTime);\n\t\t\tsampleFreq = 1.0 * 1000 / sampleTime;\n//\t\t\tSystem.out.println(\"Sample Freq: \"+sampleFreq);\n\t\t}\n\t\t\n\t\t// update current time when updating coordinate\n\t\tcurrentTime = System.currentTimeMillis();\n\t\t\n\t\tdouble normalizedDenominator;\n\t\tdouble s0, s1, s2, s3;\n\t\tdouble qDot1, qDot2, qDot3, qDot4;\n\t\tdouble _2q0, _2q1, _2q2, _2q3, _4q0, _4q1, _4q2 ,_8q1, _8q2, q0q0, q1q1, q2q2, q3q3;\n\n\t\t// The quaternion derivative describing rate of change of the earth frame relative to the sensor frame\n\t\tqDot1 = 0.5f * (-q1 * gyro1 - q2 * gyro2 - q3 * gyro3);\n\t\tqDot2 = 0.5f * (q0 * gyro1 + q2 * gyro3 - q3 * gyro2);\n\t\tqDot3 = 0.5f * (q0 * gyro2 - q1 * gyro3 + q3 * gyro1);\n\t\tqDot4 = 0.5f * (q0 * gyro3 + q1 * gyro2 - q2 * gyro1);\n\n\t\t// Compute feedback only if accelerometer measurement valid (avoids NaN in accelerometer normalisation)\n\t\tif(!((accel1 == 0.0f) && (accel2 == 0.0f) && (accel3 == 0.0f))) {\n\n\t\t\t// Normalise accelerometer measurement\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(accel1 * accel1 + accel2 * accel2 + accel3 * accel3);\n\t\t\taccel1 *= normalizedDenominator;\n\t\t\taccel2 *= normalizedDenominator;\n\t\t\taccel3 *= normalizedDenominator; \n\n\t\t\t// Auxiliary variables to avoid repeated arithmetic\n\t\t\t_2q0 = 2.0f * q0;\n\t\t\t_2q1 = 2.0f * q1;\n\t\t\t_2q2 = 2.0f * q2;\n\t\t\t_2q3 = 2.0f * q3;\n\t\t\t_4q0 = 4.0f * q0;\n\t\t\t_4q1 = 4.0f * q1;\n\t\t\t_4q2 = 4.0f * q2;\n\t\t\t_8q1 = 8.0f * q1;\n\t\t\t_8q2 = 8.0f * q2;\n\t\t\tq0q0 = q0 * q0;\n\t\t\tq1q1 = q1 * q1;\n\t\t\tq2q2 = q2 * q2;\n\t\t\tq3q3 = q3 * q3;\n\n\t\t\t// Gradient decent algorithm corrective step\n\t\t\ts0 = _4q0 * q2q2 + _2q2 * accel1 + _4q0 * q1q1 - _2q1 * accel2;\n\t\t\ts1 = _4q1 * q3q3 - _2q3 * accel1 + 4.0f * q0q0 * q1 - _2q0 * accel2 - _4q1 + _8q1 * q1q1 + _8q1 * q2q2 + _4q1 * accel3;\n\t\t\ts2 = 4.0f * q0q0 * q2 + _2q0 * accel1 + _4q2 * q3q3 - _2q3 * accel2 - _4q2 + _8q2 * q1q1 + _8q2 * q2q2 + _4q2 * accel3;\n\t\t\ts3 = 4.0f * q1q1 * q3 - _2q1 * accel1 + 4.0f * q2q2 * q3 - _2q2 * accel2;\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(s0 * s0 + s1 * s1 + s2 * s2 + s3 * s3); \n\t\t\t\n\t\t\t// normalise step magnitude\n\t\t\ts0 *= normalizedDenominator;\n\t\t\ts1 *= normalizedDenominator;\n\t\t\ts2 *= normalizedDenominator;\n\t\t\ts3 *= normalizedDenominator;\n\n\t\t\t// Apply feedback step\n\t\t\tqDot1 -= beta * s0;\n\t\t\tqDot2 -= beta * s1;\n\t\t\tqDot3 -= beta * s2;\n\t\t\tqDot4 -= beta * s3;\n\t\t}\n\n\t\t// Integrate rate of change of quaternion to yield quaternion\n\t\tq0 += qDot1 * (1.0f / sampleFreq);\n\t\tq1 += qDot2 * (1.0f / sampleFreq);\n\t\tq2 += qDot3 * (1.0f / sampleFreq);\n\t\tq3 += qDot4 * (1.0f / sampleFreq);\n\n\t\t// Normalise quaternion\n\t\tnormalizedDenominator = 1 / Math.sqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3);\n\t\tq0 *= normalizedDenominator;\n\t\tq1 *= normalizedDenominator;\n\t\tq2 *= normalizedDenominator;\n\t\tq3 *= normalizedDenominator;\n\t\t\n\t\t\n\t\t// set Quaternion object\n\t\tQuaternion quaternion = new Quaternion(q0, q1, q2, q3);\n\t\t\n\t\treturn quaternion;\n\t}", "public void updateAccelerations(double xLimit, double yLimit) {\n // Loop all entities and update their accelerations in parallel\n entities.parallelStream().forEach(cur -> {\n int alignmentNeighbors = 0;\n int cohesionNeighbors = 0;\n int separationNeighbors = 0;\n Vector2D alignment = new Vector2D();\n Vector2D cohesion = new Vector2D();\n Vector2D separation = new Vector2D();\n\n // Use nearby entities to determinate forces\n for (Entity ee : entities) {\n if (ee == cur) continue;\n //if (cur.angleToEntity(ee) > detectionAngleBox.val/2) continue;\n double dist = Math.max(cur.distanceFrom(ee), 0.001);\n\n if (dist < alignmentDistanceBox.val) {\n alignmentNeighbors++;\n alignment.add(ee.getVelocity());\n }\n if (dist < cohesionDistanceBox.val) {\n cohesionNeighbors++;\n cohesion.add(ee.getPosition());\n }\n if (dist < separationDistanceBox.val) {\n separationNeighbors++;\n separation.add(new Vector2D(cur.getPosition()).subtract(ee.getPosition())\n .ensureDirection()\n .divide(dist*dist));\n }\n }\n\n if (alignmentNeighbors != 0)\n alignment\n .divide(alignmentNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (cohesionNeighbors != 0)\n cohesion\n .divide(cohesionNeighbors)\n .subtract(cur.getPosition())\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (separationNeighbors != 0)\n separation\n .divide(separationNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n\n cur.getAcceleration()\n .add(alignment.multiply(alignmentMultiplierBox.val))\n .add(cohesion.multiply(cohesionMultiplierBox.val))\n .add(separation.multiply(separationMultiplierBox.val))\n .limit(maxSpeedBox.val);\n\n // Border force\n double bfX = cur.getX() < xLimit/2 ? 100/Math.pow(cur.getX(),2) : -100/Math.pow(xLimit - cur.getX(),2);\n double bfY = cur.getY() < yLimit/2 ? 100/Math.pow(cur.getY(),2) : -100/Math.pow(yLimit - cur.getY(),2);\n cur.getAcceleration().add(new Vector2D(bfX, bfY)).limit(maxSpeedBox.val);\n });\n }", "public void applyRotationForce(double force);", "public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }", "void do_physics(CAR car, double delta_t) {\n// sn = Math.sin(car.angle);\n// cs = Math.cos(car.angle);\n//\n// velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n// velocity.y = cs * car.velocity_wc.x - sn * car.velocity_wc.y;\n//\n// double yawSpeed = 0.5 * car.cartype.wheelbase * car.angularvelocity;\n//\n// double rotationAngle = 0;\n// double sideSlip = 0;\n// if (velocity.x != 0) {\n// //car is moving forwards\n// rotationAngle = Math.atan(yawSpeed / velocity.x);\n// }\n//\n// if (velocity.x != 0) {\n// sideSlip = Math.atan(velocity.y / velocity.x);\n// }\n//\n// if (velocity.x == 0) {\n// car.angularvelocity = 0;\n// }\n//\n//\n// double slipAngleFront = sideSlip + rotationAngle - car.steerangle;\n// double slipAngleRear = sideSlip - rotationAngle;\n//\n// // weight per axle = half car mass times 1G (=9.8m/s^2)\n// double weight = car.cartype.mass * 9.8 * 0.5;\n//\n// Vector2D frontWheelLateralForce = new Vector2D();\n// frontWheelLateralForce.setX(0);\n// frontWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_F * slipAngleFront));\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * weight);\n//\n// if (front_slip == 1) {\n// frontWheelLateralForce.setY(frontWheelLateralForce.getY() * 0.5d);\n// }\n//\n// Vector2D rearWheelLateralForce = new Vector2D();\n// rearWheelLateralForce.setX(0);\n// rearWheelLateralForce.setY(normalise(-MAX_GRIP, MAX_GRIP, CA_R * slipAngleRear));\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * weight);\n//\n// if (rear_slip == 1) {\n// rearWheelLateralForce.setY(rearWheelLateralForce.getY() * 0.5d);\n// }\n//\n//\n// Vector2D tractionForce = new Vector2D();\n// tractionForce.setX(100 * (car.throttle - car.brake * SGN(velocity.x)));\n// tractionForce.setY(0);\n//\n// if (rear_slip == 1) {\n// tractionForce.setX(tractionForce.getX() * 0.5d);\n// }\n//\n// Vector2D resistance = new Vector2D();\n// double rollingResistanceX = -RESISTANCE * velocity.x;\n// double rollingResistanceY = -RESISTANCE * velocity.y;\n// double dragResistanceX = -DRAG * velocity.x * ABS(velocity.x);\n// double dragResistanceY = -DRAG * velocity.y * ABS(velocity.y);\n// resistance.setX(rollingResistanceX + dragResistanceX);\n// resistance.setY(rollingResistanceY + dragResistanceY);\n//\n// // sum forces\n// Vector2D totalForce = new Vector2D();\n// double frontWheelLateralX = Math.sin(car.steerangle) * frontWheelLateralForce.getX();\n// double rearWheelLateralX = rearWheelLateralForce.getX();\n// double frontWheelLateralY = Math.cos(car.steerangle) * frontWheelLateralForce.getY();\n// double rearWheelLateralY = rearWheelLateralForce.getY();\n//\n// totalForce.setX(tractionForce.getX() + frontWheelLateralX + rearWheelLateralX + resistance.getX());\n// totalForce.setY(tractionForce.getY() + frontWheelLateralY + rearWheelLateralY + resistance.getY());\n//\n//\n// double frontTorque = frontWheelLateralForce.getY() * car.cartype.b;\n// double rearTorque = rearWheelLateralForce.getY() * car.cartype.c;\n// double torque = frontTorque - rearTorque;\n//\n// Vector2D acceleration = new Vector2D();\n// acceleration.setX(totalForce.getX() / car.cartype.mass);\n// acceleration.setY(totalForce.getY() / car.cartype.mass);\n// // Newton F = m.a, therefore a = F/m\n// //TODO: add inertia to the vehicle\n// double angularAcceleration = torque / car.cartype.inertia;\n//\n// acceleration.setX(normalise(acceleration.getX(), 0.1d));\n// acceleration.setY(normalise(acceleration.getY(), 0.1d));\n//\n//\n// Vector2D worldReferenceAcceleration = new Vector2D();\n// worldReferenceAcceleration.setX(cs * acceleration.getY() + sn * acceleration.getX());\n// worldReferenceAcceleration.setY(-sn * acceleration.getY() + cs * acceleration.getX());\n//\n// // velocity is integrated acceleration\n// Vector2D worldReferenceVelocity = new Vector2D();\n// worldReferenceVelocity.setX(car.velocity_wc.x + (delta_t * worldReferenceAcceleration.getX()));\n// worldReferenceVelocity.setY(car.velocity_wc.y + (delta_t * worldReferenceAcceleration.getY()));\n//\n// // position is integrated velocity\n// Vector2D newPosition = new Vector2D();\n// newPosition.setX(delta_t * worldReferenceVelocity.getX() + car.position_wc.x);\n// newPosition.setY(delta_t * worldReferenceVelocity.getY() + car.position_wc.y);\n//\n//\n// car.velocity_wc.x = normalise(worldReferenceVelocity.getX(), 0.1d);\n// car.velocity_wc.y = normalise(worldReferenceVelocity.getY(), 0.1d);\n//\n// if (car.velocity_wc.x == 0 && car.velocity_wc.y == 0) {\n// car.angularvelocity = 0;\n// } else {\n// car.angularvelocity += delta_t * angularAcceleration;\n// }\n//\n// car.angle += delta_t * car.angularvelocity;\n// car.position_wc.x = newPosition.getX();\n// car.position_wc.y = newPosition.getY();\n//\n// /**\n\n sn = Math.sin(car.angle);\n cs = Math.cos(car.angle);\n\n // SAE convention: x is to the front of the car, y is to the right, z is down\n // transform velocity in world reference frame to velocity in car reference frame\n velocity.x = cs * car.velocity_wc.y + sn * car.velocity_wc.x;\n velocity.y = -sn * car.velocity_wc.y + cs * car.velocity_wc.x;\n\n // Lateral force on wheels\n //\n // Resulting velocity of the wheels as result of the yaw rate of the car body\n // v = yawrate * r where r is distance of wheel to CG (approx. half wheel base)\n // yawrate (ang.velocity) must be in rad/s\n //\n yawspeed = car.cartype.wheelbase * 0.5 * car.angularvelocity;\n\n if (velocity.x == 0) // TODO: fix Math.singularity\n rot_angle = 0;\n else\n rot_angle = Math.atan(yawspeed / velocity.x);\n // Calculate the side slip angle of the car (a.k.a. beta)\n if (velocity.x == 0) // TODO: fix Math.singularity\n sideslip = 0;\n else\n sideslip = Math.atan(velocity.y / velocity.x);\n\n // Calculate slip angles for front and rear wheels (a.k.a. alpha)\n slipanglefront = sideslip + rot_angle - car.steerangle;\n slipanglerear = sideslip - rot_angle;\n\n // weight per axle = half car mass times 1G (=9.8m/s^2)\n weight = car.cartype.mass * 9.8 * 0.5;\n\n // lateral force on front wheels = (Ca * slip angle) capped to friction circle * load\n flatf.x = 0;\n flatf.y = CA_F * slipanglefront;\n flatf.y = Math.min(MAX_GRIP, flatf.y);\n flatf.y = Math.max(-MAX_GRIP, flatf.y);\n flatf.y *= weight;\n if (front_slip == 1)\n flatf.y *= 0.5;\n\n // lateral force on rear wheels\n flatr.x = 0;\n flatr.y = CA_R * slipanglerear;\n flatr.y = Math.min(MAX_GRIP, flatr.y);\n flatr.y = Math.max(-MAX_GRIP, flatr.y);\n flatr.y *= weight;\n if (rear_slip == 1)\n flatr.y *= 0.5;\n\n // longtitudinal force on rear wheels - very simple traction model\n ftraction.x = 100 * (car.throttle - car.brake * SGN(velocity.x));\n ftraction.y = 0;\n if (rear_slip == 1)\n ftraction.x *= 0.5;\n\n // Forces and torque on body\n\n // drag and rolling resistance\n resistance.x = -(RESISTANCE * velocity.x + DRAG * velocity.x * ABS(velocity.x));\n resistance.y = -(RESISTANCE * velocity.y + DRAG * velocity.y * ABS(velocity.y));\n\n // sum forces\n force.x = ftraction.x + Math.sin(car.steerangle) * flatf.x + flatr.x + resistance.x;\n force.y = ftraction.y + Math.cos(car.steerangle) * flatf.y + flatr.y + resistance.y;\n\n // torque on body from lateral forces\n torque = car.cartype.b * flatf.y - car.cartype.c * flatr.y;\n\n // Acceleration\n\n // Newton F = m.a, therefore a = F/m\n acceleration.x = force.x / car.cartype.mass;\n acceleration.y = force.y / car.cartype.mass;\n angular_acceleration = torque / car.cartype.inertia;\n\n // Velocity and position\n\n // transform acceleration from car reference frame to world reference frame\n acceleration_wc.x = cs * acceleration.y + sn * acceleration.x;\n acceleration_wc.y = -sn * acceleration.y + cs * acceleration.x;\n\n // velocity is integrated acceleration\n //\n car.velocity_wc.x += delta_t * acceleration_wc.x;\n car.velocity_wc.y += delta_t * acceleration_wc.y;\n\n // position is integrated velocity\n //\n car.position_wc.x += delta_t * car.velocity_wc.x;\n car.position_wc.y += delta_t * car.velocity_wc.y;\n\n\n // Angular velocity and heading\n\n // integrate angular acceleration to get angular velocity\n //\n car.angularvelocity += delta_t * angular_acceleration;\n\n // integrate angular velocity to get angular orientation\n //\n car.angle += delta_t * car.angularvelocity;\n\n }", "public void update() {\n\t\t\n\t\t// Calculating all forces to apply to the physics shapes\n\t\tArrayList<Object[]> forces = new ArrayList<Object[]>();\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tfor(PhysicsShape shape2 : shapes) {\n\t\t\t\tif(!(shape == shape2))\n\t\t\t\t\tforces.addAll(shape.allForcesFromShape(shape2));\n\t\t\t}\n\t\t}\n\n\t\t// Adding force of gravity to each shape, directly downward.\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tif(!shape.equals(ground))\n\t\t\t\tforces.add(new Object[] {shape, shape.getX(), shape.getY(), shape.getMass() * 9.81f, 0 - (float) (Math.PI / 2.0) } );\n\t\t}\n\t\t\n\t\t// tester, applies sideways force to the left\n\t\tif(shapes.get(1).getY() == 200.0f) {\n\t\t\tforces.add(new Object[] {shapes.get(1), 300f, 125f, 1000f, (float) Math.PI});\n\t\t}\n\t\t\n\t\t// Applying each force to the shapes to set new vX, vY and omega values for this tick.\n\t\t// Force array is in format [PhysicsShape, x, y, magnitude, direction]\n\t\tfor(Object[] force : forces) {\n\t\t\t\n\t\t\tPhysicsShape shape = (PhysicsShape) force[0];\n\t\t\tfloat x = (float) force[1];\n\t\t\tfloat y = (float) force[2];\n\t\t\tfloat magnitude = (float) force[3];\n\t\t\tfloat direction = (float) force[4];\n\t\t\t\n\t\t\tshape.applyForce(x, y, magnitude, direction);\n\t\t}\n\t\t\n\t\t// Tells each PhysicsShape to move one tick forwards with the new vX, vY and omega values\n\t\tfor(PhysicsShape shape : shapes) {\n\t\t\tshape.act();\n\t\t}\n\t\t\n\t}", "public static void applyPhysics(Drone drone, float dt) throws DroneCrashException, MaxAoAException {\r\n\t\t\r\n\t\t// stepsize bepalen\r\n\t\tfloat h;\r\n\t\tif (dt - drone.getPredictionMethod().getStepSize() >= 0) {\r\n\t\t\th = drone.getPredictionMethod().getStepSize();\r\n\t\t} else if (dt > 0) {\r\n\t\t\th = dt;\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t// huidige versnellingen bepalen\r\n\t\tVector3f[] currentAccelerationsW = calculateAccelerations(drone, h);\r\n\t\t\r\n\t\t// snelheid voorspellen in functie van de huidige vernsellingen en posities\r\n\t\tVector3f[] newVelocities = drone.getPredictionMethod().predictVelocity(drone.getLinearVelocity(), drone.getAngularVelocity(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentAccelerationsW[0], currentAccelerationsW[1], h);\r\n\t\t\r\n\t\t// nieuwe positie berekenen aan de hand van de nieuwe snelheid\r\n\t\tVector3f[] deltaPositions = calculatePositionDifferences(drone, newVelocities, h);\r\n\r\n\t\t// nieuwe snelheid opslaan\r\n\t\tdrone.setLinearVelocity(newVelocities[0]);\r\n\t\tdrone.setAngularVelocity(newVelocities[1]);\r\n\r\n\t\t// translatie en rotatie uitvoeren\r\n\t\tdrone.translate(deltaPositions[0]);\r\n\r\n\t\tif (!deltaPositions[1].equals(new Vector3f(0, 0, 0))) {\r\n\t\t\tVector3f rotationAxis = new Vector3f(0, 0, 0);\r\n\t\t\tdeltaPositions[1].normalise(rotationAxis);\r\n\t\t\tdrone.rotate(deltaPositions[1].length(), rotationAxis);\r\n\t\t}\r\n\r\n\t\t// checken of de drone crasht\r\n\t\tVector3f leftWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getLeftWing().getCenterOfMass()), drone.getPosition(), leftWingCenterOfMass);\r\n\t\tVector3f rightWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getRightWing().getCenterOfMass()),drone.getPosition(), rightWingCenterOfMass);\r\n\t\t\r\n\t\tif (drone.transformToWorldFrame(drone.getEnginePosition()).y + drone.getPosition().y <=\tgroundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the engine hit the ground!\");\r\n\t\t} if (drone.transformToWorldFrame(drone.getTailMassPosition()).y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the tail hit the ground!\");\r\n\t\t} if (leftWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the left wing hit the\tground!\");\r\n\t\t} if (rightWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the right wing hit the ground!\");\r\n\t\t}\r\n\t\tfor (Tyre tyre : drone.getTyres()) {\r\n\t\t\tif (tyre.getRadius() < tyre.getCompression()) {\r\n\t\t\t\tthrow new DroneCrashException(\"Drone Crashed: tyre compressed too much!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// recursieve oproep\r\n\t\tPhysicsEngine.applyPhysics(drone, (dt - h));\r\n\t}", "void setForce() {\n\tdouble oldfreq = forceBarValue * omega[1] / 20.0;\n\tforceBarValue = forceBar.getValue();\n\tdouble newfreq = forceBarValue * omega[1] / 20.0;\n\tdouble adj = newfreq-oldfreq;\n\tforceTimeZero = t-oldfreq*(t-forceTimeZero)/newfreq;\n }", "private void calculateTorque(){\n\t\ttau[0] = L * k * (w1*w1 - w3*w3);\r\n\t\t//Pitch torque\r\n\t\ttau[1] = L * k * (w2*w2 - w4*w4);\r\n\t\t//The total torque about the z axis is given by the sum of all the torques from each propeller.\r\n\t\ttau[2] = b * (w1*w1 - w2*w2 + w3*w3 - w4*w4);\r\n\t}", "public Vector3 getEulerAnglesAcceleration() {\n\t\treturn eulerAnglesAcceleration;\n\t}", "public void onAccelerationChanged(float x, float y, float z) {\n\n }", "public void setAccelerations(int acceleration) {\n\t\tleftMotor.setAcceleration(acceleration);\n\t\trightMotor.setAcceleration(acceleration);\n\t}", "public void update() {\n\n //Updates all the modules\n for(Module module : modules.values())\n module.update();\n\n //Applies all the forces that can act on this mobile (gravity, air resistance etc)\n for(Force force : forces)\n force.apply();\n\n position = position.add(velocity.multiply(deltaTime()));\n rotation = rotation.multiply(angularVelocity.copy().quaternion().scale(deltaTime()));\n }", "public void move(ArrayList<AndroidDoveFlockModel> doves, int scrWidth, int scrHeight)\n {\n double xMov1 = 0, yMov1 = 0; // stores rule 1 movement factors\n double xMov2 = 0, yMov2 = 0; // stores rule 2 movementfactors\n double xMov3 = 0, yMov3 = 0; // stores rule 3 movementfactors\n int count = 0; // count of other doves in local flock\n\n // Rule #1: Separation - move away from any doves that are too close\n for (AndroidDoveFlockModel dove : doves)\n if (dove != this && distance(dove) < tooClose) {\n xMov1 -= (dove.getX() - getX()) / 5;\n yMov1 -= (dove.getY() - getY()) / 5;\n }\n\n // Rule #2: Alignment try to match average velocity vectors of flock\n for (AndroidDoveFlockModel dove : doves)\n if (dove != this && distance(dove) < flockRadius) {\n xMov2 += dove.getXVelocity();\n yMov2 += dove.getYVelocity();\n ++count;\n }\n if (count > 0) { // get 1/10th diff between current and avg velocity\n xMov2 = (xMov2/count - getXVelocity()) / 10;\n yMov2 = (yMov2/count - getYVelocity()) / 10;\n }\n\n // Rule #3: Cohesion - move toward the center of the flock\n for (AndroidDoveFlockModel dove : doves)\n if (dove != this && distance(dove) < flockRadius) {\n xMov3 += dove.getX();\n yMov3 += dove.getY();\n }\n if (count > 0) { // Get 1/100th diff between current and avg position\n xMov3 = ((xMov3+getX())/(count+1) - getX()) / 100;\n yMov3 = ((yMov3+getY())/(count+1) - getY()) / 100;\n }\n\n // Keep the dove from going too fast\n if (Math.abs(getXVelocity()) > MAXSPEED)\n setXVelocity((getXVelocity() / Math.abs(getXVelocity())) * MAXSPEED);\n if (Math.abs(getYVelocity()) > MAXSPEED)\n setYVelocity((getYVelocity() / Math.abs(getYVelocity())) * MAXSPEED);\n\n // Re-adjust dove velocity factoring in Rules 1 and 2\n setXVelocity(getXVelocity() + xMov1 + xMov2);\n setYVelocity(getYVelocity() + yMov1 + yMov2);\n\n // Move the dove a fraction closer to center factoring in Rule 3\n move(getXVelocity() + xMov3, getYVelocity() + yMov3);\n\n // Rules for rebounding when the Dove hits a BOUNDARY\n if (getX() < BOUNDARY)\n setXVelocity(REBOUNDSPEED);\n if (getX() > scrWidth - BOUNDARY - imageWidth())\n setXVelocity(-REBOUNDSPEED);\n if (getY() < BOUNDARY)\n setYVelocity(REBOUNDSPEED);\n if (getY() > scrHeight - BOUNDARY - imageHeight())\n setYVelocity(-REBOUNDSPEED);\n }", "public void force(Vector vector){\n double acceleration = vector.getMagnitude()/mass;\n //xspeed += (Math.abs(Main.game.getWidth()-x)/(Main.game.getWidth()*0.2))*acceleration*Math.cos(vector.getDirection());\n //yspeed += (Math.abs(Main.game.getHeight()-y)/(Main.game.getHeight()*0.2))*acceleration*Math.sin(vector.getDirection());\n xspeed += acceleration*Math.cos(vector.getDirection());\n if(acceleration>0)\n System.out.println(\"direction is \" + (180.0/3.14*vector.getDirection()) + \" and mag is \" + vector.getMagnitude());\n yspeed += acceleration*Math.sin(vector.getDirection());\n }", "public void computeForce(State state, VectorOfSpatialVec bodyForces, Vector generalizedForces) {\n opensimSimulationJNI.ExpressionBasedPointToPointForce_computeForce(swigCPtr, this, State.getCPtr(state), state, VectorOfSpatialVec.getCPtr(bodyForces), bodyForces, Vector.getCPtr(generalizedForces), generalizedForces);\n }", "void applyForce(Vector2D force) {\n\t\tforce.div(mass);\n\t\tacceleration.add(force);\n\t}", "double getAcceleration ();", "@Override\n public void setAcceleration(float x, float y, float z, byte[] array) {\n String accelerationString = getString(motion_acceleration_g);\n accelerationX.setText(String.format(accelerationString, x));\n\n accelerationX.setText(\"testing\");\n //String accelString = getString(array[0] + array [1]);\n //acceleration_x1.setText(\"test\");\n //acceleration_x1.setText(String.format(accelerationString, y));\n /*accelerationY.setText(String.format(accelerationString, y));\n accelerationZ.setText(String.format(accelerationString, z));*/\n }", "public void accelerate(float dvx, float dvy){\n\t\tvelocity.x += dvx;\n\t\tvelocity.y += dvy;\n\t}", "private void setThrusts() {\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tPlayer player = players[i];\n\t\t\t\n\t\t\t// Apply drag always\n\t\t\ttanks[i].acceleration = tanks[i].velocity\n\t\t\t\t\t.scalarProduct(-tankDrag);\n\t\t\ttanks[i].angularAcceleration = -tanks[i].angularVelocity * tankSteeringDrag;\n\t\t\t\n\t\t\t// Skip if dead\n\t\t\tif (!tanks[i].isAlive()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Get skid steer button presses\n\t\t\tboolean leftPressed = player.getButton(BUTTON_LEFT).isPressed();\n\t\t\tboolean rightPressed = player.getButton(BUTTON_RIGHT).isPressed();\n\t\t\t\n\t\t\tif (leftPressed) {\n\t\t\t\tif (rightPressed) {\n\t\t\t\t\t// Forward\n\t\t\t\t\ttanks[i].acceleration.add(new Vector2D(tankThrust, tanks[i].angle, true));\n\t\t\t\t} else {\n\t\t\t\t\t// Left\n\t\t\t\t\t// tanks[i].angle -= Math.PI / stepsPerHalfTurn;\n\t\t\t\t\ttanks[i].angularAcceleration -= tankSteeringAccel;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (rightPressed) {\n\t\t\t\t\t// Right\n\t\t\t\t\t// tanks[i].angle += Math.PI / stepsPerHalfTurn;\n\t\t\t\t\ttanks[i].angularAcceleration += tankSteeringAccel;\n\t\t\t\t} else {\n\t\t\t\t\t// Stop\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Rotate velocity so that the tanks can't slide sideways\n\t\t\t/*Vector2D unit = new Vector2D(1d, tanks[i].angle, true);\n\t\t\tdouble velocityMagnitude = tanks[i].velocity.dotProduct(unit);\n\t\t\ttanks[i].velocity = new Vector2D(velocityMagnitude, tanks[i].angle, true);*/\n\t\t\ttanks[i].velocity.setAngle(tanks[i].angle);\n\t\t}\n\t}", "@Override\n public void solve(MovementManager mm) {\n // Get current body position, velocity and acceleration\n position = mm.getBody().getPosition().cpy();\n acceleration = calculateAcceleration(mm.getBody(), DT, position.cpy());\n velocity = mm.getBody().getVelocity().cpy();\n\n // Calculate new velocity based on the acceleration\n velocity.add(acceleration.cpy().scl(mm.getDt()));\n\n // Set new values\n mm.getBody().setVelocity(velocity.cpy());\n mm.getBody().setPosition(position.cpy().add(velocity.cpy().scl(mm.getDt())));\n }", "private void getAcceleroMeterAndMagneticFieldSensorIfNeeded() {\n if( !hasAppropriateSensor() ) { // no rotation vector\n List acceleroMeterSensorList = sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER);\n List magneticFieldSensorList = sensorManager.getSensorList(Sensor.TYPE_MAGNETIC_FIELD);\n if( acceleroMeterSensorList != null && !acceleroMeterSensorList.isEmpty() &&\n magneticFieldSensorList != null && !magneticFieldSensorList.isEmpty() ) {\n Log.d(\"Ball\", \"Accelerometer and magnetic field is available\");\n sensorList = new ArrayList<Sensor>();\n sensorList.addAll(acceleroMeterSensorList);\n sensorList.addAll(magneticFieldSensorList);\n } else {\n Log.d(\"Ball\", \"Accelerometer and magnetic field is NOT available\");\n }\n }\n }", "public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }", "public void calculatePosition(Body[] bodies, int dt) {\n this.updateVelocity(bodies, dt);\n this.temp_x += this.vx * dt + 0.5 * this.ax * dt * dt;\n this.temp_y += this.vy * dt + 0.5 * this.ay * dt * dt;\n }", "public float computeNetAcceleration(float[] values){\n float magnitude = (values[0]*values[0])+(values[1]*values[1])+(values[2]*values[2]);\n\n //Copy C to L , so L is last acceleration value\n LAST_ACCLRN = current_accleration;\n\n //Compute C = sqrt(magnitude)\n current_accleration = (float)Math.sqrt(magnitude);\n\n //Calculate delta : D = C - L\n float delta = current_accleration - LAST_ACCLRN;\n\n //Net accleration is always 90% of previous accelearation added with delta\n //Recurrent eqn for N = N*0.9 + D\n net_acclrn = net_acclrn*0.9f + delta;\n //return N\n return net_acclrn;\n }", "private void accelerate() {\r\n\t\tif(physics.angleTo(closestShipPhysics) < 0){\r\n\t\t\tphysics.move(true, RIGHT);\r\n\t\t}\r\n\t\tif(physics.angleTo(closestShipPhysics) > 0){\r\n\t\t\tphysics.move(true, LEFT);\r\n\t\t}\r\n\t\telse{\r\n\t\tphysics.move(true, STRIGHT);\r\n\t\t}\r\n\t}", "public static void updatePosition() {\n\t\tfor (int i = 0; i < TitanV4.planets.length; i++) { //compute forces between all celestial corpses\n\t\t\tfor(int j=i; j<TitanV4.planets.length; j++){\n\t\t\t\tif (i != j) {\n\t\t\t\t\tdouble upper = TitanV4.G*TitanV4.planets[i].getMass() * TitanV4.planets[j].getMass();\n\t\t\t\t\tdouble lower = TitanV4.planets[i].getPosition().distanceFrom(TitanV4.planets[j].getPosition());\n\t\t\t\t\tdouble gravitation = upper/lower;\n\t\t\t\t\tVector a = new Vector();\n\t\t\t\t\ta = TitanV4.planets[i].getPosition().substract(TitanV4.planets[j].getPosition()).normalize().multiply(-1);\n\n\t\t\t\t\tTitanV4.planets[i].force.add(a.multiply(gravitation));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//compute acceleration vector for each celestial corpse but the sun\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tTitanV4.planets[i].acceleration = (TitanV4.planets[i].force.divide(TitanV4.planets[i].getMass()));\n\t\t}\n\n\t\t//calculate change in speed over deltaT\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tVector oldVelocity = new Vector(TitanV4.planets[i].velocity);\n\t\t\tTitanV4.planets[i].velocity.add((TitanV4.planets[i].acceleration.multiply(TitanV4.deltaT)));\n\n\t\t\tVector posChange = new Vector();\n\t\t\tposChange = (oldVelocity.add(velocity).divide(2)).multiply(TitanV4.deltaT);\n\t\t\tTitanV4.planets[i].pos.add(posChange);\n\t\t}\n\t}", "private void UpdateTransform()\n\t{\t\n\t\tTransform transform = parent.transform;\n\t\t\n\t\tVector2 friction = Vector2.Scale(-frictionCoefficient,velocity);\n\t\tfloat angularFriction = -frictionCoefficient*angularVelocity;\n\t\t\n\t\t//Newton integration P = P + dP + acceleration * dt^2\n\t\ttransform.position.x += velocity.x + (acceleration.x *deltaTime*deltaTime) + friction.x;\n\t\ttransform.position.y += velocity.y + (acceleration.y *deltaTime*deltaTime) + friction.y;\n\t\ttransform.rotation += angularVelocity + angularAcceleration*deltaTime*deltaTime + angularFriction ;\n\t\t\n\t}", "public static double[] solve(ODESystem ode, double time, double deltaT) {\n\t\tint systemSize = ode.getSystemSize();\n\t\tdouble[] q1 = new double[systemSize];\n\t\tdouble[] q2 = new double[systemSize];\n\t\tdouble[] q3 = new double[systemSize];\n\t\tdouble[] q4 = new double[systemSize];\n\t\tdouble[] intermediateVals = new double[systemSize];\n\t\tint i;\n\t\tdouble[] values = ode.getCurrentValues();\n\t\tq1 = ode.getFunction(time, values);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q1[i] / 2.0;\n\t\tq2 = ode.getFunction(time + deltaT/2.0, intermediateVals);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q2[i] / 2.0;\n\t\tq3 = ode.getFunction(time + deltaT/2.0, intermediateVals);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q3[i];\n\t\tq4 = ode.getFunction(time + deltaT, intermediateVals);\n\t\tdouble[] newVel = new double[systemSize];\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tnewVel[i] = values[i] + deltaT * (q1[i] + 2.0 * q2[i] +\n\t\t\t\t\t2.0 * q3[i] + q4[i]) / 6.0;\n//\t\tSystem.out.println(\"vx original: \" + values[0]);\n//\t\tSystem.out.println(\"vx after: \" + newVel[0]);\n\t\treturn newVel;\n\t}", "public abstract float[] computeAttractiveForce(float deltaX, float deltaY, float distance, float squareDistance, float desiredDistance, int v1Deg, int v2Deg);", "public void accelerateXR() {\n double temp;\n temp = this.getxSpeed();\n if (temp <= this.getMaxSpeed()) {\n temp += this.getMaxSpeed() / 10;\n }\n this.setxSpeed(temp);\n }", "private float[] dynamicAccDiff(float[] acc, float[] gyr,float[] gravity, float[] oldAcc, float[] oldGyr)\n {\n float[] dynAccDiff = new float[]{0.0f, 0.0f, 0.0f};\n float[] accDiff = accDiff(oldAcc, acc);\n float[] gyrDiff = gyrDiff(oldGyr, gyr);\n float[] graDiff = graDiff(gravity, gyrDiff);\n\n for (int i = 0; i < 3; i++)\n {\n dynAccDiff[i] = accDiff[i]-graDiff[i];\n }\n\n return dynAccDiff;\n\n }", "public abstract float[] computeRepulsiveForce(float deltaX, float deltaY, float distance, float squareDistance, int v1Deg, int v2Deg);", "public double calcNetForceExertedByX(Planet[] s){\n double net_forcex = 0;\n for (Planet p : s){\n if (this.equals(p)){\n continue;\n }\n else{\n net_forcex += calcForceExertedByX(p);\n }\n }\n return net_forcex;\n }", "private void updateDesiredDirection() {\n\t\t/* http://www.cs.mcgill.ca/~hsafad/robotics/, accessed 28/02/16 */\n\n\t\t// First, set all seen bots' charge to -VE, all on LEDs to +VE, all off LEDs to 0.0D\n\t\tpopulateCharges();\n\t\t\n\t\t// VARIABLES\n\t\tdouble dirX = 0.0D; // relative dirX and dirY that the bot will need to face\n\t\tdouble dirY = 0.0D; \n\t\tdouble dx = 0.0D;\t// used to calculate each push/pull force, added to dirX, dirY\n\t\tdouble dy = 0.0D;\n\t\tdouble targetCharge = 0.0D;\t// charge of current target bot / led\n\t\tdouble minS = 50;\n\t\tdouble distSq = 0.0D;\t// distance^2 to bot/led\n\t\tdouble safety = 0.0D;\n\t\tdouble norm = 0.0D;\n\t\t\n\t\tfor (int i = 0; i < seenCharges.size(); i++) {\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t// now, update direction depending on charges\n\t\t\t\tif (seenCharges.get(i) instanceof Bot) {\n\t\t\t\t\t\t\n\t\t\t\t\ttargetCharge = ((Bot) seenCharges.get(i)).getCharge();\n\t\t\t\t\tdistSq = sens.getDistanceTo((Bot) seenCharges.get(i));\n\t\t\t\t\tdistSq = distSq * distSq;\n\t\t\t\t\t\n\t\t\t\t\t// calculated forces\n\t\t\t\t\tdx = targetCharge * (((Bot) seenCharges.get(i)).getX() - this.getX()) / distSq;\n\t\t\t\t\tdy = targetCharge * (((Bot) seenCharges.get(i)).getY() - this.getY()) / distSq;\n\n\t\t\t\t\t// add calculated forces to overall direction so far\n\t\t\t\t\tdirX += dx;\n\t\t\t\t\tdirY += dy;\n\t\t\t\t\t\n\t\t\t\t\tsafety = distSq / ((dx*dirX + dy*dirY));\n\t\t\t\t\tif ((safety > 0) && (safety < minS)) { minS = safety; }\n\t\t\t\t\t\t\n\t\t\t\t} else if ((seenCharges.get(i) instanceof LED)) {\n\t\t\t\t\n\t\t\t\t\ttargetCharge = ((LED) seenCharges.get(i)).getCharge();\n\t\t\t\t\t\n\t\t\t\t\tif (targetCharge != 0.0D) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tdistSq = sens.getDistanceTo((LED) seenCharges.get(i));\n\t\t\t\t\t\tdistSq = distSq * distSq;\n\n\t\t\t\t\t\t// calculated forces\n\t\t\t\t\t\tdx = targetCharge * (((LED) seenCharges.get(i)).getTargetX() - this.getX()) / distSq;\n\t\t\t\t\t\tdy = targetCharge * (((LED) seenCharges.get(i)).getTargetY() - this.getY()) / distSq;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add calculated forces to overall direction so far\n\t\t\t\t\t\tdirX += dx;\n\t\t\t\t\t\tdirY += dy;\n\t\t\t\t\t\t\n\t\t\t\t\t\tsafety = distSq / ((dx*dirX + dy*dirY));\n\t\t\t\t\t\tif ((safety > 0) && (safety < minS)) { minS = safety; }\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (minS < 5) {\n\t\t\t\t\t\t\ttargetCharge *= minS/5;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\tif (minS > 50) {\n\t\t\t\t\t\t\ttargetCharge *= minS/50;\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} else {\n\t\t\t\t\tSystem.out.println(\"ERROR: unknown seenCharges item \"+i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// calculate vector normal, apply to dirX, dirY\n\t\tnorm = Math.sqrt(dirX*dirX + dirY*dirY);\n\t\tdirX = dirX / norm;\n\t\tdirY = dirY / norm;\n\t\t\n\t\t// set desired direction if it calculates a number\n\t\tif (dirX == (double) dirX && dirY == (double) dirY) {\n\t\t\tthis.setDesiredDirection(sens.getDirectionTo(dirX + sens.getXPos(), dirY + sens.getYPos()));\n\t\t}\n\t}", "@SuppressWarnings(\"ParameterName\")\r\n\tpublic void arcadeDrive(double xSpeed, double zRotation) {\n\t double leftMotorOutput;\r\n\t double rightMotorOutput;\r\n\r\n\t double maxInput = Math.copySign(Math.max(Math.abs(xSpeed), Math.abs(zRotation)), xSpeed);\r\n\t \r\n\t //This gets the joystick being put to a side to work correctly\r\n\t if (xSpeed <= 0.1 && xSpeed >= -0.1) {\r\n\t \tif (zRotation >= 0) {\r\n\t \t\tleftMotorOutput = maxInput;\r\n\t \t\trightMotorOutput = -maxInput;\r\n\t \t}\r\n\t \telse {\r\n\t \t\tleftMotorOutput = -maxInput;\r\n\t \t\trightMotorOutput = maxInput;\r\n\t \t}\r\n\t }\r\n\t \r\n\t if (xSpeed >= 0.0) {\r\n\t // First quadrant, else second quadrant\r\n\t if (zRotation >= 0.0) {\r\n\t leftMotorOutput = maxInput;\r\n\t rightMotorOutput = xSpeed - zRotation;\r\n\t } else {\r\n\t leftMotorOutput = xSpeed + zRotation;\r\n\t rightMotorOutput = maxInput;\r\n\t }\r\n\t } else {\r\n\t // Third quadrant, else fourth quadrant\r\n\t if (zRotation >= 0.0) {\r\n\t leftMotorOutput = maxInput;\r\n\t rightMotorOutput = xSpeed + zRotation;\r\n\t } else {\r\n\t leftMotorOutput = xSpeed - zRotation;\r\n\t rightMotorOutput = maxInput;\r\n\t }\r\n\t }\r\n\t \r\n\t frontLeftMotor.set(leftMotorOutput);\r\n\t backLeftMotor.set(leftMotorOutput);\r\n\t System.out.println(\"Left: \" + leftMotorOutput);\r\n\t frontRightMotor.set(rightMotorOutput);\r\n\t backRightMotor.set(rightMotorOutput);\r\n\t System.out.println(\"Right: \" + rightMotorOutput);\r\n\t }", "public double calcNetForceExertedByX(Planet[] allPlanets){\n\t\tdouble xForce = 0;\n\t\tfor (int i =0; i < allPlanets.length; i++){\n\t\t\tif(!this.equals(allPlanets[i])){\n\t\t\t\txForce += this.calcForceExertedByX(allPlanets[i]);\n\t\t\t}\n\t\t}\n\t\treturn xForce;\n\t}", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "@Override\r\n\tpublic void updateForces() {\n\t\tapplyForce(new Vector(0, 0.05));\r\n\t}", "public double getAcceleration() {\r\n return acceleration;\r\n }", "public double getAcceleration() {\n return acceleration;\n }", "public void update() {\n if (acceleration.x < 0) facing = Direction.LEFT;\n if (acceleration.x > 0) facing = Direction.RIGHT;\n// body.setPosition(location.getX(), location.getY(), layer);\n// body.setRotation(Conversions.mat4fToOdeMat3f(MatrixUtil.rotate(rotation.x, rotation.y, -rotation.z)));\n handleAnimations();\n\n// if (interactingWithX != null || interactingWithY != null) {\n// onInteract(interactingWithX, interactingWithY);\n// if (interactingWithX != null && interactingWithX.equals(interactingWithY)) {\n// interactingWithX.onInteract(this, this);\n// } else {\n// if (interactingWithX != null) interactingWithX.onInteract(this, null);\n// if (interactingWithY != null) interactingWithY.onInteract(null, this);\n// }\n// }\n }", "public void process()\n {\n // Get current time\n\t\tdouble t = readClock() * clockSpeed;\n\t\tdouble dTime = t - computeClock;\n\t\tdouble dtMax = 1/50.0f;\n\t\n\t\t// Set current time on display\n\t\tcomputeClock = t;\n\t\t\n\n // Only process if time has elapsed\n if (dTime <= 0)\n return;\n\n\n\t\t// ---------------\n\t\n\t\t// Compute accelerations, then integrate (using Critter methods)\n\t\n\t // This part advances the simulation forward by dTime seconds, but\n\t // using steps that are no larger than dtMax (this means it takes\n\t // more than one step when dTime > dtMax -- the number of steps\n\t // you need is stored in numSteps).\n\t\n\t // *** placeholder value\n\t int numSteps = (int) Math.floor(dTime / dtMax);\n\t \n\t // compute a new 'goal' point for the mainbug to attract toward - every 7 seconds\n\t if ((computeClock) - (goalPickClock) > 7)\n\t {\n\t \t// pick a new random goal point\n\t \tgoal = new Point3d(rgen.nextDouble()*16-8, rgen.nextDouble()*16-8, 0);\n\t \tgoalPickClock = computeClock;\n \t\n\t \ttarget = (int)rgen.nextDouble()*(critters.size()-2);\n\t \twhile (critters.get(target) == predator || critters.get(target) == mainBug)\n\t \t\ttarget = (int)(rgen.nextDouble()*(critters.size()-1));\n\t }\n\t \n\t // Here is the rough structure of what you'll need\n\t //\n\t\t// numSteps = how many steps to take for stable integration\n\t // do numSteps times\n\t // - reset acceleration\n\t // - compute acceleration (adding up accelerations from attractions,\n\t // repulsions, drag, ...)\n\t // - integrate (by dTime/numSteps)\n\t // end\n\t //\n\t // ...\n\t for (int i = 0; i < numSteps; i++)\n\t {\n\t \tfor (int k = 0; k < critters.size(); k++)\n\t \t{\n\t \t\tCritter tmp = critters.get(k);\n\t \t\ttmp.accelReset();\n\t \t\ttmp.accelDrag(0.6); // dampening\n\t \t\t\n\n\t \t\t\n\t \t\tif (tmp == mainBug)// big bug follows randomized 'goal' point (food? water? shelter? )\n\t \t\t{\n\t \t\t\ttmp.accelAttract(goal, 0.1, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.3, -2);\n\t \t\t\ttmp.accelAttract(origin, 0.25, 1);\t \t\t\t // attraction toward center of scene\n\t \t\t}\n\t \t\telse if (tmp == predator )\n\t \t\t{\n \t\t\t\t\ttmp.accelAttract(critters.get(target).getLocation(), rgen.nextDouble()*0.4, 2);\t \t\t\t\t\t\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t// baby bugs follow big bug and are repelled from other baby bugs and predator!\n\t \t\t\ttmp.accelAttract(mainBug.getLocation(), rgen.nextDouble()*0.3, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.45, -3);\n\t \t\t\tfor (int m = 0; m < critters.size(); m++)\n\t \t\t\t{\n\t \t\t\t\tif (critters.get(m) != mainBug && critters.get(m) != tmp)\n\t \t\t\t\t\ttmp.accelAttract(critters.get(m).getLocation(), -rgen.nextDouble()*0.5, -1);\t \t\t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t\n\t\t \t// repulsion away from obstacles\n\t\t \tfor (int j = 0; j < obstacles.size(); j++)\n\t\t \t{\n\t\t \t\ttmp.accelAttract(obstacles.get(j).getLocation(), -0.5, -2);\n\t\t \t}\n\t\t \t\n\t\t \ttmp.integrate(dTime/numSteps);\n\t \t}\n\t }\n\t\n\t // Keyframe motion for each critter\n\t for (int i = 0; i < critters.size(); i++)\n\t {\n\t \tcritters.get(i).keyframe(critters.get(i).dist);\n\t }\n }", "public float minTorque();", "public static void add_damping_acceleration( Body body ) {\r\n body.currentState.ax = body.currentState.ax - body.currentState.vx * body.damping / body.m;\r\n body.currentState.ay = body.currentState.ay - body.currentState.vy * body.damping / body.m;\r\n body.currentState.az = body.currentState.az - body.currentState.vz * body.damping / body.m;\r\n }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "public double[] calculateDrift(ArrayList<T> tracks){\n\t\tdouble[] result = new double[3];\n\t\t\n\t\tdouble sumX =0;\n\t\tdouble sumY = 0;\n\t\tdouble sumZ = 0;\n\t\tint N=0;\n\t\tfor(int i = 0; i < tracks.size(); i++){\n\t\t\tT t = tracks.get(i);\n\t\t\tTrajectoryValidIndexTimelagIterator it = new TrajectoryValidIndexTimelagIterator(t,1);\n\t\n\t\t\t//for(int j = 1; j < t.size(); j++){\n\t\t\twhile(it.hasNext()) {\n\t\t\t\tint j = it.next();\n\t\t\t\tsumX += t.get(j+1).x - t.get(j).x;\n\t\t\t\tsumY += t.get(j+1).y - t.get(j).y;\n\t\t\t\tsumZ += t.get(j+1).z - t.get(j).z;\n\t\t\t\tN++;\n\t\t\t}\n\t\t}\n\t\tresult[0] = sumX/N;\n\t\tresult[1] = sumY/N;\n\t\tresult[2] = sumZ/N;\n\t\treturn result;\n\t}", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f LinearVelocity() { return nLinearVelocity(address()); }", "public Vector2D getAcceleration()\n\t{\n\t\treturn acceleration;\n\t}", "public static void setAcceleration(int acceleration) {\n leftMotor.setAcceleration(acceleration);\n rightMotor.setAcceleration(acceleration);\n }", "public void updateVelocity() {\n \t// Step 1: input power and convert the power to a force based on the starting velocity\n \tsetWeight();\n \tdouble trainMass = trainWeight*KG_PER_POUND;\n \t\n \t// this is ensuring that we never get a negative speed\n \tif (this.currentSpeed == 0) {\n \t\tthis.force = (this.powerIn)/1;\n \t} else {\n \t\tthis.force = (this.powerIn)/this.currentSpeed;\n \t}\n \tsetGrade();\n \t\n \t// Step 2: Calculate the slope of the train's current angle (Degrees = Tan-1 (Slope Percent/100))\n \tthis.slope = Math.atan2(this.grade,100);\n \tdouble angle = Math.toDegrees(this.slope);\n \t\n \t// Step 3: Calculate the forces acting on the train using the coefficient of friction\n \t// and the train's weight in lbs converted to kg divided over the wheels (where the force is technically\n \t// being applied times gravity (G)\n \tthis.normalForce = (trainMass/this.trainWheels) * G * Math.sin((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n \tthis.downwardForce = (trainMass/this.trainWheels) * G * Math.cos((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n\n \t// compute friction force\n \tthis.friction = (FRICTION_COEFFICIENT * this.downwardForce) + this.normalForce;\n \t\n \t// sum of the forces\n \tthis.totalForce = this.force - this.friction;\n \t \t\n \tthis.force = this.totalForce;\n \t\n \t// Step 4: Calculate acceleration using the F = ma equation, where m = the mass of the body moving\n \tthis.trainAcceleration = this.force/trainMass;\n \t\n \t// and have to check to make sure this acceleration does not exceed our max.\n \tif (this.trainAcceleration >= TRAIN_MAX_ACCELERATION * 1) {\t// time elapsed (one second)\n \t\t// set the acceleration as the max acceleration because we cannot exceed that\n \t\tthis.trainAcceleration = TRAIN_MAX_ACCELERATION * 1;\t// time elapsed (one second)\n \t}\n \t\n\t\temerBrake = this.getEBrake();\n \t// decelerates the train based on the values given in the spec sheet for the emergency brake\n \tif (emerBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_E_BRAKE*1);\n \t}\n \t\n \t// decelerates the train based onthe values given in the spec sheet for the service brake\n \tif(serviceBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_SERVICE_BRAKE*1);\n \t}\n \t\n \t// Step 5: Calculate the final speed by adding the old speed with the acceleration x the time elapsed (one second)\n \tthis.finalSpeed = this.currentSpeed + (this.trainAcceleration * 1);\n \t\n \t// NO NEGATIVE SPEEDS YINZ\n \tif(this.finalSpeed < 0) {\n this.finalSpeed = 0;\n }\n \t\n \t// resetting the current speed based on our calculations\n \tthis.currentSpeed = this.finalSpeed;\n \tthis.distTravelled = this.currentSpeed * 1; // speed times the time between clock ticks = distance travelled\n \t//System.out.println(finalSpeed);\n \t\n \tif(!(currentBlock == this.position.getCurrentBlock())) {\n \t\tmetersIn = 0;\n \t} else {\n \t\tmetersIn += this.distTravelled;\n \t}\n \tthis.position.moveTrain(this.distTravelled); // method call to tell the position class how far to move the train\n \t\n }", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }", "@Override public void onSensorChanged(SensorEvent event) \n\t{\n\t\tif (Sensor.TYPE_ACCELEROMETER == event.sensor.getType())\n\t\t{\n\t\t\t//The values provided from the accelerometer are always relative to the default screen orientation which can change\n\t\t\t//from device to device. To alleviate this we are converting into \"screen\" coordinates. This has been taken from\n\t\t\t//the nvidia accelerometer white paper which can be found at : http://developer.download.nvidia.com/tegra/docs/tegra_android_accelerometer_v5f.pdf\n\t\t\tActivity activity = CSApplication.get().getActivity();\n\t\t\tWindowManager windowManager = (WindowManager)activity.getSystemService(Activity.WINDOW_SERVICE);\n\t\t\tint rotationIndex = windowManager.getDefaultDisplay().getRotation();\n\t\t\tAxisSwap axisSwap = m_axisSwapForRotation[rotationIndex];\n\t\t\tfloat fScreenX = ((float)axisSwap.m_negateX) * event.values[axisSwap.m_sourceX];\n\t\t\tfloat fScreenY = ((float)axisSwap.m_negateY) * event.values[axisSwap.m_sourceY];\n\t\t\tfloat fScreenZ = event.values[2];\n\n\t\t\t//the values provided by android are in ms^-2. Accelerometer values are more typically given in\n\t\t\t//terms of \"g\"'s so we are converting here. We are also converting from a x, y and z positive in the\n\t\t\t//left, up and backward directions respectively to right, up and forward directions to be more consistent with iOS.\n\t\t\tfinal float k_gravity = 9.80665f;\n\t\t\tfinal float k_accelerationX = -fScreenX / k_gravity;\n\t\t\tfinal float k_accelerationY = fScreenY / k_gravity;\n\t\t\tfinal float k_accelerationZ = -fScreenZ / k_gravity;\n\t\t\t\n\t\t\t//update acceleration on main thread.\n\t\t\tRunnable task = new Runnable()\n\t\t\t{ \n\t\t\t\t@Override public void run() \n\t\t\t\t{\n\t\t\t\t\tif (true == mbHasAccelerometer && true == mbListening)\n\t\t\t\t\t{\n\t\t\t UpdateAcceleration(k_accelerationX, k_accelerationY, k_accelerationZ);\n\t\t\t }\n\t\t\t\t}\n\t\t\t};\n\t\t\tCSApplication.get().scheduleMainThreadTask(task);\n\t\t}\n\t}", "public void setForce(float force) { \n \tthis.force = force; \n }", "float[][] getCameraVectors(int resX, int resY){\n float vectors[][]=new float[resX*resY][3];//first vector index, second the components of the vector\n float[] vect2=rotateYVector(dir);\n vect2[1]=0;\n vect2=normalize(vect2);\n float[] vect3=normalize(vectorProduct(dir, vect2));//dir, vect2, vect3 base vectors\n float[] x={0,0,0};\n float[] y={0,0,0};\n float[] temp={0,0,0};\n for(int i=0;i<3;i++){\n x[i]=(vect2[i])/(resX/2);\n y[i]=(vect3[i])/(resY/2);\n temp[i]=vect2[i];\n }\n \n for(int j=0;j<resY;j++){\n for(int i=0;i<resX;i++){\n vectors[j*resX+i][0]=dir[0]+vect2[0]+vect3[0];\n vectors[j*resX+i][1]=dir[1]+vect2[1]+vect3[1];\n vectors[j*resX+i][2]=dir[2]+vect2[2]+vect3[2];\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n if((vectorLength(vect2)>(-0.0001)&&vectorLength(vect2)<0.0001)&&(resX%2)==0){\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n }\n }\n //printVector(temp);\n vect2[0]=temp[0];\n vect2[1]=temp[1];\n vect2[2]=temp[2];\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n if((vectorLength(vect3)>(-0.0001)&&vectorLength(vect3)<0.0001)&&(resY%2)==0){\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n }\n }\n \n return vectors;\n }", "public static Quaternion calculateQuaternionNineAxis(\n\t\t\tdouble accel1, double accel2, double accel3, \n\t\t\tdouble gyro1, double gyro2, double gyro3, \n\t\t\tdouble mag1, double mag2, double mag3){\n\t\t\n\t\tif(currentTime != 0){\n\t\t\tlong sampleTime = System.currentTimeMillis() - currentTime;\n//\t\t\tSystem.out.println(\"Sample time: \"+sampleTime);\n\t\t\tsampleFreq = 1.0 * 1000 / sampleTime;\n//\t\t\tSystem.out.println(\"Sample Freq: \"+sampleFreq);\n\t\t}\n\t\t\n\t\t// update current time when updating coordinate\n\t\tcurrentTime = System.currentTimeMillis();\n\t\t\n\t\tdouble normalizedDenominator;\n\t\tdouble s0, s1, s2, s3;\n\t\tdouble qDot1, qDot2, qDot3, qDot4;\n\t\tdouble hx, hy;\n\t\tdouble _2q0mx, _2q0my, _2q0mz, _2q1mx, _2bx, _2bz, _4bx, _4bz;\n\t\tdouble _2q0, _2q1, _2q2, _2q3, _2q0q2, _2q2q3, q0q0, q0q1, q0q2, q0q3, q1q1, q1q2, q1q3, q2q2, q2q3, q3q3;\n\n\t\t// Rate of change of quaternion from gyroscope\n\t\tqDot1 = 0.5f * (-q1 * gyro1 - q2 * gyro2 - q3 * gyro3);\n\t\tqDot2 = 0.5f * (q0 * gyro1 + q2 * gyro3 - q3 * gyro2);\n\t\tqDot3 = 0.5f * (q0 * gyro2 - q1 * gyro3 + q3 * gyro1);\n\t\tqDot4 = 0.5f * (q0 * gyro3 + q1 * gyro2 - q2 * gyro1);\n\n\t\t// Compute feedback only if accelerometer measurement valid (avoids NaN in accelerometer normalisation)\n\t\tif(!((accel1 == 0.0f) && (accel2 == 0.0f) && (accel3 == 0.0f))) {\n\n\t\t\t// Normalise accelerometer measurement\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(accel1 * accel1 + accel2 * accel2 + accel3 * accel3);\n\t\t\taccel1 *= normalizedDenominator;\n\t\t\taccel2 *= normalizedDenominator;\n\t\t\taccel3 *= normalizedDenominator; \n\n\t\t\t// Normalise magnetometer measurement\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(mag1 * mag1 + mag2 * mag2 + mag3 * mag3);\n\t\t\tmag1 *= normalizedDenominator;\n\t\t\tmag2 *= normalizedDenominator;\n\t\t\tmag3 *= normalizedDenominator;\n\n\t\t\t// Auxiliary variables to avoid repeated arithmetic\n\t\t\t_2q0mx = 2.0f * q0 * mag1;\n\t\t\t_2q0my = 2.0f * q0 * mag2;\n\t\t\t_2q0mz = 2.0f * q0 * mag3;\n\t\t\t_2q1mx = 2.0f * q1 * mag1;\n\t\t\t_2q0 = 2.0f * q0;\n\t\t\t_2q1 = 2.0f * q1;\n\t\t\t_2q2 = 2.0f * q2;\n\t\t\t_2q3 = 2.0f * q3;\n\t\t\t_2q0q2 = 2.0f * q0 * q2;\n\t\t\t_2q2q3 = 2.0f * q2 * q3;\n\t\t\tq0q0 = q0 * q0;\n\t\t\tq0q1 = q0 * q1;\n\t\t\tq0q2 = q0 * q2;\n\t\t\tq0q3 = q0 * q3;\n\t\t\tq1q1 = q1 * q1;\n\t\t\tq1q2 = q1 * q2;\n\t\t\tq1q3 = q1 * q3;\n\t\t\tq2q2 = q2 * q2;\n\t\t\tq2q3 = q2 * q3;\n\t\t\tq3q3 = q3 * q3;\n\n\t\t\t// Reference direction of Earth's magnetic field\n\t\t\thx = mag1 * q0q0 - _2q0my * q3 + _2q0mz * q2 + mag1 * q1q1 + _2q1 * mag2 * q2 + \n\t\t\t\t\t_2q1 * mag3 * q3 - mag1 * q2q2 - mag1 * q3q3;\n\t\t\thy = _2q0mx * q3 + mag2 * q0q0 - _2q0mz * q1 + _2q1mx * q2 - mag2 * q1q1 + \n\t\t\t\t\tmag2 * q2q2 + _2q2 * mag3 * q3 - mag2 * q3q3;\n\t\t\t_2bx = Math.sqrt(hx * hx + hy * hy);\n\t\t\t_2bz = -_2q0mx * q2 + _2q0my * q1 + mag3 * q0q0 + _2q1mx * q3 - mag3 * q1q1 + \n\t\t\t\t\t_2q2 * mag2 * q3 - mag3 * q2q2 + mag3 * q3q3;\n\t\t\t_4bx = 2.0f * _2bx;\n\t\t\t_4bz = 2.0f * _2bz;\n\n\t\t\t// Gradient decent algorithm corrective step\n\t\t\ts0 = -_2q2 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q1 * (2.0f * q0q1 + _2q2q3 - accel2) - \n\t\t\t\t\t_2bz * q2 * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mag1) + \n\t\t\t\t\t(-_2bx * q3 + _2bz * q1) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - mag2) + \n\t\t\t\t\t_2bx * q2 * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\ts1 = _2q3 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q0 * (2.0f * q0q1 + _2q2q3 - accel2) - \n\t\t\t\t\t4.0f * q1 * (1 - 2.0f * q1q1 - 2.0f * q2q2 - accel3) + _2bz * q3 * (_2bx * (0.5f - q2q2 - q3q3) + \n\t\t\t\t\t\t\t_2bz * (q1q3 - q0q2) - mag1) + (_2bx * q2 + _2bz * q0) * (_2bx * (q1q2 - q0q3) + \n\t\t\t\t\t\t\t\t\t_2bz * (q0q1 + q2q3) - mag2) + (_2bx * q3 - _4bz * q1) * (_2bx * (q0q2 + q1q3) + \n\t\t\t\t\t\t\t\t\t\t\t_2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\ts2 = -_2q0 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q3 * (2.0f * q0q1 + _2q2q3 - accel2) - \n\t\t\t\t\t4.0f * q2 * (1 - 2.0f * q1q1 - 2.0f * q2q2 - accel3) + \n\t\t\t\t\t(-_4bx * q2 - _2bz * q0) * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mag1) + \n\t\t\t\t\t(_2bx * q1 + _2bz * q3) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - mag2) + \n\t\t\t\t\t(_2bx * q0 - _4bz * q2) * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\ts3 = _2q1 * (2.0f * q1q3 - _2q0q2 - accel1) + _2q2 * (2.0f * q0q1 + _2q2q3 - accel2) + \n\t\t\t\t\t(-_4bx * q3 + _2bz * q1) * (_2bx * (0.5f - q2q2 - q3q3) + _2bz * (q1q3 - q0q2) - mag1) + \n\t\t\t\t\t(-_2bx * q0 + _2bz * q2) * (_2bx * (q1q2 - q0q3) + _2bz * (q0q1 + q2q3) - mag2) + \n\t\t\t\t\t_2bx * q1 * (_2bx * (q0q2 + q1q3) + _2bz * (0.5f - q1q1 - q2q2) - mag3);\n\t\t\tnormalizedDenominator = 1 / Math.sqrt(s0 * s0 + s1 * s1 + s2 * s2 + s3 * s3); \n\t\t\t\n\t\t\t// normalise step magnitude\n\t\t\ts0 *= normalizedDenominator;\n\t\t\ts1 *= normalizedDenominator;\n\t\t\ts2 *= normalizedDenominator;\n\t\t\ts3 *= normalizedDenominator;\n\n\t\t\t// Apply feedback step\n\t\t\tqDot1 -= beta * s0;\n\t\t\tqDot2 -= beta * s1;\n\t\t\tqDot3 -= beta * s2;\n\t\t\tqDot4 -= beta * s3;\n\t\t}\n\n\t\t// Integrate rate of change of quaternion to yield quaternion\n\t\tq0 += qDot1 * (1.0f / sampleFreq);\n\t\tq1 += qDot2 * (1.0f / sampleFreq);\n\t\tq2 += qDot3 * (1.0f / sampleFreq);\n\t\tq3 += qDot4 * (1.0f / sampleFreq);\n\n\t\t// Normalise quaternion\n\t\tnormalizedDenominator = 1 / Math.sqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3);\n\t\tq0 *= normalizedDenominator;\n\t\tq1 *= normalizedDenominator;\n\t\tq2 *= normalizedDenominator;\n\t\tq3 *= normalizedDenominator;\n\t\t\n\t\t\n\t\t// set Quaternion object\n\t\tQuaternion quaternion = new Quaternion(q0, q1, q2, q3);\n\t\t\n\t\treturn quaternion;\n\t}", "public void arcadeDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t} else {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t}\n\t}", "@Override\n\tpublic void setDeltarijAndDeltarkj(GVector coords3d) {\n\n\t\tchangedCoordinates = 0;\n\t\t//logger.debug(\"Setting Deltarij and Deltarkj\");\n\t\tfor (int i=0; i < changeAtomCoordinates.length; i++) {\n\t\t\tthis.changeAtomCoordinates[i] = false;\n\t\t}\n\t\tthis.moleculeCurrentCoordinates.sub(coords3d);\n\n\t\tfor (int i = 0; i < this.moleculeCurrentCoordinates.getSize(); i++) {\n\t\t\t//logger.debug(\"moleculeCurrentCoordinates \" + i + \" = \" + this.moleculeCurrentCoordinates.getElement(i));\n\t\t\tif (Math.abs(this.moleculeCurrentCoordinates.getElement(i)) > 0) {\n\t\t\t\tchangeAtomCoordinates[i/3] = true;\n\t\t\t\tchangedCoordinates = changedCoordinates + 1;\n\t\t\t\t//logger.debug(\"changeAtomCoordinates[\" + i/3 + \"] = \" + changeAtomCoordinates[i/3]);\n\t\t\t\ti = i + (2 - i % 3);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < ab.angleNumber; i++) {\n\t\t\tif ((changeAtomCoordinates[ab.angleAtomPosition[i][0]] == true) |\n\t\t\t\t\t(changeAtomCoordinates[ab.angleAtomPosition[i][1]] == true))\t\t{\n\n\t\t\t\trij[i] = ForceFieldTools.distanceBetweenTwoAtomsFrom3xNCoordinates(coords3d, ab.angleAtomPosition[i][1], ab.angleAtomPosition[i][0]);\n\t\t\t\tdeltarij[i] = rij[i] - r0IJ[i];\n\t\t\t\t//logger.debug(\"deltarij[\" + i + \"] = \" + deltarij[i]);\n\t\t\t}\n\t\t\t//else {System.out.println(\"deltarij[\" + i + \"] was no recalculated\");}\n\t\t\tif ((changeAtomCoordinates[ab.angleAtomPosition[i][1]] == true) |\n\t\t\t\t\t(changeAtomCoordinates[ab.angleAtomPosition[i][2]] == true))\t\t{\n\n\t\t\t\trkj[i] = ForceFieldTools.distanceBetweenTwoAtomsFrom3xNCoordinates(coords3d, ab.angleAtomPosition[i][1], ab.angleAtomPosition[i][2]);\n\t\t\t\tdeltarkj[i] = rkj[i] - r0KJ[i];\n\t\t\t\t//logger.debug(\"deltarkj[\" + i + \"] = \" + deltarkj[i]);\n\t\t\t}\n\t\t}\n\n\t\tmoleculeCurrentCoordinates.set(coords3d);\n\t}", "@Override\r\n double computeAccelerations() {\r\n double potentialEnergy;\r\n \r\n potentialEnergy = computeWallForces();\r\n assignMoleculesToCells(); \r\n potentialEnergy += computeForcesWithinCells();\r\n potentialEnergy += computeForcesWithNeighbourCells();\r\n \r\n return potentialEnergy;\r\n }", "private void updateLinearDrive() {\n// double rotations = (getLeftRotations() + getRightRotations()) / 2;\n// linearDriveDistance = Conversion.rotationsToInches(rotations, Constants.driveWheelDiameter);\n// double angleController = turnControl.getOutput(linearDriveMultiplier * (navX.getAngle() - linearDriveTargetAngle));\n// double driveController = driveControl.getOutput(linearDriveTargetDistance - linearDriveDistance);\n// setOutput(driveController + angleController, driveController - angleController);\n }", "public interface ControlAero3DOF {\n\n\t/**\n\t* Method that sets the angle of attack in degrees.\n\t*\n\t* @param AOA Angle of attack in degrees.\n\t**/\n\tpublic void setAOA(float AOA);\n\t\n\t/**\n\t* Method that sets the Mach number.\n\t*\n\t* @param Mach The Mach number.\n\t**/\n\tpublic void setMach(float Mach);\n\t\n\t/**\n\t* Sets the control deflection angle in degrees\n\t*\n\t* @param def Deflection angle in degrees.\n\t**/\n\tpublic void setDef(float def);\n\t\n\t/**\n\t* Sets the height above ground level (for ground effect modeling).\n\t*\n\t* @param hob The height to the aero reference point\n\t* divided by the reference span \"bref\".\n\t**/\n\tpublic void setHOB(float hob);\n\t\n\t/**\n\t* Returns the wind axis lift coefficient increment due to control deflection.\n\t**/\n\tpublic float getDCL();\n\t\n\t/**\n\t* Method that returns the wind axis drag coefficient increment due to control deflection.\n\t**/\n\tpublic float getDCD();\n\t\n\t/**\n\t* Method that returns the wind axis pitching moment coefficient increment due to control deflection.\n\t**/\n\tpublic float getDCM();\n\t\n\t/**\n\t* Returns the body axis normal force coefficient increment due to control deflection.\n\t**/\n\tpublic float getDCN();\n\t\n\t/**\n\t* Method that returns the body axis axial force coefficient increment due to control deflection.\n\t**/\n\tpublic float getDCA();\n\t\n\t/**\n\t* Method that returns the body axis pitching moment coefficient increment due to control deflection.\n\t* (Which should be identical to the wind-axis pitching moment increment for a\n\t* 3-DOF model with no sideslip).\n\t**/\n\tpublic float getDCMb();\n\t\n}", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "public static final double[] DRIVE_AXIS() {\n\t\tdouble reverse = driver.getRawAxis(2);\n\t\tdouble accelerate = driver.getRawAxis(3);\n\t\tdouble x = driver.getX();\n\t\tdouble y = (accelerate - reverse)*(!(DRIVE_JOY().getRawButton(DRIVE_BOOST))?1.0:Constants.NO_BOOST_MULTIPLIER);\n\t\tdouble left = 0.0;\n\t\tdouble right = 0.0;\n//\t\tif(false) {\n//\t\t\tright = (1.5*y - x > 1.0 ? 1.0 : 1.5*y - x);\n//\t\t\tright = (1.5*y - x < -1.0 ? -1.0 : right);\n//\t\t\tleft = (1.5*y + x > 1.0 ? 1.0 : 1.5*y + x);\n//\t\t\tleft = (1.5*y + x < -1.0 ? -1.0 : left);\n//\t\t} else {\n\t\t\tright = (y*Math.abs(1.0 - x) > 1.0 ? 1.0 : y*Math.abs(1.0 - x));\n\t\t\tright = (y*Math.abs(1.0 - x) < -1.0 ? -1.0 : right);\n\t\t\tleft = (y*Math.abs(1.0 + x) > 1.0 ? 1.0 : y*Math.abs(1.0 + x));\n\t\t\tleft = (y*Math.abs(1.0 + x) < -1.0 ? -1.0 : left);\n\t\t//}\n\t\treturn new double[]{left,right};\n\t}" ]
[ "0.5926851", "0.5711656", "0.5447142", "0.54140586", "0.53196317", "0.5193422", "0.50581807", "0.5046966", "0.50006264", "0.4960829", "0.4960829", "0.4960829", "0.49305528", "0.4928678", "0.4883555", "0.48394325", "0.48284116", "0.47941533", "0.47853318", "0.47683185", "0.4721687", "0.4711142", "0.4707499", "0.47045338", "0.47029996", "0.4698771", "0.46871197", "0.4682305", "0.46563384", "0.46398276", "0.4639004", "0.46386355", "0.4637764", "0.46288428", "0.46146944", "0.46127966", "0.45977226", "0.45965958", "0.45900634", "0.45709023", "0.4562385", "0.45358318", "0.4532306", "0.452082", "0.44825953", "0.44634134", "0.44409764", "0.4440913", "0.4440795", "0.44343427", "0.4433526", "0.44158363", "0.44087863", "0.43962726", "0.43893898", "0.43862358", "0.43813896", "0.4378346", "0.4377246", "0.43729106", "0.43700862", "0.43534726", "0.4341885", "0.43371552", "0.43273515", "0.43268526", "0.43206537", "0.43086112", "0.42942828", "0.42859793", "0.42803553", "0.42654115", "0.42608285", "0.42575556", "0.4253005", "0.42486322", "0.4233316", "0.42319885", "0.42201647", "0.42172664", "0.42169356", "0.42160985", "0.42071164", "0.42071164", "0.41975334", "0.41968766", "0.41942307", "0.41912356", "0.4190153", "0.41830224", "0.41803017", "0.41797432", "0.41772708", "0.41769427", "0.4169636", "0.4166056", "0.4162346", "0.4147026", "0.41468656", "0.41445398" ]
0.8340097
0
POSITION Calculates and returns the translation and rotation of the drone given its new velocities (in world frame). The given Vector3f[] array is assumed to contain the new linear velocity at index 0 and the new angular velocity at index 1, both in world frame. Note that this function also uses the previous velocities of the drone and thus should be called before the given newVelocities are saved in the drone.
private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) { // calculate the average linear velocity Vector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]); // calculate the translation Vector3f deltaPositionW = (Vector3f) avgLinearVelocityW.scale(dt); // calculate the average angular velocity Vector3f avgAngularVelocityW = average(drone.getAngularVelocity(), newVelocities[1]); // calculate the rotation Vector3f deltarotationW = ((Vector3f) avgAngularVelocityW.scale(dt)); return new Vector3f[] { deltaPositionW, deltarotationW }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "private static double calculatePosition(double position, double deltaT, double velocity) {\n return position + (deltaT * velocity);\n }", "public void calculatePosition(Body[] bodies, int dt) {\n this.updateVelocity(bodies, dt);\n this.temp_x += this.vx * dt + 0.5 * this.ax * dt * dt;\n this.temp_y += this.vy * dt + 0.5 * this.ay * dt * dt;\n }", "public void update( PVector[] positions, int[] lasers, boolean useTransformations){\n\n\t\tbyte serialPackage[] = {0};\n\t\tint bytePos = 0;\n\t\tint byteSize = 4 * activePointers();\n\n\n\t\tfor (int i = 0; i < activePointers(); i++) {\n\t\t\tPointerDevice p = pointers.get(i);\n\n\n\t\t\tif(p.active){\n\n\t\t\t\t//if(i == 0) serial.write((byte)byteSize); //first byte. number of following bytes (index, laser, servo1, servo2)\n\t\t\t\tif(i == 0){\n\t\t\t\t\tserialPackage = new byte[byteSize + 1];\n\t\t\t\t\tserialPackage[bytePos++] = (byte)byteSize;\n\t\t\t\t}\n\n\t\t\t\tp.setLaser(lasers[i]);\n\t\t\t\tserialPackage[bytePos++] = (byte)i;\n\t\t\t\tserialPackage[bytePos++] = (byte)p.laser;\n\n\n\t\t\t\t//pure position from mouse coord system\n\t\t\t\tfloat _x = positions[i].x;\n\t\t\t\tfloat _y = positions[i].y;\n\n\t\t\t\tif (useTransformations) { //TODO check calibration again\n\t\t\t\t\t//pointerTrasformations( p, _x, _y );\n\t\t\t\t\tp.target = pointerTrasformations( p, _x, _y );\n\t\t\t\t\tserialPackage[bytePos++] = (byte) servoLimit(p.target.x); //toTarget\n\t\t\t\t\tserialPackage[bytePos++] = (byte) servoLimit(p.target.y); //toTarget\n\t\t\t\t}else{\n\t\t\t\t\t//System.out.println(\"_x: \"+ _x +\" , _y:\" + _y);\n\t\t\t\t\tserialPackage[bytePos++] = (byte)_x; //toTarget\n\t\t\t\t\tserialPackage[bytePos++] = (byte)_y; //toTarget\n\t\t\t\t}\n\n\t\t\t\t//update previous status\n\t\t\t\t//p.plaser = p.laser; //done in p.onLaserChange\n\t\t\t\t//p.ppos = p.copy(); //done in p.onMoveComplete\n\t\t\t}\n\t\t}\n\t\tsendCommands(serialPackage);\n\t}", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "public static void updatePosition() {\n\t\tfor (int i = 0; i < TitanV4.planets.length; i++) { //compute forces between all celestial corpses\n\t\t\tfor(int j=i; j<TitanV4.planets.length; j++){\n\t\t\t\tif (i != j) {\n\t\t\t\t\tdouble upper = TitanV4.G*TitanV4.planets[i].getMass() * TitanV4.planets[j].getMass();\n\t\t\t\t\tdouble lower = TitanV4.planets[i].getPosition().distanceFrom(TitanV4.planets[j].getPosition());\n\t\t\t\t\tdouble gravitation = upper/lower;\n\t\t\t\t\tVector a = new Vector();\n\t\t\t\t\ta = TitanV4.planets[i].getPosition().substract(TitanV4.planets[j].getPosition()).normalize().multiply(-1);\n\n\t\t\t\t\tTitanV4.planets[i].force.add(a.multiply(gravitation));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//compute acceleration vector for each celestial corpse but the sun\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tTitanV4.planets[i].acceleration = (TitanV4.planets[i].force.divide(TitanV4.planets[i].getMass()));\n\t\t}\n\n\t\t//calculate change in speed over deltaT\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tVector oldVelocity = new Vector(TitanV4.planets[i].velocity);\n\t\t\tTitanV4.planets[i].velocity.add((TitanV4.planets[i].acceleration.multiply(TitanV4.deltaT)));\n\n\t\t\tVector posChange = new Vector();\n\t\t\tposChange = (oldVelocity.add(velocity).divide(2)).multiply(TitanV4.deltaT);\n\t\t\tTitanV4.planets[i].pos.add(posChange);\n\t\t}\n\t}", "DVector3C getPosition();", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "public void moveTo(double newX, double newY, double newZ){\n pos[0] = newX;\n pos[1] = newY;\n pos[2] = newZ;\n }", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "public void setVelocityVector(double newDX, double newDY) {\r\n this.dx = newDX;\r\n this.dy = newDY;\r\n }", "private void UpdateVelocity()\n\t{\n\t\tVector2 currentPosition = new Vector2(parent.transform.position);\n\t\tVector2 newVelocity = Vector2.Add(currentPosition,previousPosition.negate());\n\t\tpreviousPosition = currentPosition;\n\t\t\n\t\tfloat currentRotation = parent.transform.rotation;\n\t\tangularVelocity = currentRotation - previousRotation;\n\t\tpreviousRotation = currentRotation;\n\t\t\n\t\tvelocity = newVelocity;\n\t}", "static float calculateNewPosition(float a, float deltaTime, float v, float x0) {\n return x0\n + (a * deltaTime * deltaTime / 2 + v * deltaTime)\n * (Utility.sensorType == Sensor.TYPE_GYROSCOPE ? GYROSCOPE_MOVEMENT_COEFF : GRAVITY_MOVEMENT_COEFF);\n }", "public static Vector3 getDeltaPositionFromRotation(float rotationYaw, float rotationPitch)\n {\n return new Vector3(rotationYaw, rotationPitch);\n }", "private static Vector3f[] calculateAccelerations(Drone drone, Vector3f[] forces) {\r\n\t\t// linear acceleration\r\n\t\tVector3f linearAccelerationW = new Vector3f(forces[0].x / drone.getMass(), forces[0].y / drone.getMass(),\r\n\t\t\t\tforces[0].z / drone.getMass());\r\n\r\n\t\t// rotational inertia values\r\n\t\tfloat iXx = drone.getInertiaMatrix().m00;\r\n\t\tfloat iYy = drone.getInertiaMatrix().m11;\r\n\t\tfloat iZz = drone.getInertiaMatrix().m22;\r\n\r\n\t\t// angular velocity\r\n\t\tVector3f omega = drone.getAngularVelocity();\r\n\r\n\t\t// angular acceleration\r\n\t\tVector3f angularAccelerationW = new Vector3f();\r\n\t\tangularAccelerationW.x = (forces[1].x + (iYy - iZz) * omega.y * omega.z) / iXx;\r\n\t\tangularAccelerationW.y = (forces[1].y + (iZz - iXx) * omega.x * omega.z) / iYy;\r\n\t\tangularAccelerationW.z = (forces[1].z + (iXx - iYy) * omega.x * omega.y) / iZz;\r\n\r\n\t\t// return the results\r\n\t\treturn new Vector3f[] { linearAccelerationW, angularAccelerationW };\r\n\t}", "@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularVelocity() { return nAngularVelocity(address()); }", "@NativeType(\"ovrVector3f\")\n public OVRVector3f LinearVelocity() { return nLinearVelocity(address()); }", "boolean computeVelocityCommands(Twist cmd_vel){\n if(!initialized_){\n this.node.getLog().error(\"This planner has not been initialized, please call initialize() before using this planner\");\n return false;\n }\n\n //TODO: Transform\n/* PoseStamped global_pose;\n Header hdr=messageFactory.newFromType(Header._TYPE);\n hdr.setStamp(this.node.getCurrentTime());\n hdr.setFrameId(robot_base_frame_);\n global_pose.setHeader(hdr);\n Pose pose=messageFactory.newFromType(Pose._TYPE);\n Point p=messageFactory.newFromType(Point._TYPE);\n Quaternion q=messageFactory.newFromType(Quaternion._TYPE);\n p.setX(0.0);p.setY(0.0);p.setZ(0.0);\n pose.setPosition(p);\n q.setX(0.0);q.setY(0.0);q.setZ(0.0);q.setW(1);\n pose.setOrientation(q);\n global_pose.setPose(pose);\n tf_.getTree().lookupTransformBetween();*/\n\n\n\n // Set current velocities from odometry\n Twist global_vel=messageFactory.newFromType(Twist._TYPE);\n\n me.me_lock_.lock();\n try{\n linear.setX(me.base_odom_.getTwist().getTwist().getLinear().getX());\n linear.setY(me.base_odom_.getTwist().getTwist().getLinear().getY());\n angular.setZ(me.base_odom_.getTwist().getTwist().getAngular().getY());\n global_vel.setLinear(linear);\n global_vel.setAngular(angular);\n }finally {\n me.me_lock_.unlock();\n }\n\n //TODO: Transform\n //WARNNING not transformed\n/* tf::Stamped<tf::Pose> robot_vel;\n robot_vel.setData(tf::Transform(tf::createQuaternionFromYaw(global_vel.angular.z), tf::Vector3(global_vel.linear.x, global_vel.linear.y, 0)));\n robot_vel.frame_id_ = robot_base_frame_;\n robot_vel.stamp_ = ros::Time();*/\n PoseStamped robot_vel=messageFactory.newFromType(PoseStamped._TYPE);\n\n/* //WARNNING not transformed\n tf::Stamped<tf::Pose> goal_point;\n tf::poseStampedMsgToTF(global_plan_.back(), goal_point);*/\n PoseStamped goal_point=messageFactory.newFromType(PoseStamped._TYPE);\n\n //we assume the global goal is the last point in the global plan\n //WARNNING not transformed\n goal_point=global_plan_.get(global_plan_.size()-1);\n double goal_x = goal_point.getPose().getPosition().getX();\n double goal_y = goal_point.getPose().getPosition().getY();\n double yaw = LPutils.getYaw(goal_point.getPose().getOrientation());\n double goal_th = yaw;\n\n //TODO:get position in global frame of the robot\n //WARNNING not transformed\n /* tf::Stamped<tf::Pose> global_pose;\n //let's get the pose of the robot in the frame of the plan\n global_pose.setIdentity();\n global_pose.frame_id_ = robot_base_frame_;\n global_pose.stamp_ = ros::Time();\n tf_->transformPose(global_frame_, global_pose, global_pose);*/\n PoseStamped global_pose=messageFactory.newFromType(PoseStamped._TYPE);\n\n //check to see if we've reached the goal position\n if (xy_tolerance_latch_ || (LPutils.getGoalPositionDistance(global_pose.getPose(), goal_x, goal_y) <= xy_goal_tolerance_)) {\n\n //if(base_local_planner::goalPositionReached(global_pose, goal_x, goal_y, xy_goal_tolerance_) || xy_tolerance_latch_){\n\n //if the user wants to latch goal tolerance, if we ever reach the goal location, we'll\n //just rotate in place\n if(latch_xy_goal_tolerance_)\n xy_tolerance_latch_ = true;\n\n //check to see if the goal orientation has been reached\n double angle = LPutils.getGoalOrientationAngleDifference(global_pose.getPose(), goal_th);\n //check to see if the goal orientation has been reached\n if (Math.abs(angle) <= yaw_goal_tolerance_) {\n\n //set the velocity command to zero\n linear.setX(0.0);\n linear.setY(0.0);\n linear.setZ(0.0);\n cmd_vel.setLinear(linear);\n angular.setZ(0.0);\n cmd_vel.setAngular(angular);\n rotating_to_goal_ = false;\n xy_tolerance_latch_ = false;\n }\n else {\n //copy over the odometry information\n Odometry base_odom=messageFactory.newFromType(Odometry._TYPE);\n me.me_lock_.lock();\n try{\n base_odom=me.getBaseOdom();\n }finally {\n me.me_lock_.unlock();\n }\n\n //if we're not stopped yet... we want to stop... taking into account the acceleration limits of the robot\n if(!rotating_to_goal_ && !LPutils.stopped(base_odom, rot_stopped_velocity_, trans_stopped_velocity_)){\n //ROS_DEBUG(\"Not stopped yet. base_odom: x=%6.4f,y=%6.4f,z=%6.4f\", base_odom.twist.twist.linear.x,base_odom.twist.twist.linear.y,base_odom.twist.twist.angular.z);\n if(!stopWithAccLimits(global_pose, robot_vel, cmd_vel))\n return false;\n }\n //if we're stopped... then we want to rotate to goal\n else{\n //set this so that we know its OK to be moving\n rotating_to_goal_ = true;\n if(!rotateToGoal(global_pose, robot_vel, goal_th, cmd_vel))\n return false;\n }\n }\n\n //publish an empty plan because we've reached our goal position\n transformed_plan_.clear();\n LPutils.publishPlan(transformed_plan_, g_plan_pub_);\n LPutils.publishPlan(transformed_plan_, l_plan_pub_);\n //we don't actually want to run the controller when we're just rotating to goal\n return true;\n }\n\n //TODO:transform\n/* tf::Stamped<tf::Pose> target_pose;\n target_pose.setIdentity();\n target_pose.frame_id_ = robot_base_frame_;*/\n PoseStamped target_pose=messageFactory.newFromType(PoseStamped._TYPE);\n\n if (!skip_next_){\n if(!transformGlobalPlan(tf_, global_plan_, costmap_ros_, global_frame_, transformed_plan_)){\n this.node.getLog().warn(\"Could not transform the global plan to the frame of the controller\");\n return false;\n }\n PoseStamped target_pose_msg=messageFactory.newFromType(PoseStamped._TYPE);\n findBestWaypoint(target_pose_msg, global_pose);\n }\n //TODO\n /*tf::poseStampedMsgToTF(transformed_plan_[current_waypoint_], target_pose);*/\n\n\n Twist res=messageFactory.newFromType(Twist._TYPE);\n\n linear.setX(target_pose.getPose().getPosition().getX() - global_pose.getPose().getPosition().getX());\n linear.setY(target_pose.getPose().getPosition().getY() - global_pose.getPose().getPosition().getY());\n res.setLinear(linear);\n angular.setZ(Angles.shortest_angular_distance(LPutils.getYaw(global_pose.getPose().getOrientation()), Math.atan2(res.getLinear().getY(), res.getLinear().getX())));\n res.setAngular(angular);\n\n Vector2 goal_dir = new Vector2(res.getLinear().getX(),res.getLinear().getY());\n if (Vector2.abs(goal_dir) > me.max_vel_x_) {\n goal_dir = Vector2.mul(Vector2.normalize(goal_dir),me.max_vel_x_);\n }\n else if (Vector2.abs(goal_dir) < me.min_vel_x_) {\n goal_dir =Vector2.mul(Vector2.normalize(goal_dir), me.min_vel_x_ * 1.2);\n }\n\n\n Vector2 pref_vel = new Vector2(goal_dir.getX(),goal_dir.getY());\n\n //TODO collvoid added\n\n me.computeNewVelocity(pref_vel, cmd_vel);\n\n\n if(Math.abs(cmd_vel.getAngular().getZ())<me.min_vel_th_)\n angular.setZ(0.0);\n\n if(Math.abs(cmd_vel.getLinear().getX())<me.min_vel_x_)\n linear.setX(0.0);\n\n if(Math.abs(cmd_vel.getLinear().getY())<me.min_vel_y_)\n linear.setY(0.0);\n\n cmd_vel.setLinear(linear);\n cmd_vel.setAngular(angular);\n\n\n boolean valid_cmd = true; //collision_planner_.checkTrajectory(cmd_vel.linear.x, cmd_vel.linear.y, cmd_vel.angular.z,true);\n\n if (!valid_cmd){\n angular.setZ(0.0);\n linear.setX(0.0);\n linear.setY(0.0);\n cmd_vel.setLinear(linear);\n cmd_vel.setAngular(angular);\n }\n\n if (cmd_vel.getLinear().getX() == 0.0 && cmd_vel.getAngular().getZ() == 0.0 && cmd_vel.getLinear().getY() == 0.0) {\n\n this.node.getLog().debug(\"Did not find a good vel, calculated best holonomic velocity was:\"\n + me.velocity.getX()+\", \"+me.velocity.getY()+\", cur wp \"+current_waypoint_+\" of \"+transformed_plan_.size()+\" trying next waypoint\");\n if (current_waypoint_ < transformed_plan_.size()-1){\n current_waypoint_++;\n skip_next_= true;\n }\n else {\n transformed_plan_.clear();\n LPutils.publishPlan(transformed_plan_, g_plan_pub_);\n LPutils.publishPlan(transformed_plan_, l_plan_pub_);\n\n return false;\n }\n }\n else {\n skip_next_ = false;\n }\n\n\n List<PoseStamped> local_plan=new ArrayList<PoseStamped>();\n PoseStamped pos=messageFactory.newFromType(PoseStamped._TYPE);\n\n //TODO\n //tf::poseStampedTFToMsg(global_pose,pos);\n pos.setPose(global_pose.getPose());\n pos.setHeader(global_pose.getHeader());\n local_plan.add(pos);\n local_plan.add(transformed_plan_.get(current_waypoint_));\n LPutils.publishPlan(transformed_plan_, g_plan_pub_);\n LPutils.publishPlan(local_plan, l_plan_pub_);\n //me_->publishOrcaLines();\n return true;\n }", "public void calculateVelocity(Planet3D other) {\n\t\tVec3d temp = new Vec3d(other);\n\t\ttemp.sub(this);\n\t\tSystem.out.println(\"\\n[other]-[this]=[new dir] == [\"+other.x+\",\"+other.y+\",\"+other.z+\"]-[\"+this.x+\",\"+this.y+\",\"+this.z+\"]=[\"+temp.x+\",\"+temp.y+\",\"+temp.z+\"]\");\n\t\tdouble force=forceCalc(other.getMass(), temp.length());\n\t\ttemp.normalize();\n//\t\tSystem.out.println(\", and direction between is this:(\"+temp.x+\",\"+temp.y+\",\"+temp.z+\"),\\nthe other planet has a mass of \"+other.getMass());\n//\t\tSystem.out.println(\"the force added to the vector is:\"+(Math.abs(force)));\n\t\ttemp.mul(force);\t\n\t\tvelocity.sub(temp);\n\t\t\t\n\t}", "private Vector3f calcPosition() {\r\n float y = (float) (distance * Math.sin(Math.toRadians(pitch)));\r\n float xzDistance = (float) (distance * Math.cos(Math.toRadians(pitch)));\r\n float x = (float) (xzDistance * Math.sin(Math.toRadians(rotation)));\r\n float z = (float) (xzDistance * Math.cos(Math.toRadians(rotation)));\r\n return new Vector3f(x + center.x, y + center.y, z + center.z);\r\n }", "public void setPositions(char[] newPositions) {\r\n\t\trotors.setPositions(newPositions);\r\n\t}", "protected boolean calcNewPosition(Long deltaTime) {\n setMoveAccumulator(getMoveAccumulator() + deltaTime);\n if (isEngineOn() && (getMoveAccumulator() >= 1000000000 / 64) && (getBasicState() == BasicState.ACTIVE)) {\n newX = ActiveUnit.this.getX();\n newY = ActiveUnit.this.getY();\n double deltaPosition = (Double.valueOf(getVelocity()));\n setMoveAccumulator(0l);\n switch (getDirection()) {\n case UP:\n newY = (getY() - deltaPosition);\n break;\n case LEFT:\n newX = (getX() - deltaPosition);\n break;\n case DOWN:\n newY = (getY() + deltaPosition);\n break;\n case RIGHT:\n newX = (getX() + deltaPosition);\n break;\n }\n return true;\n }\n return false;\n }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "public static double[] solve(ODESystem ode, double time, double deltaT) {\n\t\tint systemSize = ode.getSystemSize();\n\t\tdouble[] q1 = new double[systemSize];\n\t\tdouble[] q2 = new double[systemSize];\n\t\tdouble[] q3 = new double[systemSize];\n\t\tdouble[] q4 = new double[systemSize];\n\t\tdouble[] intermediateVals = new double[systemSize];\n\t\tint i;\n\t\tdouble[] values = ode.getCurrentValues();\n\t\tq1 = ode.getFunction(time, values);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q1[i] / 2.0;\n\t\tq2 = ode.getFunction(time + deltaT/2.0, intermediateVals);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q2[i] / 2.0;\n\t\tq3 = ode.getFunction(time + deltaT/2.0, intermediateVals);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q3[i];\n\t\tq4 = ode.getFunction(time + deltaT, intermediateVals);\n\t\tdouble[] newVel = new double[systemSize];\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tnewVel[i] = values[i] + deltaT * (q1[i] + 2.0 * q2[i] +\n\t\t\t\t\t2.0 * q3[i] + q4[i]) / 6.0;\n//\t\tSystem.out.println(\"vx original: \" + values[0]);\n//\t\tSystem.out.println(\"vx after: \" + newVel[0]);\n\t\treturn newVel;\n\t}", "private void moveToNewPosition(float tpf) {\r\n\t\tif (linearVelocity == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tVector3f previousSpeed = linearVelocity;\r\n\t\tVector3f pos = targetSpatial.getLocalTranslation().clone();\r\n\t\tpos.addLocal(linearVelocity.mult(tpf));\r\n\t\tfloat oldX = targetSpatial.getLocalTranslation().x;\r\n\t\tfloat oldY = targetSpatial.getLocalTranslation().y;\r\n\t\ttargetSpatial.setLocalTranslation(pos);\r\n\t\ttargetSpatial.updateWorldVectors();\r\n\t\tfloat newX = targetSpatial.getLocalTranslation().x;\r\n\t\tfloat newY = targetSpatial.getLocalTranslation().y;\r\n\t\t\r\n\t\tif (FastMath.abs(previousSpeed.x) < FastMath.abs(linearVelocity.x)) {\r\n\t\t\tif (linearVelocity.x < 0) {\r\n\t\t\t\tlinearVelocity.setX(-FastMath.abs(previousSpeed.x));\r\n\t\t\t} else {\r\n\t\t\t\tlinearVelocity.setX(FastMath.abs(previousSpeed.x));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (FastMath.abs(previousSpeed.y) < FastMath.abs(linearVelocity.y)) {\r\n\t\t\tif (linearVelocity.y < 0) {\r\n\t\t\t\tlinearVelocity.setY(-FastMath.abs(previousSpeed.y));\r\n\t\t\t} else {\r\n\t\t\t\tlinearVelocity.setY(FastMath.abs(previousSpeed.y));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (listeners != null) {\r\n\t\t\tfor (int i = 0; i < listeners.size(); i++) {\r\n\t\t\t\tif (listeners.get(i) != null) {\r\n\t\t\t\t\tlisteners.get(i).itemFlicked(this, targetSpatial, newX,\r\n\t\t\t\t\t\t\tnewY, oldX, oldY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@OnlyIn(Dist.CLIENT)\n public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport) {\n this.newPosRotationIncrements = 0;\n }", "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 static void new_position( Body body, double t ){\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = body.currentState.x + body.currentState.vx * t; // new x\r\n body.currentState.y = body.currentState.y + body.currentState.vy * t; // new y\r\n body.currentState.z = body.currentState.z + body.currentState.vz * t; // new z\r\n }", "@Override\n\tpublic Vector3d getPosition() {\n\t\tVector3f pos = this.getChild(NON_LINES_NAME).getLocalTranslation();\n\t\treturn new Vector3d(pos.x, pos.y, pos.z);\n\t}", "@java.lang.Override\n public godot.wire.Wire.Vector3 getPosition() {\n return position_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : position_;\n }", "public Vector3D getCurrentPosition() throws ManipulatorException;", "@Override\n\t@SideOnly(Side.CLIENT)\n\tpublic void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)\n\t{\n\t\tthis.motionX = p_70016_1_;\n\t\tthis.motionY = p_70016_3_;\n\t\tthis.motionZ = p_70016_5_;\n\n\t\tif ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F))\n\t\t{\n\t\t\tfloat f = MathHelper.sqrt_double((p_70016_1_ * p_70016_1_) + (p_70016_5_ * p_70016_5_));\n\t\t\tthis.prevRotationYaw = this.rotationYaw = (float) ((Math.atan2(p_70016_1_, p_70016_5_) * 180.0D) / Math.PI);\n\t\t\tthis.prevRotationPitch = this.rotationPitch = (float) ((Math.atan2(p_70016_3_, f) * 180.0D) / Math.PI);\n\t\t}\n\t}", "public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }", "public float getMotor_lin_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 128);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 120);\n\t\t}\n\t}", "public float getMotor_ang_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 132);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 124);\n\t\t}\n\t}", "public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }", "public Cartesian3d getPosition() {\n return getMotion().getPosition();\n }", "@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getPositionOrBuilder() {\n return getPosition();\n }", "public Vector3f getTranslationVel(int xform) {\n\t\treturn m_xforms[xform].m_translateVel;\n\t}", "public float interpolate( final float secondsDelta ) {\n final float oldVelocity = mCurrent;\n\n // point the acceleration at the target, or zero it if we are already\n // there\n final float directionalAcceleration = calculateAcceleration( oldVelocity, this.mAcceleration, this.mTarget );\n\n // calculate scaled acceleration (0.5 * acceleration * (time^2))\n final float scaledAcceleration = scaleAcceleration( directionalAcceleration, secondsDelta );\n\n // calculate the change in position\n float positionOffset = ( oldVelocity * secondsDelta ) + scaledAcceleration;\n\n // change in velocity = v + aT\n float newVelocity = oldVelocity + ( directionalAcceleration * secondsDelta );\n\n // check to see if we've passed our target velocity since the last time\n // step. If so, clamp to the target\n if( passedTarget( oldVelocity, newVelocity, this.mTarget ) ) {\n newVelocity = this.mTarget;\n }\n\n this.mCurrent = newVelocity;\n\n return positionOffset;\n }", "public void EulerNextPos(Body[] bodies, int dt) {\n double ax = 0;\n double ay = 0;\n double temp_vx = this.vx;\n double temp_vy = this.vy;\n for (int i = 0; i < bodies.length; i++) {\n Body otherBody = bodies[i];\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){ \n temp_acc = 0;\n }\n ax += temp_acc * (otherBody.x - this.x);\n ay += temp_acc * (otherBody.y - this.y);\n }\n }\n // change temp_vx and temp_vy based on acceleration\n temp_vx += ax * dt;\n temp_vy += ay * dt;\n \n this.euler_x = this.x + temp_vx * dt;\n this.euler_y = this.y + temp_vy * dt;\n }", "public void update( int[] lasers ){\n\t\tPVector positions[] = new PVector[activePointers()];\n\t\t//for (int i = 0; i < activePointers(); i++) {\n\t\tfor (int i = 0; i < pointers.size(); i++) {\n\t\t\tfloat _x = pointers.get(i).x;\n\t\t\tfloat _y = pointers.get(i).y;\n\t\t\t//System.out.println(\"pointer \" + i + \": position:\" + _x + \",\" + _y );\n\t\t\tpositions[i] = new PVector(_x,_y);\n\t\t}\n\t\tupdate( positions, lasers, false); //retransmiting position with no transformation\n\t}", "private Point[] transformCoordinateSystem(Point[] objectPosition, Point newCenter) {\n\t\tPoint[] transformedObjectPosition = objectPosition;\n\t\tfor(int i = 0; i < objectPosition.length; i++) {\n\t\t\t// Move location to coordinate system with center in origo \n\t\t\ttransformedObjectPosition[i].set(new double[] {\n\t\t\t\tobjectPosition[i].x - newCenter.x,\n\t\t\t\tobjectPosition[i].y - newCenter.y\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn transformedObjectPosition;\n\t}", "@Override\n\t\tpublic void updateVariables(){\n\t\t\tthis.currentX = odometer.getCurrentX();\n\t\t\tthis.currentY = odometer.getCurrentY();\n\t\t\tthis.currentAngle = odometer.getHeadingAngle();\n\t\t\tthis.currentAverageVelocity = odometer.getCurrentAverageVelocity();\n\t\t}", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }", "public Vector3[][] update() {\n\t\t\tint count = positions.size();\n\t\t\tint orientationsSize = orientations.size();\n\t\t\tif (orientationsSize < count)\n\t\t\t\tcount = orientationsSize;\n\t\t\t\n\t\t\t// Pop from queues to results\n\t\t\tVector3[][] result = new Vector3[count][2];\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tresult[i][0] = positions.poll();\n\t\t\t\tresult[i][1] = orientations.poll();\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t}", "public godot.wire.Wire.Vector3OrBuilder getPositionOrBuilder() {\n if (positionBuilder_ != null) {\n return positionBuilder_.getMessageOrBuilder();\n } else {\n return position_ == null ?\n godot.wire.Wire.Vector3.getDefaultInstance() : position_;\n }\n }", "@Override\n\tpublic void setPositions(){\n\t\ttirePositions[0]=new Vector2(2f,-2.9f);// Rear\n\t\ttirePositions[1]=new Vector2(-2f,-2.9f); \n\n\t\ttirePositions[2]=new Vector2(2f,2.8f); //Fronts\n\t\ttirePositions[3]=new Vector2(-2f,2.8f);\n\t}", "public static double getRelativeOrient(Position oldPos, Position newPos, double corient){\n\t\tdouble orient360 = getOrient(oldPos, newPos);\n\t\tdouble relOrient = getOrientDel(orient360, corient);\n\t\treturn relOrient;\n\t}", "@Basic @Raw\n public double[] getPosition(){\n\t double[] result = {this.position[0], this.position[1]};\n\t return result;\n }", "public void getInterpolatedPositionVector (float u, Vector3f newPos) {\r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n newPos.x = keyFrame[1].position.x + \r\n ((keyFrame[2].position.x - keyFrame[1].position.x) * u);\r\n newPos.y = keyFrame[1].position.y + \r\n ((keyFrame[2].position.y - keyFrame[1].position.y) * u);\r\n newPos.z = keyFrame[1].position.z + \r\n ((keyFrame[2].position.z - keyFrame[1].position.z) * u);\r\n } else {\r\n\r\n newPos.x = c0.x + u * (c1.x + u * (c2.x + u * c3.x));\r\n newPos.y = c0.y + u * (c1.y + u * (c2.y + u * c3.y));\r\n newPos.z = c0.z + u * (c1.z + u * (c2.z + u * c3.z));\r\n\r\n }\r\n }", "public void update( PVector[] positions, int[] lasers){\n\t\tupdate( positions, lasers, true);\n\t}", "public void update( PVector[] positions){\n\t\tint lasers[] = new int[activePointers()];\n\t\tfor (int i = 0; i < activePointers(); i++) {\n\t\t\tlasers[i] = pointers.get(i).laser;\n\t\t}\n\t\tupdate( positions, lasers, true);\n\t}", "public void updatePosition(Vector position, Vector yawPitchRoll) {\n MathUtil.setVector(this.liveAbsPos, position);\n this.liveAbsPos.add(this.relativePos);\n\n this.yawPitchRoll = yawPitchRoll;\n this.liveYaw = (float) this.yawPitchRoll.getY();\n if (this.syncMode != SyncMode.SEAT && this.hasPitch()) {\n livePitch = (float) this.yawPitchRoll.getX();\n } else {\n livePitch = 0.0f;\n }\n if (this.entityTypeIsMinecart) {\n this.liveYaw -= 90.0f;\n }\n\n // If sync is not yet set, set it to live\n if (Double.isNaN(this.syncAbsPos.getX())) {\n this.syncPositionSilent();\n }\n\n // Calculate the velocity by comparing the last synchronized position with the live position\n // This should only be done when sound is enabled for the Minecart\n // Velocity is used exclusively for controlling the minecart's audio level\n // When derailed, no audio should be made. Otherwise, the velocity speed controls volume.\n // Only applies when used in a minecart member network environment\n liveVel = 0.0;\n if (this.entityTypeIsMinecart && this.manager instanceof AttachmentControllerMember) {\n MinecartMember<?> member = ((AttachmentControllerMember) manager).getMember();\n if (member.hasInitializedGroup() && member.getGroup().getProperties().isSoundEnabled() && !member.isDerailed()) {\n if (!Double.isNaN(this.velSyncAbsPos.getX())) {\n liveVel = this.liveAbsPos.distance(this.velSyncAbsPos);\n }\n MathUtil.setVector(this.velSyncAbsPos, this.liveAbsPos);\n\n // Limit to a maximum of 1.0, above this it's kind of pointless\n if (liveVel > 1.0) liveVel = 1.0;\n\n // Audio cutoff\n if (liveVel < 0.001) liveVel = 0.0;\n }\n }\n }", "public List<Float> getRobotPosition(Boolean param1) throws CallError, InterruptedException {\n return (List<Float>)service.call(\"getRobotPosition\", param1).get();\n }", "public List<Float> getRobotPosition() throws CallError, InterruptedException {\n return (List<Float>)service.call(\"getRobotPosition\").get();\n }", "private void UpdateTransform()\n\t{\t\n\t\tTransform transform = parent.transform;\n\t\t\n\t\tVector2 friction = Vector2.Scale(-frictionCoefficient,velocity);\n\t\tfloat angularFriction = -frictionCoefficient*angularVelocity;\n\t\t\n\t\t//Newton integration P = P + dP + acceleration * dt^2\n\t\ttransform.position.x += velocity.x + (acceleration.x *deltaTime*deltaTime) + friction.x;\n\t\ttransform.position.y += velocity.y + (acceleration.y *deltaTime*deltaTime) + friction.y;\n\t\ttransform.rotation += angularVelocity + angularAcceleration*deltaTime*deltaTime + angularFriction ;\n\t\t\n\t}", "public int[] getCurrentMotorVelocities()\n {\n return finchController.getCurrentMotorVelocities();\n }", "public static float[] trilaterate(float[] p1, float r1, float[] p2, float r2, float[] p3, float r3) {\r\n float[] pos = new float[2];\r\n pos[0] = calcX(r1, r2, p2[0]);\r\n pos[1] = calcY(r1, r3, p3[0], p3[1], pos[0]);\r\n return pos;\r\n }", "public position convertToPosition(){\n\t\tdouble x = r * Math.cos(theta);\n\t\tdouble y = r * Math.sin(theta);\n\t\treturn new position(x, y);\n\t}", "private synchronized void updatePose(Move event) {\n\t\tfloat angle = event.getAngleTurned() - angle0;\n\t\tfloat distance = event.getDistanceTraveled() - distance0;\n\t\tdouble dx = 0, dy = 0;\n\t\tdouble headingRad = (Math.toRadians(heading));\n\n\t\tif (event.getMoveType() == Move.MoveType.TRAVEL\n\t\t\t\t|| Math.abs(angle) < 0.2f) {\n\t\t\tdx = (distance) * (float) Math.cos(headingRad);\n\t\t\tdy = (distance) * (float) Math.sin(headingRad);\n\t\t} else if (event.getMoveType() == Move.MoveType.ARC) {\n\t\t\tdouble turnRad = Math.toRadians(angle);\n\t\t\tdouble radius = distance / turnRad;\n\t\t\tdy = radius\n\t\t\t\t\t* (Math.cos(headingRad) - Math.cos(headingRad + turnRad));\n\t\t\tdx = radius\n\t\t\t\t\t* (Math.sin(headingRad + turnRad) - Math.sin(headingRad));\n\t\t}\n\t\tx += dx;\n\t\ty += dy;\n\t\theading = normalize(heading + angle); // keep angle between -180 and 180\n\t\tangle0 = event.getAngleTurned();\n\t\tdistance0 = event.getDistanceTraveled();\n\t\tcurrent = !event.isMoving();\n\t}", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "public static void changePosition() {\n int direction;\n int speed;\n int newTopX;\n int newTopY;\n\n for (int i = 0; i < numShapes; ++i) {\n direction = moveDirection[i];\n speed = moveSpeed[i];\n newTopX = xTopLeft[i];\n newTopY = yTopLeft[i];\n\n //the switch uses the direction the speed should be applied to in order to find the new positions\n switch (direction) {\n case 0 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n }\n //upper left 135 degrees\n case 1 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 2 -> {\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n //upper right 45 degrees\n case 3 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 4 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n }\n //bottom right 315 degrees\n case 5 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n case 6 -> {\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n //bottom left 225 degrees\n case 7 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n }\n }\n }", "protected void computeTranslationVelocityCommand() { // (Solution)\n\t\tdouble translationError = targetRange - desiredFixationDistance; // (Solution)\n\t\tif (Math.abs(translationError) < translationErrorTolerance) // (Solution)\n\t\t\ttranslationVelocityCommand = 0.0; // (Solution)\n\t\telse\n\t\t\t// (Solution)\n\t\t\ttranslationVelocityCommand = // (Solution)\n\t\t\tMath.max(-translationVelocityMax, // (Solution)\n\t\t\t\t\tMath.min(translationVelocityMax, // (Solution)\n\t\t\t\t\t\t\ttranslationError * translationVelocityGain)); // (Solution)\n\t}", "void setPosition (DVector3C xyz);", "@Basic @Raw\n public double[] getVelocity(){\n \t return this.velocity.getVelocity();\n }", "public List<Vector2> getOldPos() {\n return oldPos;\n }", "private double calculateNewSteeringWheelPosition(double newPos) {\n if (newPos > MAXPOSITION) {\n return MAXPOSITION;\n }\n\n if (newPos < MINPOSITION) {\n return MINPOSITION;\n }\n\n // Ha már egy lépésnyinél kevesebbel térünk el 0-tól, akkor beállítjuk 0-ra\n // hogy ne ugráljon magától ide oda a kormányállás.\n if (Math.abs(newPos) < STEP) {\n return 0;\n }\n\n return newPos;\n }", "public Vector3f getAngularVelocity() {\n return Converter.convert(rBody.getAngularVelocity(tempVec));\n }", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}", "public void update(float deltaTime) {\n\t\tif (m_motionMode == NvCameraMotionType.DUAL_ORBITAL) {\n\t Transform xfm = m_xforms[NvCameraXformType.MAIN];\n\t Transform xfs = m_xforms[NvCameraXformType.SECONDARY];\n//\t xfm.m_rotate += xfm.m_rotateVel*deltaTime;\n\t VectorUtil.linear(xfm.m_rotate, xfm.m_rotateVel, deltaTime, xfm.m_rotate);\n//\t xfs.m_rotate += xfs.m_rotateVel*deltaTime;\n\t VectorUtil.linear(xfs.m_rotate, xfs.m_rotateVel, deltaTime, xfs.m_rotate);\n//\t xfm.m_translate += xfm.m_translateVel * deltaTime;\n\t VectorUtil.linear(xfm.m_translate, xfm.m_translateVel, deltaTime, xfm.m_translate);\n\n\t updateMats(NvCameraXformType.MAIN);\n\t updateMats(NvCameraXformType.SECONDARY);\n\t } else {\n\t Transform xf = m_xforms[NvCameraXformType.MAIN];\n//\t xf.m_rotate += xf.m_rotateVel*deltaTime;\n\t VectorUtil.linear(xf.m_rotate, xf.m_rotateVel, deltaTime, xf.m_rotate);\n\t Vector3f transVel;\n\t if (m_motionMode == NvCameraMotionType.FIRST_PERSON) {\n\t // obviously, this should clamp to [-1,1] for the mul, but we don't care for sample use.\n\t xf.m_translateVel.x = xf.m_maxTranslationVel * (m_xVel_kb+m_xVel_gp);\n\t xf.m_translateVel.z = xf.m_maxTranslationVel * (m_zVel_mouse+m_zVel_kb+m_zVel_gp);\n//\t transVel = nv.vec3f(nv.transpose(xf.m_rotateMat) * \n//\t nv.vec4f(-xf.m_translateVel.x, xf.m_translateVel.y, xf.m_translateVel.z, 0.0f));\n\t xf.m_rotateMat.transpose();\n\t transVel = new Vector3f(-xf.m_translateVel.x, xf.m_translateVel.y, xf.m_translateVel.z);\n\t VectorUtil.transformNormal(transVel, xf.m_rotateMat, transVel);\n\t xf.m_rotateMat.transpose();\n\t } else {\n\t transVel = xf.m_translateVel;\n\t }\n\n//\t xf.m_translate += transVel * deltaTime;\n\t VectorUtil.linear(xf.m_translate, transVel, deltaTime, xf.m_translate);\n\t updateMats(NvCameraXformType.MAIN);\n\t }\n\t}", "godot.wire.Wire.Vector3 getPosition();", "private void setServoPositions() {\n servoTapeMeasureUpDown.setPosition(HOOK_MAX_POSITION);\n\n double climberDumperPosition = servoClimberDumperArm.getPosition();\n servoClimberDumperArm.setPosition(CLIMBER_DUMPER_ARM_IN);\n\n servoZipLineLeft.setPosition(ZIP_LINE_LEFT_UP_POSITION);\n servoZipLineRight.setPosition(ZIP_LINE_RIGHT_UP_POSITION);\n servoAllClearLeft.setPosition(ALL_CLEAR_LEFT_INIT_POSITION);\n servoAllClearRight.setPosition(ALL_CLEAR_RIGHT_UP_POSITION);\n initializeDebrisPusher();\n }", "public void translate( double[] d ) {\n setValid( false );\n position.translate( d );\n }", "private void setLinearVelocity() {\r\n\t\tif (movingElement.getWorldLocations().size() < 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<WorldCursorRecord> positions = movingElement.getWorldLocations();\r\n\t\tint lastIndex = positions.size() - 1;\r\n\t\tint nextLastIndex = lastIndex - 2;\r\n\t\tVector3f lastPosition = positions.get(lastIndex).worldLocation;\r\n\t\tlong lastTime = positions.get(lastIndex).time;\r\n\t\tVector3f nextLastPosition = positions.get(nextLastIndex).worldLocation;\r\n\t\tlong nextLastTime = positions.get(nextLastIndex).time;\r\n\t\tfloat diffTimeMS = (lastTime - nextLastTime) / 1000000f;\r\n\t\tlinearVelocity = lastPosition.subtract(nextLastPosition).mult(\r\n\t\t\t\t(1f / diffTimeMS) * 1000f);\r\n\t\tlinearVelocity.setZ(0);\r\n\t}", "float[][] getCameraVectors(int resX, int resY){\n float vectors[][]=new float[resX*resY][3];//first vector index, second the components of the vector\n float[] vect2=rotateYVector(dir);\n vect2[1]=0;\n vect2=normalize(vect2);\n float[] vect3=normalize(vectorProduct(dir, vect2));//dir, vect2, vect3 base vectors\n float[] x={0,0,0};\n float[] y={0,0,0};\n float[] temp={0,0,0};\n for(int i=0;i<3;i++){\n x[i]=(vect2[i])/(resX/2);\n y[i]=(vect3[i])/(resY/2);\n temp[i]=vect2[i];\n }\n \n for(int j=0;j<resY;j++){\n for(int i=0;i<resX;i++){\n vectors[j*resX+i][0]=dir[0]+vect2[0]+vect3[0];\n vectors[j*resX+i][1]=dir[1]+vect2[1]+vect3[1];\n vectors[j*resX+i][2]=dir[2]+vect2[2]+vect3[2];\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n if((vectorLength(vect2)>(-0.0001)&&vectorLength(vect2)<0.0001)&&(resX%2)==0){\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n }\n }\n //printVector(temp);\n vect2[0]=temp[0];\n vect2[1]=temp[1];\n vect2[2]=temp[2];\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n if((vectorLength(vect3)>(-0.0001)&&vectorLength(vect3)<0.0001)&&(resY%2)==0){\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n }\n }\n \n return vectors;\n }", "public void applyAngularVelocityChange(final float velocityChange);", "public static NewMovement create(PosRotScale originLoc, float ex, float ey,float ez, int duration) {\n\n/*\n\t\tVector3 posO = new Vector3();\n\t\toriginObject.transform.getTranslation(posO);\n\t\t\n\t\tQuaternion orotation = new Quaternion();\n\t\toriginObject.transform.getRotation(orotation,true); //existing rotation\n\t\t\n\t\t//first we create a matrix for the destination location reusing the same rotation\n\t\t Vector3 destination_loc = new Vector3(ex,ey,ez);\n\t\t Vector3 destination_scale = new Vector3(1,1,1);\n\t\t// Matrix4 destination = new Matrix4(destination_loc,orotation,destination_scale);\n\t\t \n\t\t //the difference is the new movement\n\t\tMatrix4 oldloc = originObject.transform.cpy();\n\t\t\n\t\t Gdx.app.log(logstag, \"_____________________________________________destination_loc:\"+destination_loc.x+\",\"+destination_loc.y+\",\"+destination_loc.z);\n\t\t\t\n\t\t Vector3 destination_loc2 = destination_loc.mul(oldloc);\n\t\t \n\t\t Gdx.app.log(logstag, \"________________________=______destination_loc:\"+destination_loc2.x+\",\"+destination_loc2.y+\",\"+destination_loc2.z);\n\t\t\t\n\t\t\t\n\t\tMatrix4 destinationmatrix = new Matrix4().setTranslation(destination_loc2);\n\t\t\n\t\t*/\n\t\t Vector3 destination_loc = new Vector3(ex,ey,ez);\n\t\t \n\t\treturn create( originLoc, destination_loc, duration);\n\t\t\n\t}", "@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }", "Position getOldPosition();", "public godot.wire.Wire.Vector3 getPosition() {\n if (positionBuilder_ == null) {\n return position_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : position_;\n } else {\n return positionBuilder_.getMessage();\n }\n }", "public void update(){\n posX += velX;\n posY += velY;\n }", "@Override\n public ArrayList<Position> predictState(double time)\n {\n ArrayList<Position> predictedPosition = new ArrayList<Position>(1);\n\n // Assume position at time with velocity\n double deltaTime = time - lastPosUpdateTime_;\n if(pos_.size() != vel_.size())\n {\n System.out.println(\"Error pos_ size: \" + pos_.size() + \" and vel_ size: \" + vel_.size() +\n \" do not match\");\n }\n for(int i = 0; i < pos_.size(); ++i)\n {\n double position = pos_.get(i).getPosition() + (vel_.get(i).getVelocity() * deltaTime);\n predictedPosition.add( new Position(position));\n }\n return predictedPosition;\n\n }", "public void rotateByPlanet(double rotationDelta, Vector2 PlanetPos) {\n\n\n pos.sub(PlanetPos);\n Vector2 newPos = new Vector2();\n newPos.x = (float) (pos.x * Math.cos(rotationDelta - Math.PI*2) - pos.y * Math.sin(rotationDelta - Math.PI*2));\n newPos.y = (float) (pos.x * Math.sin(rotationDelta - Math.PI*2) + pos.y * Math.cos(rotationDelta - Math.PI*2));\n pos = newPos.add(PlanetPos);\n\n //this.rotation += rotation;\n }", "private double computeRelativePosition(final int vxId, final double[][] relativePositions, final int depth) {\n vxDepth[vxId] = depth;\n final float nradius = nradiusId != Graph.NOT_FOUND ? tree.getFloatValue(nradiusId, vxId) : 1;\n\n double sizeFather = Math.hypot(nradius, nradius);\n if (sizeFather < 1e-5) {\n sizeFather = Math.sqrt(2);\n }\n\n float sizeVirtualVx = 1;\n if (tree.getVertexTransactionCount(vxId, Graph.INCOMING) == 0) {\n sizeVirtualVx = 0;\n }\n\n // Initialise vertex position.\n if (relativePositions[vxId] == null) {\n relativePositions[vxId] = new double[5];\n }\n\n relativePositions[vxId][0] = 0;\n relativePositions[vxId][1] = 0;\n\n // Special case if the vertex is a leaf.\n if (tree.getVertexTransactionCount(vxId, Graph.OUTGOING) == 0) {\n relativePositions[vxId][2] = 0;\n relativePositions[vxId][3] = 0;\n relativePositions[vxId][4] = sizeFather;\n\n return relativePositions[vxId][4];\n }\n\n // Recursive call to obtain the set of radius of the children of vxId.\n // A virtual node is dynamically inserted in the neighbourhood of vxId in order to\n // reserve space for the connection of the father of vxId.\n final int nc = tree.getVertexTransactionCount(vxId, Graph.OUTGOING) + 1;\n final double[] angularSector = new double[nc];\n final double[] realCircleRadius = new double[nc];\n realCircleRadius[0] = sizeVirtualVx;\n double sumRadius = sizeVirtualVx;\n for (int position = 0; position < nc - 1; position++) {\n final int txId = tree.getVertexTransaction(vxId, Graph.OUTGOING, position);\n\n final int dstVxId = tree.getTransactionDestinationVertex(txId);\n realCircleRadius[position + 1] = computeRelativePosition(dstVxId, relativePositions, depth + 1);\n sumRadius += realCircleRadius[position + 1];\n }\n\n double resolution = 0;\n if (nAlgo) {\n final double[] subCircleRadius = new double[nc];\n subCircleRadius[0] = realCircleRadius[0];\n double maxRadius = 0;\n int maxRadiusIndex = 0;\n for (int i = 0; i < nc; i++) {\n subCircleRadius[i] = realCircleRadius[i];\n if (maxRadius < subCircleRadius[i]) {\n maxRadius = subCircleRadius[i];\n maxRadiusIndex = i;\n }\n }\n\n if (maxRadius > (sumRadius / 2)) {\n final double ratio = (sumRadius - maxRadius) > 1e-5 ? maxRadius / (sumRadius - maxRadius) : 1;\n for (int i = 0; i < nc; i++) {\n if (i != maxRadiusIndex) {\n subCircleRadius[i] *= ratio;\n }\n }\n\n sumRadius += 2F * maxRadius;\n }\n\n for (int i = 0; i < nc; i++) {\n angularSector[i] = 2 * Math.PI * subCircleRadius[i] / sumRadius;\n }\n } else {\n resolution = 2 * Math.PI;\n final Integer[] index = new Integer[nc];\n for (int i = 0; i < nc; i++) {\n index[i] = i;\n }\n\n Arrays.sort(index, (lhsIx, rhsIx) -> {\n final double lhs = realCircleRadius[lhsIx];\n final double rhs = realCircleRadius[rhsIx];\n\n if (lhs < rhs) {\n return 1;\n } else if (lhs > rhs) {\n return -1;\n } else {\n return 0;\n // Do nothing\n }\n });\n\n int i = 0;\n for (; i < index.length; i++) {\n final double radius = realCircleRadius[index[i]];\n final double angleMax = 2 * Math.asin(radius / (radius + sizeFather));\n final double angle = radius * resolution / sumRadius;\n\n if (angle > angleMax) {\n angularSector[index[i]] = angleMax;\n sumRadius -= radius;\n resolution -= angleMax;\n } else {\n break;\n }\n }\n\n if (i < index.length) {\n for (; i < index.length; i++) {\n final double radius = realCircleRadius[index[i]];\n final double angle = radius * resolution / sumRadius;\n angularSector[index[i]] = angle;\n }\n\n resolution = 0;\n } else {\n resolution /= nc;\n }\n }\n\n double angle = 0;\n final ArrayList<BoundingCircle> circles = new ArrayList<>(nc);\n for (int i = 0; i < nc; i++) {\n circles.add(new BoundingCircle());\n }\n\n for (int i = 0; i < nc; i++) {\n double packRadius;\n if (Math.abs(Math.sin(angularSector[i])) > 1e-5) {\n packRadius = realCircleRadius[i] / Math.sin(angularSector[i] / 2);\n } else {\n packRadius = 0;\n }\n\n packRadius = Math.max(packRadius, sizeFather + realCircleRadius[i]);\n\n if (i > 0) {\n angle += (angularSector[i - 1] + angularSector[i]) / 2 + resolution;\n }\n\n final BoundingCircle circle = circles.get(i);\n circle.setX(packRadius * Math.cos(angle));\n circle.setY(packRadius * Math.sin(angle));\n circle.setRadius(realCircleRadius[i]);\n }\n\n final BoundingCircle circleH = BoundingCircle.enclosingCircle(circles);\n final double[] relpos = relativePositions[vxId];\n relpos[2] = -circleH.getX();\n relpos[3] = -circleH.getY();\n relpos[4] = Math.sqrt(circleH.getRadius() * circleH.getRadius() - circleH.getY() * circleH.getY()) - Math.abs(circleH.getX());\n\n // Set relative position of all children\n // according to the centre of the enclosing circle.\n final int nOut = tree.getVertexTransactionCount(vxId, Graph.OUTGOING);\n for (int position = 0; position < nOut; position++) {\n final int txId = tree.getVertexTransaction(vxId, Graph.OUTGOING, position);\n\n final int outVxId = tree.getTransactionDestinationVertex(txId);\n final double[] outrelpos = relativePositions[outVxId];\n outrelpos[0] = circles.get(position + 1).getX() - circleH.getX();\n outrelpos[1] = circles.get(position + 1).getY() - circleH.getY();\n }\n\n return circleH.getRadius();\n }", "public float getPosition(){\n\t\treturn (float)cFrame + interpol;\n\t}", "@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 }", "@Override\r\n public List<Velocity> initialBallVelocities() {\r\n List<Velocity> velocityList = new ArrayList<Velocity>();\r\n velocityList.add(Velocity.fromAngleAndSpeed(225, 5));\r\n velocityList.add(Velocity.fromAngleAndSpeed(315, 5));\r\n return velocityList;\r\n }", "public Point[] transformPosition(Point[] objectPosition, double fieldWidth, double fieldHeight) {\n\t\t// Set field center point from sizes.\n\t\tthis.center.set(new double[] { fieldWidth/2, fieldHeight/2 });\n\t\t\n\t\t// Find centroid - geometric center of car.\n\t\tPoint carCenter = this.findCenter(objectPosition);\n\n\t\t// Find length of line between center and perceived location.\n\t\tdouble UV = this.lineLength(carCenter, center);\n\t\tdouble TV = sourceHeight;\n\t\t\n\t\t// Find the angle from the camera to the perceived location.\n\t\tdouble theta = Math.atan2(UV, TV);\n\t\t\n\t\t// Calculate error from perceived location and actual z-location.\n\t\tdouble AC = objHeight;\n\t\tdouble BC = Math.tan(theta) * AC;\n\t\t\n\t\t// Find length from center to z-axis transformed car location.\n\t\tdouble newLength = UV - BC;\n\t\t\n\t\t// Move coordinate system to move center to origo.\n\t\tPoint[] transformedObjectPosition = Arrays.copyOf(\n\t\t\tthis.transformCoordinateSystem(objectPosition, this.center),\n\t\t\tobjectPosition.length\n\t\t);\n\t\t\n\t\t// Create scalar and relocate the location of object (perceived loc / actual loc).\n\t\tdouble scalar = newLength / UV;\n\t\tfor(int i = 0; i < transformedObjectPosition.length; i++) {\n\t\t\ttransformedObjectPosition[i].set(new double[] {\n\t\t\t\ttransformedObjectPosition[i].x * scalar,\n\t\t\t\ttransformedObjectPosition[i].y * scalar\t\t\t\t\t\n\t\t\t});\n\t\t}\n\t\t\n\t\t// Return to old coordinate system.\n\t\ttransformedObjectPosition = this.inverseTransformCoordinateSystem(transformedObjectPosition, this.center);\n\t\t\n\t\t// Find center of triangle\n\t\tPoint objectCenter = this.findCenter(new MatOfPoint2f(transformedObjectPosition));\n\t\t\n\t\t// Transform to coordinate system with triangle center as origo.\n\t\ttransformedObjectPosition = this.transformCoordinateSystem(transformedObjectPosition, objectCenter);\n\t\t\n\t\t// Scale according to real-life factors\n\t\tfor(int i = 0; i < transformedObjectPosition.length; i++) {\n\t\t\ttransformedObjectPosition[i].set(new double[] {\n\t\t\t\ttransformedObjectPosition[i].x * Config.Client.triangleScale,\n\t\t\t\ttransformedObjectPosition[i].y * Config.Client.triangleScale\n\t\t\t});\n\t\t}\n\t\t\n\t\t// Return the inverse trasnform result.\n\t\treturn this.inverseTransformCoordinateSystem(transformedObjectPosition, objectCenter);\n\t}", "private void subcommandNewPosition(String command[] ) {\n\n // check if trading is allowed\n if( !engine.getTradeOn()) {\n // trading is not allowed; new position cannot be opened;\n // inform the user that he cannot open new positions if trading is not allowed\n displaySystemMessage(\"Cannot open new position because trading is not allowed.\");\n\n // exit from method\n return;\n\n } // end of if statement\n\n // check if the new position should be long\n if(command[2].contentEquals(\"long\") || command[2].contentEquals(\"-l\") ) {\n\n // display message in the logs\n displayLogMessage(\"/new position long\");\n\n // display system message informing the user that opening of new long position was requested\n displaySystemMessage(\"The opening of new long position has been requested.\");\n\n // attempt to open new long position\n accessEngine().requestNewPosition(OrderType.LONG);\n\n // exit from method\n return;\n\n } // end of if statement\n\n // check if the new position should be short\n if(command[2].contentEquals(\"short\") || command[2].contentEquals(\"-s\")) {\n\n // display message in the logs\n displayLogMessage(\"/new position short\" );\n\n // display system message informing the user that opening of new short position was requested\n displaySystemMessage(\"The opening of new short position has been requested.\");\n\n // attempt to open new short position\n accessEngine().requestNewPosition(OrderType.SHORT);\n\n // exit from method\n return;\n\n } // end of if statement\n\n // incorect usage of the command ( the parameter is invalid );\n // inform the user that the command was not used properly\n displaySystemMessage(\"incorect usage of command \\\"/new\\\".\");\n\n }", "private float[] generateParticleVelocities()\n {\n float velocities[] = new float[mEmitRate * 3];\n for ( int i = 0; i < mEmitRate * 3; i +=3 )\n {\n Vector3f nexVel = getNextVelocity();\n velocities[i] = nexVel.x;\n velocities[i+1] = nexVel.y;\n velocities[i+2] = nexVel.z;\n }\n return velocities;\n }", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }", "static float calculateNewVelocity(float a, float deltaTime, float v0) {\n return v0 + (a * deltaTime);\n }", "public void accelerate(float dvx, float dvy){\n\t\tvelocity.x += dvx;\n\t\tvelocity.y += dvy;\n\t}", "public int[] setMotorVelocities(final boolean[] motorMask, final double[] motorVelocities)\n {\n return finchController.setMotorVelocities(motorMask, motorVelocities);\n }", "godot.wire.Wire.Vector3OrBuilder getPositionOrBuilder();", "static public float[] translate(float[] coordinates, float dx, float dy){\n for (int i=coordinates.length-2;i>=0;i-=2){\n coordinates[i]+=dx;\n coordinates[i+1]+=dy;\n }\n return coordinates;\n }", "public int[] setMotorVelocities(final boolean[] motorMask, final int[] motorVelocities)\n {\n return finchController.setMotorVelocities(motorMask, motorVelocities);\n }", "public Vector3f getLinearVelocity() {\n return Converter.convert(rBody.getLinearVelocity(tempVec));\n }" ]
[ "0.5396677", "0.53886056", "0.5379024", "0.5362899", "0.53342825", "0.5333167", "0.5305563", "0.51679754", "0.5095229", "0.50661635", "0.4986049", "0.4978138", "0.49639744", "0.49618146", "0.49040413", "0.48945493", "0.48872477", "0.4859159", "0.48464966", "0.48378897", "0.48311022", "0.48240927", "0.4811824", "0.47883818", "0.47856465", "0.4760391", "0.47549844", "0.4745133", "0.47276974", "0.47188413", "0.46926698", "0.4691742", "0.4685406", "0.46813065", "0.46806133", "0.46618316", "0.46560773", "0.46363235", "0.46320894", "0.46282232", "0.46229833", "0.46139526", "0.46133548", "0.46131128", "0.45879132", "0.45865545", "0.45745042", "0.45706117", "0.4562218", "0.45550108", "0.45373115", "0.45352247", "0.4534176", "0.4529197", "0.45258373", "0.45191494", "0.45162973", "0.4516036", "0.45154533", "0.4510647", "0.44886735", "0.4487927", "0.4487163", "0.44687888", "0.44681635", "0.44655922", "0.44639933", "0.44516113", "0.4448278", "0.444727", "0.44445038", "0.4440231", "0.44400376", "0.44385648", "0.44288814", "0.44269586", "0.44268587", "0.44223273", "0.44210765", "0.44194195", "0.44177336", "0.4416532", "0.44039264", "0.44035625", "0.43986776", "0.439853", "0.43984342", "0.43935245", "0.43853897", "0.43835163", "0.4377647", "0.43741128", "0.43726802", "0.43636656", "0.43636277", "0.43605822", "0.43545368", "0.43532273", "0.43510154", "0.4348613" ]
0.7360373
0
Returns the average of the two given vectors.
private static Vector3f average(Vector3f a, Vector3f b) { return new Vector3f(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2, a.z + (b.z - a.z) / 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double[] vectorAddition(double[] a, double[] b) {\r\n\t\tdouble[] retval = new double[a.length];\r\n\t\tfor(int i = 0; i < a.length; i += 1) {\r\n\t\t\tretval[i] = a[i] + b[i];\r\n\t\t}\r\n\t\treturn retval;\r\n\t}", "public static void addVectors( double[] v1, double[] v2, double[] result ) {\n result[0] = v1[0]+v2[0];\n result[1] = v1[1]+v2[1];\n result[2] = v1[2]+v2[2];\n }", "private INDArray computeVectorAverage(List<float[]> embeddingsList)\r\n {\r\n INDArray sum = Nd4j.zeros(embeddingsList.get(0).length);\r\n\r\n for (float[] vec : embeddingsList) {\r\n INDArray nd = Nd4j.create(vec);\r\n sum = sum.add(nd);\r\n }\r\n sum = sum.div(embeddingsList.size());\r\n return sum;\r\n }", "public static double average(double number1, double number2) {\n\t\treturn (number1 + number2) / 2;\r\n\t\t\r\n\t}", "public static double average (double ... numbers)\r\n\t{", "private static double dot(final Map<String, Integer> leftVector, final Map<String, Integer> rightVector,\n final Set<String> intersection) {\n long dotProduct = 0;\n for (final String key : intersection) {\n dotProduct += leftVector.get(key) * rightVector.get(key);\n }\n return dotProduct;\n }", "public static double scalarProduct(Vector v1, Vector v2){\r\n\t\treturn v1.getX()*v2.getX() + v1.getY()*v2.getY();\r\n\t\t\r\n\t}", "public static double average (double ... s4){\n double suma = 0.0;\n for (double value : s4) {\n suma += value;\n }\n return suma / s4.length;\n }", "double average();", "double computeSimilarity(double[] vector1, double[] vector2) {\n\n // We need doubles for these so the math is done correctly. Else we only\n // return 1 or 0.\n double nDifferences = 0.;\n double lengthOfVector = (double) vector1.length;\n\n for (int i = 0; i < vector1.length; i++) {\n if (vector1[i] != vector2[i]) {\n nDifferences ++;\n }\n } \n return (1. - (nDifferences/lengthOfVector));\n }", "private float calculateAverage(List<Float> tempVoltages) {\r\n\t\t\r\n\t\tfloat runningTotal = 0;\r\n\t\tfor(float i : tempVoltages){\r\n\t\t\trunningTotal += i;\r\n\t\t}\r\n\t\trunningTotal /= tempVoltages.size();\r\n\t\treturn runningTotal;\r\n\t}", "public int average(int num1, int num2) {\n return (num1 + num2) / 2;\n }", "private float meanDifference(float arr1[], int i1, float arr2[], int i2,\n\t\t\tint length) {\n\t\tfloat value = 0f;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tvalue += arr1[i1 + i] - arr2[i2 + i];\n\t\t}\n\t\treturn value / length;\n\t}", "public double angleBetweenVectors(Vector3D v) {\r\n\t\t//calculate the lengths of two vectors\t\r\n\t\tdouble a = this.lenght();\r\n\t\tdouble b = v.lenght();\r\n\t\t\r\n\t\tif(a == 0 || b == 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn Math.acos(this.DotProduct3(v));\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint a[]= {2,3,4,5,6,7,8};\n\t\tdouble b[]= {2.0,3.0,4.5,8.9};\n\t\tSystem.out.println(Average1(a));\n\t\tSystem.out.println(Average(b));\n\n\t}", "public static double average2(double[] mainArray2) {\r\n\t\tdouble average2 = 0;\r\n\t\tfor (int counter = 0; counter < mainArray2.length; counter ++) {\r\n\t\t\taverage2 += mainArray2[counter];\r\n\t\t}\r\n\t\treturn (average2 / mainArray2.length);\r\n\t}", "static double dot(Vec a, Vec b) {\n return (a.x * b.x + a.y * b.y);\n }", "double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}", "public void Sumatoria()\n {\n for (int i = 0; i < vector1.length; i++) {\n sumatoria[i]=vector1[i]+vector2[i];\n }\n }", "public static Double mean(ArrayList<Double> values) {\n\t\tDouble total = 0.0;\n\t\t// iterate through the values and add to the total\n\t\tfor (int i = 0; i < values.size(); i++) {\n\t\t\ttotal += values.get(i);\n\t\t}\n\t\t// return the total devided by the number of values\n\t\treturn total / values.size();\n\t}", "public static float angleBetweenVectors(Vector3 v1, Vector3 v2)\n\t{\n\t\tfloat v1_len = v1.len();\n\t\tif (v1_len == 0) return 0;\n\t\tfloat v2_len = v2.len();\n\t\tif (v2_len == 0) return 0;\n\n\t\tv3tmp1.set(v1);\n\t\tv3tmp2.set(v2);\n\t\tv3tmp1.scl(1f / v1_len);\n\t\tv3tmp2.scl(1f / v2_len);\n\n\t\tfloat dp_v1n_v2n = v3tmp1.dot(v3tmp2);\n\n\t\tfloat radians = (float)Math.acos(dp_v1n_v2n);\n\t\tif (Float.isNaN(radians)) {\n\t\t\tv3tmp1.add(v3tmp2);\n\t\t\tif (v3tmp1.len2() > 1) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 180;\n\t\t\t}\n\t\t}\n\t\treturn MathUtils.radiansToDegrees * radians;\n\t}", "public float CalculateSimilarityByVector(float[] v1, float[] v2) {\n\t\t\n\t\tfloat similarity = 0f;\n\t\t\n\t\tfloat numerator = 0f;\n\t\tfor(int i = 0; i < v1.length; i++) {\n\t\t\tnumerator += v1[i] * v2[i];\n\t\t}\n\t\t\n\t\tfloat v1Denom = 0f;\n\t\tfor(int i = 0; i < v1.length; i++) {\n\t\t\tv1Denom += Math.pow(v1[i], 2);\n\t\t}\n\t\tfloat v2Denom = 0f;\n\t\tfor(int i = 0; i < v2.length; i++) {\n\t\t\tv2Denom += Math.pow(v2[i], 2);\n\t\t}\n\t\t\n\t\tfloat denominator = (float) (Math.sqrt(v1Denom) * Math.sqrt(v2Denom));\n\t\t\n\t\tsimilarity = numerator / denominator;\n\t\t\n\t\treturn similarity;\n\t}", "public static double average(double number1, double number2, double number3) {\n\t\treturn (number1 + number2 + number3) / 2;\r\n\t\t\r\n\t}", "public static double[] addVectors( double[] v1, double[] v2 ) {\n double[] result = new double[3];\n addVectors(v1, v2, result);\n return result;\n }", "double average(double[] doubles) {\n double total = 0.0;\n //int count = 0;\n for (double d: doubles) {\n total = total + d;\n //count = count + 1;\n }\n //return total / count;\n return total / doubles.length;\n }", "public static int\n /**\n * \n * @param left\n * an integer\n * @param right\n * an integer\n * @return the average of left and right. The number will round towards zero\n * if the average is not a whole number\n * @pre both left and right numbers should not be greater than\n * Integer.Max_Value or smaller than Integer.Min_Value\n */\n average (int left, int right)\n {\n /**\n * In the original program, it was possible that the sum of left and right\n * exceeds Integer.Max_Value or Integer.Min_Value even when either left or\n * right is within the boundaries. Therefore, we solve this problem by\n * dividing the left and right numbers first, and then sum them up.\n */\n double avg = left / 2.0 + right / 2.0;\n return (int) avg;\n }", "public static double scalarProduct(ThreeVector v1,ThreeVector v2) {\r\n\t\treturn v1.x * v2.x + v1.y * v2.y + v1.z * v2.z;\r\n\t}", "public static BigFraction[] vectorAddition(BigFraction[] a, BigFraction[] b) {\n a = a.clone();\n b = b.clone();\n if (a.length != b.length) throw new RuntimeException(\"Illegal vector dimensions.\");\n for (int i = 0; i < a.length; i++) {\n a[i] = a[i].add(b[i]);\n }\n return a;\n }", "public static double dot(double[] v1, double[] v2) {\n double result = 0;\n for (int i = 0; i < v1.length; i++) {\n result += v1[i] * v2[i];\n }\n return result;\n }", "private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }", "private double average(LinkedList<Double> lastSums2) {\n\t\tOptionalDouble average = lastSums2.stream().mapToDouble(a -> a).average();\n\t\treturn average.getAsDouble();\n\t}", "public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }", "public double dotProduct(Coordinates vectorA, Coordinates vectorB);", "public static void main(String[] args) {\n\n float d = (float)sum(3.0f, (float)2.0);\n System.out.println(d);\n\n double d2=avg(3.0,2.0);\n System.out.println(d2);\n//\n// int[] list={1,2};\n// list={2,3};\n\n\n\n }", "public double betweenAngle(Coordinates vectorA, Coordinates vectorB);", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "public double distance(double[] vector1, double[] vector2) throws MetricException;", "public void updateToAverageOf(Vector<DataPoint> objects) { \t\n double[] average = new double[values.length];\n for (int i = 0; i < objects.size(); i++) {\n \t//POEY comment: position is a calculated value of a pixel\n Position position = objects.elementAt(i).position;\n for (int j = 0; j < average.length; j++) {\n average[j] += position.values[j];\n }\n }\n for (int i = 0; i < average.length; i++) {\n \t//POEY comment: objects.size() = the number of members in a cluster\n average[i] /= objects.size();\n }\n values = average;\n }", "public double dot(SparseVector vector) {\n SparseVector v1 = this;\n SparseVector v2 = vector;\n double result = 0.0;\n int i = 0;\n int j = 0;\n \n while (i < v1.size() && j < v2.size()) {\n Element e1 = v1.get(i);\n Element e2 = v2.get(j);\n \n if (e1.index == e2.index) {\n result += e1.value * e2.value;\n i++;\n j++;\n } else if (e1.index < e2.index) {\n i++;\n } else {\n j++;\n }\n }\n \n return result;\n }", "public static double average(ArrayList<Double> nums){\n double sum = 0.0;\n for(Double num : nums){\n sum += num;\n }\n return sum / nums.size();\n }", "public double getAngleBetween(Vector other){\n\t\treturn Math.acos(dot(other)/(magnitude() * other.magnitude()));\n\t}", "private static double[] averageBetween(double[] from, double[] to, int wFrom, int wTo) {\n \tif(from.length != to.length)\n \t\treturn null;\n \t\n \t// Average = arithmetic mean\n \tdouble[] average = new double[from.length];\n \tfor(int i = 0; i < from.length; i++)\n \t\taverage[i] = (from[i] * wFrom + to[i] * wTo) / (wFrom + wTo);\n \treturn average;\n }", "public double dot(Vector other){\n\t\treturn x*other.x + y*other.y + z*other.z;\n\t}", "public double computeScalarProduct(Vector v2){\n return this.getX() * v2.getX() + this.getY() * v2.getY();\n }", "public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}", "public double average(int first, int last){\n double final = 0;\n for(int i = first; i < last; i++){\n final += scores[i];\n }\n return final/(last-first+1);\n}", "private double vectDist(double[] a,double[] b) {\n\t\tdouble out = Double.NEGATIVE_INFINITY;\n\t\tfor (int i = 0; i <a.length;i++) {\n\t\t\tdouble diff = Math.abs(a[i]-b[i]);\n\t\t\tif (diff > out)\n\t\t\t\tout = diff;\n\t\t}\n\t\treturn out;\n\t}", "public static double getAverage(int[][] numbers) {\n int totalNumberOfElements = 10; // (2 rows * 5 column)\n return getTotal(numbers) / totalNumberOfElements;\n }", "private double dist(double [] v1, double [] v2){\n \t\tdouble sum=0;\n \t\tfor (int i=0; i<nDimensions; i++){\n \t\t\tdouble d = v1[i]-v2[i];\n \t\t\tsum += d*d;\n \t\t}\n \t\treturn Math.sqrt(sum);\n \t}", "private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}", "public static double meanOf(Iterable<? extends Number> values) {\n/* 393 */ return meanOf(values.iterator());\n/* */ }", "public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }", "public static double getAveg(int[] scores) {\r\n\t\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < scores.length; ++i) {\r\n\t\t\tsum += scores[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn ((double)(sum))/(scores.length);\r\n\t\r\n\t}", "public static float Dot(Vector a, Vector b){\n if(a.axis.length == b.axis.length) {\n float dot = 0f;\n for (int i = 0; i < a.axis.length; i++) {\n dot += a.axis[i] * b.axis[i];\n }\n return dot;\n }\n return 0f;\n }", "public static double v_a(double a, double m, double[] x, double[] y) {\r\n\t\tdouble v_a = 0;\r\n\t\tfor (int i = 0; i < x.length; i++) {\r\n\t\t\tv_a = v_a + a * Math.pow(x[i], 2 * m) - y[i] * Math.pow(x[i], m);\r\n\t\t}\r\n\t\treturn v_a;\r\n\t}", "static double cross(Vec a, Vec b) {\n return a.x * b.y - a.y * b.x;\n }", "public double getAverageAcceleration() {\n return (leftEnc.getAcceleration() + rightEnc.getAcceleration()) / 2;\n }", "public double dot(Vec vthat);", "public static void add(float[] u, float[] v) {\n for (int i = 0; i < u.length; i++) {\n u[i] += v[i];\n }\n }", "private double norm(IDictionary<String, Double> vector) {\n\t\t double output = 0.0;\n\t\t for (KVPair<String, Double> pair : vector) {\n\t\t\t double score = pair.getValue();\n\t\t output = output + (score * score);\n\t\t }\n\t return Math.sqrt(output);\t \n }", "public static float dotProduct(float[] a, float[] b) {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"vector dimensions differ: \" + a.length + \"!=\" + b.length);\n }\n float r = IMPL.dotProduct(a, b);\n assert Float.isFinite(r);\n return r;\n }", "static double average(double[] data){\n\n // Initializing total placeholder \n double total = 0;\n\n // Traversing data array and adding to total sum\n for (double d : data) {\n total += d;\n }\n\n // Computing average\n double average = (double) total / data.length;\n\n return average;\n }", "@Override\n public Double average() {\n return (sum() / (double) count());\n }", "private double getAbsoluteAverage(double [] inputs){\n double result = 0;\n for (int i = 0; i < inputs.length; i++) {\n result+= Math.abs(inputs[i]);\n }\n result = result/inputs.length;\n return result;\n }", "public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }", "@Override\n\tpublic double getSimilarity(double[] a, double[] b) {\n\t\tVecUtils.checkDims(a,b);\n\t\tfinal int n = a.length;\n\t\tfinal double[] minV = VecUtils.pmin(a, b);\n\t\t\n\t\t// Get front\n\t\t// Originally: \n\t\t//\n\t\t// final double[] front = VecUtils.multiply(VecUtils.multiply(a, b), VecUtils.scalarAdd(minV, 1d));\n\t\t// final double[] mid1 = VecUtils.scalarDivide(VecUtils.add(a, b), 2);\n\t\t// final double[] mid2 = VecUtils.pow(minV, 2);\n\t\t// final double[] mid = VecUtils.multiplyForceSerial(mid1, mid2);\n\t\t// final double[] back = VecUtils.scalarDivide(VecUtils.pow(minV, 3), 3);\n\t\t// final double[] res = VecUtils.addForceSerial(VecUtils.subtractForceSerial(VecUtils.scalarAdd(front, 1), mid), back);\n\t\t// return VecUtils.prod(res);\n\t\t//\n\t\t// but this takes 12n (13n total!!)... can do it uglier, but much more elegantly in 1n (2n total):\n\t\tdouble[] front = new double[n], mid = new double[n], back = new double[n];\n\t\tdouble prod = 1;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfront[i] = a[i]*b[i] * (minV[i]+1);\n\t\t\tmid[i] = ((a[i]+b[i]) / 2) * (minV[i] * minV[i]);\n\t\t\tback[i] = FastMath.pow(minV[i], 3) / 3d;\n\t\t\tprod *= ( ((front[i]+1)-mid[i])+back[i] );\n\t\t}\n\t\t\n\t\treturn prod;\n\t}", "@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "public static float mean(float[] v) {\n\t\tfloat sum = 0;\n\t\tint count = 0;\n\t\tfor (float value : v) {\n\t\t\tif (Util.isUsed(value)) {\n\t\t\t\tsum += value;\n\t\t\t\tcount ++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn sum / (float)count;\n\t}", "public static double meanOf(double... values) {\n/* 433 */ Preconditions.checkArgument((values.length > 0));\n/* 434 */ double mean = values[0];\n/* 435 */ for (int index = 1; index < values.length; index++) {\n/* 436 */ double value = values[index];\n/* 437 */ if (Doubles.isFinite(value) && Doubles.isFinite(mean)) {\n/* */ \n/* 439 */ mean += (value - mean) / (index + 1);\n/* */ } else {\n/* 441 */ mean = StatsAccumulator.calculateNewMeanNonFinite(mean, value);\n/* */ } \n/* */ } \n/* 444 */ return mean;\n/* */ }", "double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}", "private Point2D.Double calcVec(Point2D.Double a, Point2D.Double b)\n\t{\n\t\treturn new Point2D.Double((b.getX() - a.getX()), (b.getY() - a.getY()));\n\t}", "public static Double computeMean(Double[] values) {\n\t\treturn computeMean(values, 0, values.length);\n\t}", "public static advsum advsum(A p1, A p2 ) {\n\t}", "public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}", "public double mean(double data[]) {\r\n\t\tdouble mean = 0;\r\n\t\ttry {\r\n\t\t\tfor(int i=0;i<data.length;i++) {\r\n\t\t\t\tmean =mean+data[i];\r\n\t\t\t}\r\n\t\t\tmean = mean / data.length;\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tDataMaster.logger.warning(e.toString());\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\treturn mean;\r\n\t}", "public static float dot(float[] a, float[] b) {\n float retval = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n return retval;\n }", "public Vector add(Vector other){\n\t\treturn new Vector(x+other.x, y+other.y, z+other.z);\n\t}", "public double getAverage()\n {\n if (test1 < 0 || test2 < 0)\n {\n System.out.println(\"Warning: one or more grades have not been entered.\");\n return -1;\n }\n return (test1 + test2) / 2;\n }", "public double getAverage(){\n return getTotal()/array.length;\n }", "public static double getResemblance(Vector<Long> v1, Vector<Long> v2) {\n int minSize = Math.min(v1.size(), v2.size());\n int count = 0;\n for (int i=0; i < minSize; i++) {\n if (v1.get(i) != -1 && (v1.get(i).equals(v2.get(i)))) {\n count++;\n } //else {\n //System.out.println(\"in position \"+i+\": \"+v1.get(i)+\" is different from \"+v2.get(i));\n //}\n }\n return count/(double) minSize;\n }", "public double arithmeticalMean(double[] arr) {\n return 0;\n }", "private double getWinkel(Vector a, Vector b) {\n\t\tdouble zaehler = a.multiply(b);\n\t\tdouble nenner = a.getNorm() * b.getNorm();\n\t\t// nenner += 0.0001;\n\t\tdouble returnvalue = zaehler / nenner;\n\t\treturnvalue = Math.acos(returnvalue);\n\t\treturnvalue = Math.toDegrees(returnvalue);\n\n\t\treturn returnvalue;\n\t}", "public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }", "public double euclidean(VectorA v)\n {\n return (Math.sqrt(this.mag() + v.mag()));\n }", "public float uGetAvgRating(ArrayList<Integer> movies) {\n\t\tfloat sum = 0;\n\t\tint n = 0;\n\t\t\n\t\tfor (int m : movies) {\n\t\t\t// lookup in ratings\n\t\t\tsum += ((float)ratings.get(m) / 10f);\n\t\t\tn++;\n\t\t}\n\t\t\n\t\treturn sum / n;\n\t}", "public double distance(V a, V b);", "@Override\n\tpublic float dot(Vector vector) {\n\t\tif(vector instanceof Vec2){\n\t\t\tVec2 vect = (Vec2)vector;\n\t\t\treturn x*vect.x+y*vect.y;//z and w are 0\n\t\t}else if(vector instanceof Vec3){\n\t\t\tVec3 vect = (Vec3)vector;\n\t\t\treturn x*vect.x+y*vect.y+z*vect.z;//w is 0\n\t\t}else{\n\t\t\tVec4 vect = (Vec4)vector;\n\t\t\treturn x*vect.x+y*vect.y+z*vect.z;//w doesn't exist\n\t\t}\n\t}", "public static void subVectors( double[] v1, double[] v2, double[] result ) {\n result[0] = v1[0] - v2[0];\n result[1] = v1[1] - v2[1];\n result[2] = v1[2] - v2[2];\n }", "public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }", "public double norm2(double[] x1, double[] x2) {\n\t\tdouble result = 0;\n\t\tfor (int i = 0; i < x1.length; i++) {\n\t\t\tdouble factor = x1[i] - x2[i];\n\t\t\tresult += factor * factor;\n\t\t}\n\t\treturn result;\n\t}", "public double dot(VectorA v)\n {\n return (this.mag()*v.mag());\n }", "public static <T extends Vector> T Add(T a, T b,T result){\n if(Match(a,b)) {\n for (int i = 0; i < result.axis.length; i++) {\n result.axis[i] = a.axis[i] + b.axis[i];\n }\n return result;\n }\n return result;\n }", "public double getAverage()\n {\n return getSum() / 2.0;\n }", "private float positiveMeanDifference(float arr1[], int i1, float arr2[],\n\t\t\tint i2, int length) {\n\t\tfloat value = 0f;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (arr1[i1 + i] > arr2[i2 + i])\n\t\t\t\tvalue += arr1[i1 + i] - arr2[i2 + i];\n\t\t}\n\t\treturn value / length;\n\t}", "private static int getAverage(ArrayList<Integer> inList) \n\t{\n\t\tint add = 0; \n\t\tint mean = 0; \n\t\tfor(int pos = 0; pos < inList.size(); ++pos)\n\t\t{\n\t\t\tadd = add + inList.get(pos);\n\t\t\t\n\t\t}\n\t\t\n\t\tmean = add/inList.size(); \n\t\t\n\t\treturn mean; \n\t\t\n\t}", "public static double angle(ThreeVector v1,ThreeVector v2) {\r\n\t\tdouble a = (scalarProduct(v1,v2))/(v1.magnitude()*v2.magnitude());\r\n\t\tdouble b = Math.acos(a);\r\n\t\treturn Math.toDegrees(b);\r\n\t}", "public double average(ArrayList<Double> x) {\n double sum = 0;\n double round;\n for (int i = 0; i < x.size(); i++) {\n sum += x.get(i);\n }\n round = sum / x.size() * 100;\n round = Math.round(round);\n round /= 100;\n return round;\n }", "public double[] vectorMult(double[] v1, double[] v2) {\n\n double[] res = new double[v1.length];\n\n for(int i = 0; i < v1.length; i++) {\n res[i] = v1[i]*v2[i];\n }\n return res;\n }", "public static double mean(final double... values) {\n\t\t// Check the arguments\n\t\tDoubleArguments.requireNonEmpty(values);\n\n\t\t// Return the mean\n\t\treturn Maths.sumWithoutNaN(values) / values.length;\n\t}" ]
[ "0.6563903", "0.63598835", "0.6337773", "0.6324279", "0.62258255", "0.61769533", "0.6149417", "0.6076032", "0.60437065", "0.6028297", "0.59262747", "0.58992714", "0.58854127", "0.5843805", "0.58308053", "0.5803596", "0.5789227", "0.5785062", "0.57825875", "0.57677734", "0.5763552", "0.57560056", "0.5739324", "0.5733741", "0.57098967", "0.56658953", "0.5652624", "0.56470454", "0.56127393", "0.5608352", "0.5602779", "0.55880654", "0.5587269", "0.558008", "0.5577768", "0.5576506", "0.5562427", "0.55528235", "0.5542991", "0.552816", "0.5524776", "0.55200434", "0.5514183", "0.5487872", "0.5484056", "0.54363406", "0.5430125", "0.5427629", "0.541988", "0.5382726", "0.5354653", "0.534895", "0.53378147", "0.53322905", "0.5321735", "0.5319128", "0.531488", "0.5303961", "0.5303757", "0.5303435", "0.529961", "0.52852255", "0.52795315", "0.5279528", "0.52627236", "0.5258693", "0.52534294", "0.52472645", "0.52446204", "0.52281266", "0.5218537", "0.5216821", "0.520643", "0.52011365", "0.51952404", "0.51854444", "0.51832587", "0.5178211", "0.51749134", "0.5160789", "0.5158285", "0.5155936", "0.51532537", "0.51507044", "0.51450014", "0.5139431", "0.5137515", "0.5137328", "0.5134881", "0.51348126", "0.5134605", "0.5134577", "0.5130525", "0.5122487", "0.5111255", "0.5109264", "0.5107528", "0.51069874", "0.51008683", "0.5096771" ]
0.7105897
0
GET para o id do registro
public long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/{idDinheiro}\")\n public Dinheiro findById(@PathVariable Long idDinheiro){\n return dinheiroRepository.findById(idDinheiro).get();\n }", "@GetMapping(value = \"/consultarByID\")\n public ResponseEntity consultar(@RequestParam Long id) {\n return empleadoService.consultar(id);\n }", "@RequestMapping(value = \"/{idusuario}\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic Usuario getUsuario(@PathVariable Long idusuario){\n\t\tSystem.out.println(idusuario);\n\t\treturn usuariorepository.findOne(idusuario);\n\t}", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "public java.lang.Integer getId_rango();", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "String get(String id);", "public o selectById(long id);", "public static RutaDTO consultarRutaById(int identificador){\n RutaDTO ruta = null;\n HttpClient httpClient = new DefaultHttpClient();\n HttpGet del = new HttpGet(HOST_BACKEND+\"mycityviewBE/rest/ruta/\"+identificador);\n del.setHeader(\"content-type\", CONTENT_TYPE);\n del.setHeader(\"Authorization\", getAuthorization().trim());\n try {\n HttpResponse resp = httpClient.execute(del);\n if(resp.getStatusLine().getStatusCode() == HttpStatus.SC_OK){\n String respStr = EntityUtils.toString(resp.getEntity());\n Gson gson = new GsonBuilder().create();\n ruta = gson.fromJson(respStr, RutaDTO.class);\n }\n } catch (Exception ex) {\n Log.e(\"ServicioRest\", \"Error!\", ex);\n }\n return ruta;\n }", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "@Path(\"{id: \\\\d+}\")\r\n @GET\r\n public DocumentoDTO obtenerDocumento(@PathParam(\"id\") long Id){\r\n DocumentoEntity entity= logic.obtenerDocumentoPorId(Id);\r\n if(entity == null){\r\n throw new RuntimeException(\"El producto solicitado no existe\");\r\n }\r\n return new DocumentoDTO(entity);\r\n }", "Integer getId();", "Integer getId();", "Integer getId();", "Long getId();", "Long getId();", "Long getId();", "Empleado findById(Integer id);", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "public String getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public String getID();", "public String getID();", "public String getID();", "public String getID();", "public String getID();", "public String getID();" ]
[ "0.71133035", "0.70655113", "0.6857049", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6825531", "0.6822664", "0.68118757", "0.6798455", "0.6760143", "0.6724868", "0.6682063", "0.6682063", "0.6682063", "0.6682063", "0.6682063", "0.6682063", "0.6682063", "0.66774434", "0.6673068", "0.6673068", "0.6673068", "0.665276", "0.665276", "0.665276", "0.6647811", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.662957", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.66208816", "0.6619408", "0.6619408", "0.6619408", "0.6619408", "0.6619408", "0.6619408" ]
0.0
-1
SET para o id do registro
public void setId(long id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "private void setId(Integer id) { this.id = id; }", "public void setId(int id){ this.id = id; }", "void setId(Integer id);", "public void setIdUsuario(int value) {\n this.idUsuario = value;\n }", "public void setId( Long id );", "private void setId(int value) {\n \n id_ = value;\n }", "void setId(int val);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public void setId(long id) {\n id_ = id;\n }", "@Override\n public void definirId(Endereco objeto, int id) {\n objeto.setId(id);\n }", "public void setID(String idIn) {this.id = idIn;}", "void setId(Long id);", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "public abstract void setId(int id);", "void setId(final Integer id);", "public void setIdLocacion(Integer idLocacion);", "public void setID(int id);", "public void setId(int i) { id = i; }", "void setId(ID id);", "public void setId( Integer id )\n {\n this.id = id ;\n }", "public void setID(long id);", "public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "void setId(int id);", "public void setId(int id);", "public void setId(int id);", "public void setId(int value) {\n this.id = value;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "public void setIdUsuario(Integer idUsuario) {\n this.idUsuario = idUsuario;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "@Override\n\tpublic void setId(Integer id) {\n this.id = id;\n }", "public void setId(Long id) \n {\n this.id = id;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }" ]
[ "0.78642726", "0.7445324", "0.7353827", "0.7349646", "0.7295575", "0.7286934", "0.7286086", "0.7269608", "0.72536755", "0.72536755", "0.72536755", "0.72536755", "0.7237921", "0.7237921", "0.72243404", "0.721415", "0.7206755", "0.7173519", "0.7171076", "0.71703124", "0.71703124", "0.716709", "0.71549666", "0.71528137", "0.7152651", "0.7146936", "0.7133037", "0.71300584", "0.7103102", "0.70979315", "0.70958906", "0.70789254", "0.70725524", "0.70725524", "0.70725524", "0.70725524", "0.70725524", "0.70725524", "0.70725524", "0.70725524", "0.70725524", "0.7063981", "0.7062178", "0.7062178", "0.70588374", "0.70583606", "0.7054071", "0.7054071", "0.7041394", "0.70252895", "0.70185083", "0.70185083", "0.70185083", "0.70185083", "0.70185083", "0.70185083", "0.70185083", "0.7014982", "0.7014982", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.70141464", "0.7009088", "0.7000387", "0.69937223", "0.69937223", "0.69937223", "0.69937223", "0.69937223", "0.69937223", "0.69937223" ]
0.7215275
16
GET para o valor da latitude
public float getLatitude() { return latitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Double getLatitude();", "Double getLatitude();", "double getLatitude();", "long getLatitude();", "int getLatitude();", "public int getLat();", "public String getLat() {\n return lat;\n }", "public String getlat() {\n\t\treturn lat;\n\t}", "public String getLatitude()\r\n {\r\n return latitude;\r\n }", "public double getLat() {\n return lat;\n }", "public double getLat() {\n return lat;\n }", "public double getLat() {\n return lat;\n }", "public int getLatitude() {\n return latitude;\n }", "@Override\n public String getLat() {\n return lat;\n }", "public double getLatitude() { return coordinates.latitude; }", "public String getLatitude() {\n return latitude;\n }", "public double getLatitude()\n {\n \treturn latitude;\n }", "public double getLatitude(){\n return latitude;\n }", "public float getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude_;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public Float getLatitude() {\n return latitude;\n }", "public double getLat() {\r\n\t\treturn lat;\r\n\t}", "public float getLatitude() {\n return latitude;\n }", "public Double getLatitude() {\n return latitude;\n }", "public Double getLatitude() {\n return latitude;\n }", "public Double getLatitude() {\n return latitude;\n }", "int getLongitude();", "public double getLat() {\r\n\t\t\treturn lat;\r\n\t\t}", "double getLongitude();", "long getLongitude();", "public int getLatitude() {\n return latitude_;\n }", "public double getLatitude_() { \n return latitude_; \n }", "@Min(-90)\n @Max(90)\n public double getLat() {\n return lat;\n }", "public String getLatitude() {\n return String.valueOf(latitude);\n }", "public float getLatitudeValue (){\n return trackLat.getValue ();\n }", "public double latitude() {\n return this.latitude;\n }", "public double getLatitude(){\n if(location != null){\n latitude = location.getLatitude();\n }\n\n // return latitude\n return latitude;\n }", "public double getLatitude(){\n if(location != null){\n latitude = location.getLatitude();\n }\n\n // return latitude\n return latitude;\n }", "public String getLatitude() {\n\t\treturn latitude;\n\t}", "@Override\r\n\tpublic double getLat() {\n\t\treturn this.lat;\r\n\t}", "Double getLongitude();", "Double getLongitude();", "public BigDecimal getLatitude() {\n return latitude;\n }", "public String getLatitud() {\r\n return latitud;\r\n }", "@AutoEscape\n\tpublic String getLatitud();", "public void setLat(double value) {\n lat = value;\n }", "public long getLatitude() {\n return latitude_;\n }", "public double getLatitude() {\n return latitude_;\n }", "public double getLatitude() {\n return latitude_;\n }", "public Latitude getLat()\n {\n\treturn this.lat;\n }", "@JsonProperty(\"latitude\")\n public Double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n\t\treturn latitude;\n\t}", "public int getLatitude() {\n return latitude_;\n }", "public Latitude getLatitude (){\n return trackLat;\n }", "public void setLat(double value) {\n this.lat = value;\n }", "public int getLatitude() {\n checkRep();\n return this.latitude;\n }", "public double getLatitude(){\n if(location != null){\n latitude = location.getLatitude();\n }\n return latitude;\n }", "public float getLatitude() {\n\t\treturn latitude;\n\t}", "@ApiModelProperty(value = \"Latitude of IP address\")\n public Double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n if (slat == GempakConstants.IMISSD) {\n return slat;\n }\n return slat / 100.;\n }", "public void setLatitude(float latitude) { this.latitude = latitude; }", "@Override\n\tpublic double getLatitude() {\n\t\treturn _locMstLocation.getLatitude();\n\t}", "public synchronized Double getLatitude() {\r\n\t\treturn latitude;\r\n\t}", "double lat(long v) {\n return world.get(v).lat;\n }", "com.google.type.LatLng getLatLng();", "public double getLatitude() {\n return latitude_;\n }", "public long getLatitude() {\n return latitude_;\n }", "public static String getBiblioLat() {\n\t\treturn \"lat\";\n\t}", "public int getLon();", "@Override\n public String updateLat() {\n return mylat;\n }", "public void setLatitude (String strLatitude){\n this.latitude = strLatitude;\n }", "double lat(long v) {\n return nodes.get(v).lat;\n }", "public double getLatitude() {\n\t\treturn Latitude;\n\t}", "void setLatitude(Double latitude);", "public float getLongitude() { return longitude; }", "public double getResultLocationLatitude() {\n return resultLocationLatitude;\n }", "public double getLatitude() {\n return location.getLatitude();\n }", "public double getLatitude() {\r\n if (location != null) {\r\n latitude = location.getLatitude();\r\n }\r\n\r\n // return latitude\r\n return latitude;\r\n }", "public double getLongitude_() { \n return longitude_; \n }", "private String latitudeConversion() {\n int lat = record[1];\n if (lat >= 0) {\n lat = lat & 255;\n }\n lat = (lat << 8) + (record[0] & 255);\n float flat = Float.parseFloat((\"\" + lat + \".\" + (((record[3] & 255) << 8) + (record[2] & 255))));\n int degs = (int) flat / 100;\n float min = flat - degs * 100;\n String retVal = \"\" + (degs + min / 60);\n\n if (retVal.compareTo(\"200.0\") == 0) {\n return \"\";\n } else {\n return retVal;\n }\n }", "public double getLng() {\n return lng;\n }", "BigDecimal getWgs84Latitude();", "public void setLatitude(String latitude)\r\n {\r\n this.latitude = latitude;\r\n }", "public double getStartLat() {\n\t\treturn startLat;\n\t}", "public CompraResponse latitude(String latitude) {\n this.latitude = latitude;\n return this;\n }", "@ApiModelProperty(value = \"Last known latitude (Only for teachers/staff)\")\n public Double getLat() {\n return lat;\n }", "public void setLatitude(double latitude){\n this.latitude = latitude;\n }", "public void setLatitude(float value) {\n this.latitude = value;\n }", "public String getReqCurLocLat() {\n return reqCurLocLat;\n }", "public double getLatitude() {\n if (location != null) {\n latitude = location.getLatitude();\n }\n\n // return latitude\n return latitude;\n }", "public String getLatitude(String s) {\n return ((latitude != FLOATNULL) ? new Float(latitude).toString() : \"\");\n }", "public void setLat(double lat) {\n this.lat = lat;\n }", "public void setLatitud(String latitud);", "public double getGpsLng() {\n return gpsLng;\n }", "float latitude() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n return FastMath.HALF_PI;\n case SOUTH_4M:\n case SOUTH_16M:\n return -FastMath.HALF_PI;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * Stonehenge\n */\n return 51.1788f * FastMath.DEG_TO_RAD;\n }\n throw new IllegalStateException();\n }" ]
[ "0.77278864", "0.77278864", "0.76727104", "0.7620419", "0.7554111", "0.74866444", "0.7239007", "0.7168416", "0.71623755", "0.7092777", "0.7092777", "0.7092777", "0.7073185", "0.7067003", "0.69964105", "0.6961546", "0.6943819", "0.6939922", "0.69390315", "0.6900944", "0.6872981", "0.6872981", "0.6872981", "0.6872981", "0.6872981", "0.68717784", "0.68708754", "0.68580353", "0.6846771", "0.6846771", "0.6846771", "0.6835465", "0.676716", "0.67625576", "0.6748421", "0.67354256", "0.67284346", "0.672833", "0.6711189", "0.6704099", "0.66775477", "0.6674852", "0.6674852", "0.66708994", "0.66679317", "0.66504025", "0.66504025", "0.6621495", "0.6613369", "0.66005856", "0.65981746", "0.6595825", "0.6581894", "0.6581894", "0.6577599", "0.65634745", "0.65511817", "0.6542222", "0.65227157", "0.6518324", "0.6515973", "0.6513113", "0.65053385", "0.65053153", "0.6504424", "0.6494042", "0.64796907", "0.6458308", "0.6453534", "0.64285797", "0.6420431", "0.6417", "0.6416161", "0.6411293", "0.6395108", "0.6385106", "0.6349638", "0.6340524", "0.63336754", "0.6332337", "0.63296556", "0.62990594", "0.6293037", "0.6287025", "0.62825745", "0.62477094", "0.6233086", "0.6227912", "0.62032306", "0.62022275", "0.6189099", "0.6186462", "0.6183398", "0.6168485", "0.61488533", "0.6147027", "0.61436903", "0.6095309", "0.6085677", "0.6082443" ]
0.71641207
8
SET para o valor da latitude
public void setLatitude(float latitude) { this.latitude = latitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLatitude(Double latitude);", "public void setLat(double value) {\n lat = value;\n }", "public void setLat(double value) {\n this.lat = value;\n }", "public void setLatitude(float value) {\n this.latitude = value;\n }", "public void setLatitude (String strLatitude){\n this.latitude = strLatitude;\n }", "public void setLatitude(double latitude){\n this.latitude = latitude;\n }", "void setLongitude(Double longitude);", "public Builder setLatitude(long value) {\n bitField0_ |= 0x00000010;\n latitude_ = value;\n onChanged();\n return this;\n }", "private void updateGeo(Double latitude, Double longitude) {\n latitudeValue = latitude;\n longitudeValue = longitude;\n }", "public Builder setLatitude(double value) {\n \n latitude_ = value;\n onChanged();\n return this;\n }", "public void setLat(double lat) {\n this.lat = lat;\n }", "public void setLatitude(float latitude) {\n this.latitude = latitude;\n }", "public boolean setGPS(String longitude, String latitude);", "Double getLatitude();", "Double getLatitude();", "public void setLatitude(String latitude)\r\n {\r\n this.latitude = latitude;\r\n }", "public void setLatitude(Float latitude) {\n this.latitude = latitude;\n }", "public void setLatitude(double latitude) {\n this.latitude = latitude;\n }", "public Builder setLatitude(int value) {\n bitField0_ |= 0x00000002;\n latitude_ = value;\n onChanged();\n return this;\n }", "public void setLat(double lat) {\r\n\t\tthis.lat = lat;\r\n\t}", "public Builder setLatitude(double value) {\n \n latitude_ = value;\n onChanged();\n return this;\n }", "public void setLatitude(Double latitude) {\n this.latitude = latitude;\n }", "public void setLatitude(Double latitude) {\n this.latitude = latitude;\n }", "public void set_latitude(double _latitude) {\r\n\t\tthis._latitude = _latitude;\r\n\t}", "public void setLatitud(String latitud);", "public void setLat(String id, String lat);", "public void setLng(double value) {\n this.lng = value;\n }", "@Test\n public void testSetLatitude() {\n \n assertEquals(0.0f, o2.getLatitude(), 0.0);\n o2.setLatitude(0.2f);\n assertEquals(0.2f, o2.getLatitude(), 0.0);\n }", "public void setLat(double lat) {\r\n\t\t\tthis.lat = lat;\r\n\t\t}", "public void setLatitude(int latitude) {\n this.latitude = latitude;\n }", "@Override\n\tpublic void setLatitude(double Latitude) {\n\t\t_locMstLocation.setLatitude(Latitude);\n\t}", "public synchronized void setLatitude(Double latitude) {\r\n\t\t// if it is the same don't update\r\n\t\tif (latitude.equals(this.latitude)) {\r\n\t\t\tupdatedLat = false;\r\n\t\t} else {\r\n\t\t\tthis.latitude = latitude;\r\n\t\t\tupdatedLat = true;\r\n\t\t\tSystem.out.println(\"Update latitude: \" + latitude);\r\n\t\t}\r\n\t}", "double getLatitude();", "long getLatitude();", "public float getLatitude() { return latitude; }", "public void setLongitude(float longitude) { this.longitude = longitude; }", "public int setLatitude(Float latitude) {\n try {\n setLatitude(latitude.floatValue());\n } catch (Exception e) {\n setLatitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return latitudeError;\n }", "public void setLon(double value) {\n lon = value;\n }", "public int setLatitude(String latitude) {\n try {\n setLatitude(new Float(latitude).floatValue());\n } catch (Exception e) {\n setLatitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return latitudeError;\n }", "int getLatitude();", "public void setLatitude(double latitude) {\n\t\tLatitude = latitude;\n\t}", "private void setMyLatLong() {\n }", "public int setLatitude(float latitude) {\n try {\n if ( ((latitude == FLOATNULL) ||\n (latitude == FLOATNULL2)) ||\n !((latitude < LATITUDE_MN) ||\n (latitude > LATITUDE_MX)) ) {\n this.latitude = latitude;\n latitudeError = ERROR_NORMAL;\n } else {\n throw latitudeOutOfBoundsException;\n } // if INTNULL ...\n } catch (Exception e) {\n setLatitudeError(FLOATNULL, e, ERROR_LOCAL);\n } // try\n return latitudeError;\n }", "public int setLatitude(Integer latitude) {\n try {\n setLatitude(latitude.floatValue());\n } catch (Exception e) {\n setLatitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return latitudeError;\n }", "public void setLatitude(double latitude) {\n\t\tthis.latitude = latitude;\n\t}", "public int getLat();", "@Override\n public String updateLat() {\n return mylat;\n }", "public void setLatitude(double latitude) {\n if (latitude < -90 || latitude > 90) {\n throw new IllegalArgumentException(\"Latitude value must be in the next range: [-90.0; 90.0].\");\n }\n this.latitude = latitude;\n }", "private void setTypeLatitude(String latitude, String longitude) {\n type = WeatherConsts.TYPE_LATITUDE;\n param1 = latitude;\n param2 = longitude;\n }", "@Override\n public void setLocation(String latitude, String longitude) {\n lat = latitude;\n lon = longitude;\n }", "public Float getLatitude() {\n return latitude;\n }", "public Builder setPlayerLat(double value) {\n \n playerLat_ = value;\n onChanged();\n return this;\n }", "public float getLatitude() {\n return latitude;\n }", "public double getLatitude(){\n return latitude;\n }", "public double getLatitude_() { \n return latitude_; \n }", "public int getLatitude() {\n return latitude;\n }", "public double getLat() {\n return lat;\n }", "public double getLat() {\n return lat;\n }", "public double getLat() {\n return lat;\n }", "public double getLatitude() {\n return latitude_;\n }", "public double getLatitude() { return coordinates.latitude; }", "public BigDecimal getLatitude() {\n return latitude;\n }", "public float getLatitude() {\n return latitude;\n }", "public double getLatitude()\n {\n \treturn latitude;\n }", "public String getLatitude()\r\n {\r\n return latitude;\r\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public double getLatitude() {\n return latitude;\n }", "public String getLat() {\n return lat;\n }", "public Double getLatitude() {\n return latitude;\n }", "public Double getLatitude() {\n return latitude;\n }", "public Double getLatitude() {\n return latitude;\n }", "public void setLat(String lat) {\n this.lat = lat == null ? null : lat.trim();\n }", "public void setLat(double latitude) {\n filename = evaluate(latitude, getLon(), getLevel());\n }", "public float getLatitudeValue (){\n return trackLat.getValue ();\n }", "public double getLat() {\r\n\t\treturn lat;\r\n\t}", "public void setLocation(Coordinate coordinate);", "float latitude() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n return FastMath.HALF_PI;\n case SOUTH_4M:\n case SOUTH_16M:\n return -FastMath.HALF_PI;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * Stonehenge\n */\n return 51.1788f * FastMath.DEG_TO_RAD;\n }\n throw new IllegalStateException();\n }", "@Override\n public String getLat() {\n return lat;\n }", "public void setLongitude(float value) {\n this.longitude = value;\n }", "public void updateLatitude(double latitude) {\n\t\tif (this.minLatitude > latitude) {\n\t\t\tthis.minLatitude = latitude - Plane.SmallestGrain;\n\t\t}\n\t\t\n\t\tif (this.maxLatitude < latitude) {\n\t\t\tthis.maxLatitude = latitude + Plane.SmallestGrain;\n\t\t}\n\t}", "public long getLatitude() {\n return latitude_;\n }", "public String getlat() {\n\t\treturn lat;\n\t}", "public double getLat() {\r\n\t\t\treturn lat;\r\n\t\t}", "private void setLatitudeError (float latitude, Exception e, int error) {\n this.latitude = latitude;\n latitudeErrorMessage = e.toString();\n latitudeError = error;\n }", "public void setLongitude(String longitude)\r\n {\r\n this.longitude = longitude; \r\n }", "public int getLatitude() {\n return latitude_;\n }", "public String getLatitude() {\n return latitude;\n }", "public void setLocation(double lon, double lat) {\n\t\tthis.lon = lon;\n\t\tthis.lat = lat;\n\t}", "public static void setCurrentLocation(Double lat, Double lng ){\n //SharedPreferences sharedPreferences1=appCompatActivity. getSharedPreferences(\"longitude\", MODE_PRIVATE) ;\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(USER_LTD, String.valueOf(lat));\n editor.putString(USER_LNG, String.valueOf(lng));\n editor.apply();\n }", "public void setIsLat(Boolean boo) {\n\t this.isLat = boo;\n }", "public double getLatitude() {\n return latitude_;\n }", "public double getLatitude() {\n return latitude_;\n }", "int getLongitude();", "public Builder setGymLatDegrees(double value) {\n \n gymLatDegrees_ = value;\n onChanged();\n return this;\n }", "long getLongitude();", "public Latitude getLatitude (){\n return trackLat;\n }", "@JsonProperty(\"latitude\")\n public void setLatitude(Double latitude) {\n this.latitude = latitude;\n }" ]
[ "0.8295492", "0.7920534", "0.77679044", "0.75489366", "0.74394214", "0.741631", "0.7367186", "0.72756034", "0.723265", "0.7230242", "0.72163224", "0.71937287", "0.7175438", "0.70973206", "0.70973206", "0.709497", "0.709284", "0.70900553", "0.7085357", "0.7071765", "0.70706344", "0.7049964", "0.7049964", "0.7038992", "0.7038499", "0.7027519", "0.7021404", "0.70204127", "0.69836587", "0.69815314", "0.6961286", "0.6959289", "0.6956419", "0.6930426", "0.68785214", "0.68728834", "0.68722045", "0.68669164", "0.6850753", "0.6841481", "0.68379426", "0.68208706", "0.68195903", "0.6806717", "0.67882997", "0.6762692", "0.67594177", "0.6716266", "0.66901904", "0.66730404", "0.6668064", "0.66483533", "0.6636926", "0.66296715", "0.6614547", "0.66140825", "0.66121995", "0.66121995", "0.66121995", "0.66082627", "0.65976936", "0.6588197", "0.65815014", "0.6574295", "0.65657645", "0.6540011", "0.6540011", "0.6540011", "0.6540011", "0.6540011", "0.6523694", "0.65033174", "0.65033174", "0.65033174", "0.648642", "0.6486253", "0.64829063", "0.6479153", "0.64713806", "0.64690197", "0.6467896", "0.6464882", "0.6446378", "0.642335", "0.6416026", "0.64139456", "0.6406879", "0.640432", "0.64037544", "0.6402568", "0.63955", "0.63580906", "0.6356968", "0.63528687", "0.63528687", "0.6338823", "0.63207793", "0.6320308", "0.63167346", "0.63036734" ]
0.7656532
3
GET para o valor da longitude
public float getLongitude() { return longitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getLongitude();", "double getLongitude();", "int getLongitude();", "Double getLongitude();", "Double getLongitude();", "public int getLon();", "public String getLongitude()\r\n {\r\n return longitude;\r\n }", "public int getLongitude() {\n return longitude;\n }", "public String getLongitude() {\n return longitude;\n }", "public String getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude_;\n }", "public double getLongitude()\n {\n \treturn longitude;\n }", "@Override\n public String getLon() {\n return lon;\n }", "public double getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public double longitude() {\n return this.longitude;\n }", "public float getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public double getLongitude_() { \n return longitude_; \n }", "public double getLon() {\n return lon;\n }", "public double getLon() {\n return lon;\n }", "public float getLongitude() {\n return longitude;\n }", "public float getLongitude() {\n return longitude;\n }", "public Float getLongitude() {\n return longitude;\n }", "public int getLongitude() {\n return longitude_;\n }", "public float getLongitudeValue (){\n return trackLon.getValue ();\n }", "public String getLongitude() {\n\t\treturn longitude;\n\t}", "public double getLongitude() {\n return longitude_;\n }", "public double getLongitude() {\n return longitude_;\n }", "public void setLongitude(String longitude)\r\n {\r\n this.longitude = longitude; \r\n }", "public void setLon(double value) {\n lon = value;\n }", "public void setLongitude(float longitude) { this.longitude = longitude; }", "public long getLongitude() {\n return longitude_;\n }", "void setLongitude(Double longitude);", "public synchronized Double getLongitude() {\r\n\t\treturn longitude;\r\n\t}", "public double getLongitude() {\n\t\treturn longitude;\n\t}", "public BigDecimal getLongitude() {\n return longitude;\n }", "public int getLat();", "@Override\r\n\tpublic double getLon() {\n\t\treturn this.lon;\r\n\t}", "public double getLon() {\r\n\t\t\treturn lon;\r\n\t\t}", "public String getLongitude() {\n return String.valueOf(longitude);\n }", "public int getLongitude() {\n return longitude_;\n }", "public Longitude getLongitude (){\n return trackLon;\n }", "public double getLongitude(){\n if(location != null){\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }", "public double getLongitude(){\n if(location != null){\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }", "public double getLongitude() {\n if (slon == GempakConstants.IMISSD) {\n return slon;\n }\n return slon / 100.;\n }", "public double getLongitude() {\n return longitude_;\n }", "long getLatitude();", "public float getLongitude() {\n\t\treturn longitude;\n\t}", "public float getLongitude() {\n\t\treturn longitude;\n\t}", "public long getLongitude() {\n return longitude_;\n }", "@Override\n\tpublic double getLongitude() {\n\t\treturn _locMstLocation.getLongitude();\n\t}", "public int getLongitude() {\n checkRep();\n return this.longitude;\n }", "@ApiModelProperty(value = \"Longitude of IP address\")\n public Double getLongitude() {\n return longitude;\n }", "@JsonProperty(\"longitude\")\n public Double getLongitude() {\n return longitude;\n }", "public CompraResponse longitude(String longitude) {\n this.longitude = longitude;\n return this;\n }", "public double getLng() {\n return lng;\n }", "@Min(-180)\n @Max(180)\n public double getLng() {\n return lng;\n }", "public double getLongitude() {\n\t\treturn Longitude;\n\t}", "public Longitude get_long()\n {\n\treturn this._long;\n }", "public void setLongitude(float longitude) {\n this.longitude = longitude;\n }", "double lon(long v) {\n return world.get(v).lon;\n }", "public double getLongitude() {\r\n if (location != null) {\r\n longitude = location.getLongitude();\r\n }\r\n\r\n // return longitude\r\n return longitude;\r\n }", "public void getLoco(double lat, double lon){\n cords.setText(lat + \" \"+lon);\n\n // String dress = getCompleteAddressString(lat,lon);\n\n // latt = lat;\n // longg = lon;\n\n //Toast.makeText(getContext(), add, Toast.LENGTH_SHORT).show();\n\n //LocationAddress locationAddress = new LocationAddress();\n //locationAddress.getAddressFromLocation(38.898748, -77.037684\n // , getContext(), new GeocoderHandler());\n\n //String add = getAddressString(lat,lon);\n //Toast.makeText(getContext(), add, Toast.LENGTH_LONG);\n //info.setText(add);\n\n check.setVisibility(View.VISIBLE);\n\n\n\n\n\n\n\n }", "public void setLongitude(int longitude) {\n this.longitude = longitude;\n }", "Double getLatitude();", "Double getLatitude();", "public void setLongitude(float value) {\n this.longitude = value;\n }", "public double getLongitude() {\n return location.getLongitude();\n }", "public double getLng() {\r\n\t\treturn lng;\r\n\t}", "public void setLongitude(double longitude) {\n this.longitude = longitude;\n }", "public void setLongitude(double longitude) {\n this.longitude = longitude;\n }", "public void setLng(double value) {\n this.lng = value;\n }", "int getLatitude();", "public double getLongitude() {\n if (location != null) {\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }", "public double getLongitude() {\n if (location != null) {\n longitude = location.getLongitude();\n }\n\n // return longitude\n return longitude;\n }", "double getLatitude();", "public void setLongitude(Float longitude) {\n this.longitude = longitude;\n }", "public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }", "public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }", "public double getResultLocationLongitude() {\n return resultLocationLongitude;\n }", "public Builder setLongitude(int value) {\n bitField0_ |= 0x00000001;\n longitude_ = value;\n onChanged();\n return this;\n }", "public double getLongitude() {\r\n if (location != null) {\r\n longitude = location.getLongitude();\r\n }\r\n\r\n return longitude;\r\n }", "public double getLongitude() {\n if (location != null) {\n curr_longitude = location.getLongitude();\n }\n\n // return longitude\n return curr_longitude;\n }", "public Double getLongitude()\n\t{\n\t\treturn null;\n\t}", "public java.lang.String getListLatLon()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LISTLATLON$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Builder setLongitude(long value) {\n bitField0_ |= 0x00000020;\n longitude_ = value;\n onChanged();\n return this;\n }", "public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }", "public void set_longitude(double _longitude) {\r\n\t\tthis._longitude = _longitude;\r\n\t}", "private String longitudeConversion() {\n int lon = record[5];\n if (lon >= 0) {\n lon = lon & 255;\n }\n lon = (lon << 8) + (record[4] & 255);\n float flon = Float.parseFloat(\"\" + lon + \".\" + (((record[7] & 255) << 8) + (record[6] & 255)));\n int degs = (int) flon / 100;\n float min = flon - degs * 100;\n String retVal = \"\" + (degs + min / 60);\n\n if (retVal.compareTo(\"200.0\") == 0) {\n return \"\";\n } else {\n return retVal;\n }\n }", "public String getLongitude(String s) {\n return ((longitude != FLOATNULL) ? new Float(longitude).toString() : \"\");\n }", "@ApiModelProperty(value = \"Last known longitude (Only for teachers/staff)\")\n public Double getLong() {\n return _long;\n }", "boolean hasHasLongitude();", "public double getLongitude() {\n if (currentLocation != null) {\n longitude = currentLocation.getLongitude();\n }\n // return longitude\n return longitude;\n }", "public void makeLatLong(String address){\n try {\n JSONObject jsonObject = new JSONObject(address);\n JSONObject result = jsonObject.getJSONObject(\"result\");\n JSONArray addressMatches = result.getJSONArray(\"addressMatches\");\n JSONObject firstResult = addressMatches.getJSONObject(0);\n JSONObject coordinates = firstResult.getJSONObject(\"coordinates\");\n latitude = coordinates.getDouble(\"y\");\n longitude = coordinates.getDouble(\"x\");\n\n Log.i(\"CoY \", Double.toString(latitude));\n Log.i(\"CoX\", Double.toString(longitude));\n } catch (JSONException e) {\n Log.i(\"Error\", e.getMessage());\n e.printStackTrace();\n latitude = 39.7392;\n longitude = -104.9903;\n mainActivity.apiFailed(alarmName);\n }\n }" ]
[ "0.81668663", "0.8067083", "0.80013245", "0.79294074", "0.79294074", "0.77375597", "0.75961393", "0.7440858", "0.74203616", "0.74203616", "0.7393896", "0.73726547", "0.7355156", "0.73370457", "0.73370457", "0.73370457", "0.73370457", "0.7321404", "0.73107475", "0.73008144", "0.73008144", "0.73008144", "0.73008144", "0.7299277", "0.7280133", "0.7280133", "0.7214858", "0.7214858", "0.7189245", "0.7148849", "0.7132232", "0.7109165", "0.7097581", "0.7097581", "0.7072897", "0.704025", "0.7038117", "0.7035084", "0.70278984", "0.70114803", "0.6996799", "0.6995938", "0.69832206", "0.69809663", "0.69588655", "0.695722", "0.6957125", "0.6955767", "0.6952626", "0.6952626", "0.6942808", "0.6941661", "0.689692", "0.6862389", "0.6862389", "0.68551886", "0.6827131", "0.6787663", "0.67825395", "0.67711806", "0.67269343", "0.66994476", "0.6678119", "0.667721", "0.66568744", "0.6611766", "0.66084355", "0.6594042", "0.65829575", "0.65808827", "0.6552132", "0.6552132", "0.6546956", "0.65391695", "0.65318483", "0.6488928", "0.6488928", "0.64846426", "0.64807534", "0.6477115", "0.6477115", "0.6476783", "0.6468481", "0.6449329", "0.6449329", "0.64230055", "0.6397767", "0.63940364", "0.6382231", "0.6352891", "0.63483286", "0.634104", "0.6313364", "0.6313092", "0.62884504", "0.62603956", "0.62577814", "0.6248877", "0.62323666", "0.6215872" ]
0.7472599
7
SET para o valor da longitude
public void setLongitude(float longitude) { this.longitude = longitude; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLongitude(Double longitude);", "public void setLon(double value) {\n lon = value;\n }", "public void setLongitude(String longitude)\r\n {\r\n this.longitude = longitude; \r\n }", "long getLongitude();", "public void setLongitude(float value) {\n this.longitude = value;\n }", "public void setLongitude(float longitude) {\n this.longitude = longitude;\n }", "private void setMyLatLong() {\n }", "public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }", "public void setLongitude(double longitude) {\n this.longitude = longitude;\n }", "public void setLongitude(double longitude) {\n this.longitude = longitude;\n }", "double getLongitude();", "public void setLon(double lon) {\r\n\t\t\tthis.lon = lon;\r\n\t\t}", "public void setLongitude(Float longitude) {\n this.longitude = longitude;\n }", "public Builder setLongitude(long value) {\n bitField0_ |= 0x00000020;\n longitude_ = value;\n onChanged();\n return this;\n }", "public void setLng(double value) {\n this.lng = value;\n }", "Double getLongitude();", "Double getLongitude();", "int getLongitude();", "public void set_longitude(double _longitude) {\r\n\t\tthis._longitude = _longitude;\r\n\t}", "public synchronized void setLongitude(Double longitude) {\r\n\t\t// if it is the same don't update\r\n\t\tif (longitude.equals(this.longitude)) {\r\n\t\t\tupdatedLng = false;\r\n\t\t} else {\r\n\t\t\tthis.longitude = longitude;\r\n\t\t\tupdatedLng = true;\r\n\t\t\tSystem.out.println(\"Update longitude: \" + longitude);\r\n\t\t}\r\n\t}", "private void updateGeo(Double latitude, Double longitude) {\n latitudeValue = latitude;\n longitudeValue = longitude;\n }", "public void setLongitude(int longitude) {\n this.longitude = longitude;\n }", "public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }", "public void setLongitude(Double longitude) {\n this.longitude = longitude;\n }", "void setLatitude(Double latitude);", "public Builder setLongitude(double value) {\n \n longitude_ = value;\n onChanged();\n return this;\n }", "public Builder setLongitude(int value) {\n bitField0_ |= 0x00000001;\n longitude_ = value;\n onChanged();\n return this;\n }", "@Test\n public void testSetLongitude() {\n \n assertEquals(0.0f, o2.getLatitude(), 0.0);\n o2.setLongitude(0.2f);\n assertEquals(0.2f, o2.getLongitude(), 0.0);\n }", "public float getLongitude() { return longitude; }", "@Override\n\tpublic void setLongitude(double Longitude) {\n\t\t_locMstLocation.setLongitude(Longitude);\n\t}", "public void setLongitude(double longitude) {\n\t\tLongitude = longitude;\n\t}", "public void setLocation(double lon, double lat) {\n\t\tthis.lon = lon;\n\t\tthis.lat = lat;\n\t}", "public void setLongitude(double longitude) {\n\t\tthis.longitude = longitude;\n\t}", "@Override\n public void setLocation(String latitude, String longitude) {\n lat = latitude;\n lon = longitude;\n }", "public int setLongitude(Float longitude) {\n try {\n setLongitude(longitude.floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }", "public double getLongitude_() { \n return longitude_; \n }", "public void setLatLongLoc(String loc_lat, String loca_long) {\n editor.putString(LOC_LAT, loc_lat);\n editor.putString(LOC_LONG, loca_long);\n editor.commit();\n }", "public void setLat(double value) {\n lat = value;\n }", "public int getLon();", "public int setLongitude(Integer longitude) {\n try {\n setLongitude(longitude.floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }", "public double getLongitude() {\n return longitude_;\n }", "public void setLon(double longitude) {\n filename = evaluate(getLat(), longitude, getLevel());\n }", "public int setLongitude(String longitude) {\n try {\n setLongitude(new Float(longitude).floatValue());\n } catch (Exception e) {\n setLongitudeError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return longitudeError;\n }", "public boolean setGPS(String longitude, String latitude);", "public float getLongitude() {\n return longitude;\n }", "private void setLongitudeError (float longitude, Exception e, int error) {\n this.longitude = longitude;\n longitudeErrorMessage = e.toString();\n longitudeError = error;\n }", "public int getLongitude() {\n return longitude;\n }", "public double getLongitude()\n {\n \treturn longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude;\n }", "public void setLat(double value) {\n this.lat = value;\n }", "public Float getLongitude() {\n return longitude;\n }", "public String getLongitude()\r\n {\r\n return longitude;\r\n }", "public float getLongitude() {\n return longitude;\n }", "public float getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Double getLongitude() {\n return longitude;\n }", "public Builder setLatitude(long value) {\n bitField0_ |= 0x00000010;\n latitude_ = value;\n onChanged();\n return this;\n }", "public void setLocation(Coordinate coordinate);", "public float getLongitudeValue (){\n return trackLon.getValue ();\n }", "public void setLongitude(double longitude) {\n if (longitude < -180 || longitude > 180) {\n throw new IllegalArgumentException(\"Longitude value must be in the next range: [-180.0; 180.0].\");\n }\n this.longitude = longitude;\n }", "public double getLon() {\n return lon;\n }", "public double getLon() {\n return lon;\n }", "public double longitude() {\n return this.longitude;\n }", "@Override\n public String getLon() {\n return lon;\n }", "public void setLng(double lng) {\n this.lng = lng;\n }", "public BigDecimal getLongitude() {\n return longitude;\n }", "public double getLongitude() {\n return longitude_;\n }", "public double getLongitude() {\n return longitude_;\n }", "public String getLongitude() {\n return longitude;\n }", "public String getLongitude() {\n return longitude;\n }", "public int getLongitude() {\n return longitude_;\n }", "public long getLongitude() {\n return longitude_;\n }", "private void setLatLon(double lat, double lon,\n boolean andResetStationMenu) {\n try {\n this.lat = lat;\n this.lon = lon;\n \n // the setCenterPoint call destroys the existing displayables\n // within rangeRings (which is a CompositeDisplayable) and\n // recreates the labels using RadarGrid's makeLabels method.\n // so just make sure to call fixTextDisplayableSphereField!\n rangeRings.setCenterPoint(lat, lon);\n fixTextDisplayableSphereField();\n \n rescaleLabels();\n if (stationCbx != null) {\n if (andResetStationMenu) {\n stationCbx.setSelectedIndex(0);\n }\n updateLegendLabel();\n latField.setText(getDisplayConventions().formatLatLon(lat));\n lonField.setText(getDisplayConventions().formatLatLon(lon));\n }\n\n } catch (Exception exc) {\n logException(\"Setting lat/lon\", exc);\n }\n\n }", "public void setLng(double lng) {\r\n\t\tthis.lng = lng;\r\n\t}", "public void setLocation(Location geolocation) {\n double latitude = geolocation.getLatitude();\n double longitude = geolocation.getLongitude();\n put(\"latitude\", latitude);\n put(\"longitude\", longitude);\n saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error saving longitude of photo to Parse: \" + e);\n }\n }\n });\n }", "void addHasLongitude(Object newHasLongitude);", "public synchronized Double getLongitude() {\r\n\t\treturn longitude;\r\n\t}", "public void setUserLocation(double lat, double lon) {\n\tuserLocation = new Point2D.Double(lon,lat);\n }", "public Longitude getLongitude (){\n return trackLon;\n }", "public double getLongitude() {\n\t\treturn longitude;\n\t}", "@Override\npublic void onLocationChanged(Location location) {\nString lat = String.valueOf(location.getLatitude());\nString lon = String.valueOf(location.getLongitude());\nLog.e(\"GPS\", \"location changed: lat=\"+lat+\", lon=\"+lon);\n//tv.setText(\"lat=\"+lat+\", lon=\"+lon);\nLatLng coordinates = new LatLng(location.getLatitude(), location.getLongitude()); \nmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(coordinates, 12));\n\n\n//Update Value of Lat Long\n}", "public double getLon() {\r\n\t\t\treturn lon;\r\n\t\t}", "public void setLatitudeLongitude(Latitude updateLat,Longitude updateLon){\n trackLat = updateLat;\n trackLon = updateLon;\n // if(reportLocation != null){\n String out = trackNumber+\" update received\";\n if(debug){\n System.out.println(\"\\n\\n\"+trackNumber+\" set (update) new the location\");\n System.out.println(\"Set lat lon\"+updateLat.getDegrees () +\" and \"+updateLon.getDegrees ());\n }\n\n eventLogger.log(\" \");\n eventLogger.log(out);\n\n Constant.othGoldOutput.println (\"\");\n Constant.othGoldOutput.println (out);\n Constant.othGoldOutput .flush ();\n\n if(reportLocation != null){\n\n EventHandle[] reportLoc = ECAAgent.getEventHandles(reportLocationEventName);\n PrimitiveEventHandle peh = (PrimitiveEventHandle)beginCountDn;\n\n peh.insert(\"TimeStamp\",(Object)TrackUtilities.getTimeStamp());\n ECAAgent.getDefaultECAAgent().raiseEndEvent(reportLoc,this);\n beginCountDown();\n }\n return ;\n }", "public double getLongitude() {\n return longitude_;\n }", "@Override\r\n\tpublic double getLon() {\n\t\treturn this.lon;\r\n\t}", "public void setLatitud(String latitud);", "public double getLongitude() {\n if (slon == GempakConstants.IMISSD) {\n return slon;\n }\n return slon / 100.;\n }", "public void setLongitude(String longitude) {\n\t\tthis.longitude = longitude == null ? null : longitude.trim();\n\t}", "public long getLongitude() {\n return longitude_;\n }", "public void updateLongitude(double longitude) {\n\t\tif (this.minLongitude > longitude) {\n\t\t\tthis.minLongitude = longitude - Plane.SmallestGrain;\n\t\t}\n\t\t\n\t\tif (this.maxLongitude < longitude) {\n\t\t\tthis.maxLongitude = longitude + Plane.SmallestGrain;\n\t\t}\n\t}", "public float getLongitude() {\n\t\treturn longitude;\n\t}", "public float getLongitude() {\n\t\treturn longitude;\n\t}", "public int getLongitude() {\n return longitude_;\n }", "double lon(long v) {\n return world.get(v).lon;\n }", "public void setLongitude(String longitude) {\n this.longitude = longitude == null ? null : longitude.trim();\n }" ]
[ "0.8453952", "0.81768674", "0.7589235", "0.74668366", "0.7444483", "0.74044776", "0.73370904", "0.73229164", "0.7315238", "0.7315238", "0.7301585", "0.7299058", "0.72838867", "0.7282492", "0.72799706", "0.7261245", "0.7261245", "0.7253375", "0.72364354", "0.7231412", "0.72239417", "0.72133815", "0.7202218", "0.7202218", "0.71530885", "0.7135841", "0.7135442", "0.7083359", "0.7038572", "0.69989794", "0.69853544", "0.69838864", "0.6969864", "0.69694483", "0.6956844", "0.69426596", "0.69362694", "0.69183636", "0.69179964", "0.6863437", "0.68386054", "0.6830833", "0.6822884", "0.6819925", "0.6809569", "0.6778437", "0.67646813", "0.6762699", "0.6762326", "0.6762326", "0.6762326", "0.6762326", "0.67455614", "0.6728353", "0.67218846", "0.6715755", "0.6715755", "0.67071205", "0.67071205", "0.67071205", "0.67071205", "0.6706133", "0.67053175", "0.6703143", "0.66988295", "0.66973317", "0.66973317", "0.6663496", "0.66501737", "0.66321594", "0.6612541", "0.65833414", "0.65833414", "0.6566177", "0.6566177", "0.65519875", "0.65502435", "0.6539204", "0.6538304", "0.6522717", "0.65095603", "0.6501832", "0.6496479", "0.6480347", "0.6466147", "0.64555573", "0.6450596", "0.64476484", "0.64444613", "0.6433268", "0.64252347", "0.64236367", "0.6399313", "0.6390956", "0.6389346", "0.6381531", "0.6381531", "0.6378081", "0.6366727", "0.6347499" ]
0.77974933
2
GET para a data e hora da coleta das coordenadas GPS
public Date getDataGatheringDateTime() { return this.dataGatheringDateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n SubPlanListDTO llh = (SubPlanListDTO)v.getTag();\n //Toast.makeText(getApplicationContext(),\"위치 x=\"+llh.getLlh_x()+\"y=\"+llh.getLlh_y(),Toast.LENGTH_SHORT).show();\n ////여기수정하면됨......\n Date date = new Date();\n SimpleDateFormat transFormat = new SimpleDateFormat(\"HH:mm\");\n String to = transFormat.format(date);\n System.out.println(to);\n\n String tos[] = to.split(\":\");\n String times[] = llh.getTime().split(\"~\");\n String start_times[] = times[0].split(\":\");\n String end_times[] = times[1].split(\":\");\n\n lat2 = Double.parseDouble(llh.getLlh_x());\n lon2 = Double.parseDouble(llh.getLlh_y());\n gps = new GpsInfo(ToDayListSubplan.this);\n\n if(Integer.parseInt(tos[0]) == Integer.parseInt(start_times[0])){\n if(Integer.parseInt(tos[1])>=Integer.parseInt(start_times[1])){\n // GPS 사용유무 가져오기\n if (gps.isGetLocation()) {\n\n double latitude = gps.getLatitude();\n double longitude = gps.getLongitude();\n lat1 = latitude;\n lon1 = longitude;\n //txtLat.setText(String.valueOf(latitude));\n //txtLon.setText(String.valueOf(longitude));\n\n if(calDistance(lat1,lon1,lat2,lon2) <= 500){\n Toast.makeText(\n getApplicationContext(),\n \"당신의 위치1 - \\n위도: \" + latitude + \"\\n경도: \" + longitude+\"\\n 위치비교값:\"+calDistance(lat1,lon1,lat2,lon2)+\"\",\n Toast.LENGTH_LONG).show();\n\n int sub_num = llh.getSub_num();\n\n String requestURL = \"http://192.168.14.45:8805/meto/and/schedule/getGPS.do\";\n\n //HttpClient client = new DefaultHttpClient();\n HttpClient client = SessionControl.getHttpclient();\n HttpPost post = new HttpPost(requestURL);\n List<NameValuePair> paramList = new ArrayList<>();\n\n paramList.add(new BasicNameValuePair(\"sub_num\", String.valueOf(sub_num)));\n\n try {\n post.setEntity(new UrlEncodedFormEntity(paramList, \"UTF-8\"));\n HttpResponse response = client.execute(post);\n HttpEntity entity = response.getEntity();\n //Toast.makeText(getApplicationContext(), \"flag 확인 \"+flag,Toast.LENGTH_SHORT).show();\n\n Log.d(\"서브넘버 보냈쨔냐 \", \"\"+sub_num);\n } catch(Exception e) {\n Log.d(\"sendPost===> \", e.toString());\n }\n } else {\n Toast.makeText(\n getApplicationContext(),\n \"당신의 위치에서 500m 사이 거리가 아닙니다.\",\n Toast.LENGTH_LONG).show();\n }\n } else {\n // GPS 를 사용할수 없으므로\n gps.showSettingsAlert();\n }\n }\n } else if(Integer.parseInt(tos[0]) == Integer.parseInt(end_times[0])){\n if(Integer.parseInt(tos[1])<=Integer.parseInt(end_times[1])){\n // GPS 사용유무 가져오기\n if (gps.isGetLocation()) {\n\n double latitude = gps.getLatitude();\n double longitude = gps.getLongitude();\n lat1 = latitude;\n lon1 = longitude;\n //txtLat.setText(String.valueOf(latitude));\n //txtLon.setText(String.valueOf(longitude));\n if(calDistance(lat1,lon1,lat2,lon2) <= 500){\n Toast.makeText(\n getApplicationContext(),\n \"당신의 위치2 - \\n위도: \" + latitude + \"\\n경도: \" + longitude+\"\\n 위치비교값:\"+calDistance(lat1,lon1,lat2,lon2)+\"\",\n Toast.LENGTH_LONG).show();\n\n int sub_num = llh.getSub_num();\n\n String requestURL = \"http://192.168.14.45:8805/meto/and/schedule/getGPS.do\";\n\n //HttpClient client = new DefaultHttpClient();\n HttpClient client = SessionControl.getHttpclient();\n HttpPost post = new HttpPost(requestURL);\n List<NameValuePair> paramList = new ArrayList<>();\n\n paramList.add(new BasicNameValuePair(\"sub_num\", String.valueOf(sub_num)));\n\n try {\n post.setEntity(new UrlEncodedFormEntity(paramList, \"UTF-8\"));\n HttpResponse response = client.execute(post);\n HttpEntity entity = response.getEntity();\n //Toast.makeText(getApplicationContext(), \"flag 확인 \"+flag,Toast.LENGTH_SHORT).show();\n\n Log.d(\"서브넘버 보냈쨔냐 \", \"\"+sub_num);\n } catch(Exception e) {\n Log.d(\"sendPost===> \", e.toString());\n }\n }\n\n } else {\n // GPS 를 사용할수 없으므로\n gps.showSettingsAlert();\n }\n }\n }\n\n\n }", "void getReverInfo(int longitude,int latitude);", "public static String findTemp(String lat, String lon) {\n //final String methodPath = \"/entities.electricityusage/\";\n //initialize\n URL url = null;\n String appid = \"appid=f93bd59bea3ab44fb8dba0d95596adfc\";\n HttpURLConnection conn = null;\n String textResult = \"\";\n //making http request\n try {\n url = new URL(WEATHER_URI + \"lat=\" + lat + \"&\" + \"lon=\" + lon + \"&\" +appid);\n // open the connection\n conn = (HttpURLConnection) url.openConnection();\n // set the time out\n conn.setReadTimeout(10000);\n conn.setConnectTimeout(15000);\n // set the connection method to GET\n conn.setRequestMethod(\"GET\");\n //add http headers to set your response type to json\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n //Read the response\n Scanner inStream = new Scanner(conn.getInputStream());\n //read the input stream and store it as string\n while (inStream.hasNextLine()) {\n textResult += inStream.nextLine();\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n conn.disconnect();\n }\n return textResult;\n }", "@Override\n\tpublic Map getStartandStopByGPS(String terminalId, String start_time,\n\t\t\tString stop_time) {\n\t\tMap map = new HashMap();\n\t\ttry {\n\t\t\tif(start_time.length()==12&&stop_time.length()==12){\n\t\t\t\tString start_time_in_format = start_time.substring(0,2) + \"-\" + start_time.substring(2,4) + \"-\" + start_time.substring(4,6) + \" \" + start_time.substring(6,8) + \":\" + start_time.substring(8,10) + \":\" + start_time.substring(10,12);\n\t\t\t\tString stop_time_in_format = stop_time.substring(0,2) + \"-\" + stop_time.substring(2,4) + \"-\" + stop_time.substring(4,6) + \" \" + stop_time.substring(6,8) + \":\" + stop_time.substring(8,10) + \":\" + stop_time.substring(10,12);\n\t\t\t\tmap.put(\"start_time_in_format\", start_time_in_format);\n\t\t\t\tmap.put(\"stop_time_in_format\", stop_time_in_format);\n\t\t\t\tList<PositionData> position_between = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' and date>'\" + start_time_in_format + \"' and date<'\" + stop_time_in_format + \"' order by date desc\");\n\t\t\t\tfor(int i=0;i<position_between.size();i++){\n\t\t\t\t\tif(position_between.get(i).getInfo().contains(\"GPS状态:GPS不定位;\")){\n\t\t\t\t\t\tposition_between.remove(i);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString start_point = \"Nil\";\n\t\t\t\tString stop_point = \"Nil\";\n\t\t\t\tif(position_between.size()>0){\n\t\t\t\t\tString stop_point_latitude = position_between.get(0).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.substring(0,stop_point_latitude.indexOf(\";\"));\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.split(\":\")[1];\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstop_point_latitude = stop_point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\t\tString tempStrPart = stop_point_latitude.split(\"\\\\.\")[1];\n\t\t\t\t\ttempStrPart = \"0.\" + tempStrPart;\n\t\t\t\t\tdouble tempD = Double.parseDouble(tempStrPart)/60*100;\n\t\t\t\t\tstop_point_latitude = Integer.parseInt(stop_point_latitude.split(\"\\\\.\")[0]) + tempD + \"\";\n\t\t\t\t\t\n\t\t\t\t\tString stop_point_longitute = position_between.get(0).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.substring(0,stop_point_longitute.indexOf(\";\"));\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.split(\":\")[1];\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstop_point_longitute = stop_point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\t\tString _tempStrPart = \"0.\" + stop_point_longitute.split(\"\\\\.\")[1];\n\t\t\t\t\tdouble _tempD = Double.parseDouble(_tempStrPart)/60*100;\n\t\t\t\t\tstop_point_longitute = Integer.parseInt(stop_point_longitute.split(\"\\\\.\")[0]) + _tempD + \"\";\n\t\t\t\t\tstop_point = stop_point_longitute + \",\" + stop_point_latitude;\n\t\t\t\t\t\n\t\t\t\t\tString start_point_latitude = position_between.get(position_between.size()-1).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\t\tstart_point_latitude = start_point_latitude.substring(0,start_point_latitude.indexOf(\";\"));\n\t\t\t\t\tstart_point_latitude = start_point_latitude.split(\":\")[1];\n\t\t\t\t\tstart_point_latitude = start_point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstart_point_latitude = start_point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\t\tString tempStrPart1 = start_point_latitude.split(\"\\\\.\")[1];\n\t\t\t\t\ttempStrPart1 = \"0.\" + tempStrPart1;\n\t\t\t\t\tdouble tempD1 = Double.parseDouble(tempStrPart1)/60*100;\n\t\t\t\t\tstart_point_latitude = Integer.parseInt(start_point_latitude.split(\"\\\\.\")[0]) + tempD1 + \"\";\n\t\t\t\t\t\n\t\t\t\t\tString start_point_longitute = position_between.get(position_between.size()-1).getInfo().substring(position_between.get(0).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\t\tstart_point_longitute = start_point_longitute.substring(0,start_point_longitute.indexOf(\";\"));\n\t\t\t\t\tstart_point_longitute = start_point_longitute.split(\":\")[1];\n\t\t\t\t\tstart_point_longitute = start_point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\t\tstart_point_longitute = start_point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\t\tString _tempStrPart1 = \"0.\" + start_point_longitute.split(\"\\\\.\")[1];\n\t\t\t\t\tdouble _tempD1 = Double.parseDouble(_tempStrPart1)/60*100;\n\t\t\t\t\tstart_point_longitute = Integer.parseInt(start_point_longitute.split(\"\\\\.\")[0]) + _tempD1 + \"\";\n\t\t\t\t\tstart_point = start_point_longitute + \",\" + start_point_latitude;\n//\t\t\t\t\tSystem.out.println(start_point + \"-->\" + stop_point);\n//\t\t\t\t\tmap.put(\"start_point\",start_point);\n//\t\t\t\t\tmap.put(\"stop_point\", stop_point);\n\t\t\t\t}\n\t\t\t\treturn map;\n\t\t\t}\n\t\t\treturn null;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public String getGPS();", "@Override\n\tpublic Map getPointsForHotArea(String terminalId) {\n\t\tMap map = new HashMap();\n\t\tString lngs = \"\";\n\t\tString lats = \"\";\n\t\ttry {\n\t\t\tList<PositionData> info_list = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' order by date desc limit 2000\");\n\t\t\tfor(int i=0;i<info_list.size();i++){\n\t\t\t\tif(info_list.get(i).getInfo().contains(\"GPS状态:GPS不定位;\")){\n\t\t\t\t\tinfo_list.remove(i);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<PositionData> position_list = new ArrayList<PositionData>();\n\t\t\tfor(int i=0;i<(info_list.size()>2000?2000:info_list.size());i++){\n\t\t\t\tposition_list.add(info_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=0;i<position_list.size();i++){\n\t\t\t\tString point_latitude = position_list.get(i).getInfo().substring(position_list.get(i).getInfo().lastIndexOf(\"纬度:\"));\n\t\t\t\tpoint_latitude = point_latitude.substring(0,point_latitude.indexOf(\";\"));\n\t\t\t\tpoint_latitude = point_latitude.split(\":\")[1];\n\t\t\t\tpoint_latitude = point_latitude.replaceAll(\"\\\\.\", \"\");\n\t\t\t\tpoint_latitude = point_latitude.replaceAll(\"°\", \".\");\n\t\t\t\tString tempStrPart1 = point_latitude.split(\"\\\\.\")[1];\n\t\t\t\ttempStrPart1 = \"0.\" + tempStrPart1;\n\t\t\t\tdouble tempD1 = Double.parseDouble(tempStrPart1)/60*100;\n\t\t\t\tpoint_latitude = Integer.parseInt(point_latitude.split(\"\\\\.\")[0]) + tempD1 + \"\";\n\t\t\t\tlats += point_latitude + \",\";\n\t\t\t\t\n\t\t\t\tString point_longitute = position_list.get(i).getInfo().substring(position_list.get(i).getInfo().lastIndexOf(\"经度:\"));\n\t\t\t\tpoint_longitute = point_longitute.substring(0,point_longitute.indexOf(\";\"));\n\t\t\t\tpoint_longitute = point_longitute.split(\":\")[1];\n\t\t\t\tpoint_longitute = point_longitute.replaceAll(\"\\\\.\", \"\");\n\t\t\t\tpoint_longitute = point_longitute.replaceAll(\"°\", \".\");\n\t\t\t\tString tempStrPart2 = point_longitute.split(\"\\\\.\")[1];\n\t\t\t\ttempStrPart2 = \"0.\" + tempStrPart2;\n\t\t\t\tdouble tempD2 = Double.parseDouble(tempStrPart2)/60*100;\n\t\t\t\tpoint_longitute = Integer.parseInt(point_longitute.split(\"\\\\.\")[0]) + tempD2 + \"\";\n\t\t\t\tlngs += point_longitute + \",\";\n\t\t\t}\n\t\t\tmap.put(\"lngs\",lngs.subSequence(0, lngs.lastIndexOf(\",\")));\n\t\t\tmap.put(\"lats\",lats.subSequence(0, lats.lastIndexOf(\",\")));\n\t\t\t\n\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\treturn map;\n\t}", "public LatLng getLocation() {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n String locationProvider = LocationManager.NETWORK_PROVIDER;\n Location location = locationManager.getLastKnownLocation(locationProvider);\n\n Double lat,lon;\n try {\n lat = location.getLatitude();\n lon = location.getLongitude();\n return new LatLng(lat, lon);\n }\n catch (NullPointerException e){\n e.printStackTrace();\n return null;\n }\n\n\n\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n currentLocation = new float[]{(float)location.getLatitude(),(float)location.getLongitude()};\n\n Task<String> timeTask = getExtraTime(p.latOfPerson,p.lonOfPerson);\n if(timeTask!=null){\n timeTask.addOnCompleteListener(new OnCompleteListener<String>() {\n @Override\n public void onComplete(@NonNull Task<String> task) {\n if(task.isSuccessful()){\n String[] s = task.getResult().split(\",\");\n extraTime.setText(\"\"+((-Integer.parseInt(s[1])+Integer.parseInt(s[0])+Integer.parseInt(s[3]))/60)+\" Minutes Extra\");\n }\n }\n });\n }\n }\n }", "@Override\n protected String doInBackground(Void... params) {\n if (HelperRete.isNetworkAvailable(mMainActivity)) {\n\n String queryFormattata = mQueryGrezza.replaceAll(\" \", \"+\" + \"\");\n mQueryTitolo = mQueryGrezza.substring(0,1).toUpperCase() + mQueryGrezza.substring(1);\n\n // creazione url\n String url = \"https://maps.google.com/maps/api/geocode/json\" +\n \"?address=\" + queryFormattata + \"&key=\" + mMainActivity.getString(R.string.google_geoc_key);\n\n JSONObject response = HelperRete.volleySyncRequest(mMainActivity, url);\n\n // ottieni le coordinate dell'indirizzo tramite la risposta di GoogleApi\n try {\n if (response != null) {\n Log.i(\"jsonresp\", response.toString());\n\n double lng = ((JSONArray) response.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lng\");\n\n double lat = ((JSONArray) response.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lat\");\n\n mCoordinateCercate = new LatLng(lat, lng);\n\n return RICERCA_COMPLETATA;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n return NO_INTERNET;\n }\n\n return null;\n }", "private void loadZomatoData(String lat, String lon){\n String url = URL + \"lat=\"+ lat + \"&lon=\" + lon;\n //Log.i(TAG, \"URL: \" + url);\n ZomatoAsyncTask zomTask = new ZomatoAsyncTask();\n zomTask.execute(new String[]{url});\n }", "private void getWeatherData() {\n System.out.println(\"at getWeather\");\n String url = \"https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=\";\n url += databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE);\n url += \"&lon=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE);\n url += \"&dt=\" + databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.START_TIME).substring(0, 10);\n url += \"&appid=your openweathermap API key\";\n new ClientThread(ClientThread.GET_WEATHER, new String[]{url, Integer.toString(experimentNumber)}, this).start();\n }", "@Override\n public void onLocationChanged(Location location) {\n\n clientlat = location.getLatitude();\n clientlon = location.getLongitude();\n System.out.println(\"latitude is \"+clientlat);\n System.out.println(\"longitude is \"+clientlon);\n }", "private void setTime(String lat, String lon) {\n mDisposable = mRestRepo\n .getSunriseSunsetApi(lat, lon)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(place -> {\n mTvConnectionError.setText(\"\");\n mTvSunriseTime.setText(place.getSunrise());\n mTvSunsetTime.setText(place.getSunset());\n Log.i(TAG, place.getSunrise() + \" \" + place.getSunset());\n }, throwable -> mTvConnectionError.setText(R.string.error_internet_connection));\n }", "private void readGPS() {\n }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "String getArrivalLocation();", "public void timeTrip(View view){\n String URL = \"http://172.18.35.160:9080/CarpoolingTECServer/connect/request\";\n String ptoSalida = txtInicio.getText().toString();\n String ptoDestino = txtFin.getText().toString();\n\n String all = ptoSalida + \",\" + ptoDestino;\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n JsonObjectRequest objectRequest = new JsonObjectRequest(\n Request.Method.GET,\n URL,\n null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"Vivihola\", response.toString());\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Vivihola\", error.toString());\n }\n }\n );\n requestQueue.add(objectRequest);\n\n }", "private void getTiempo() {\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_TIME);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tSuperTiempo = sb.toString();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\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}", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tfetchData();\n\t\t\t// getLatLongFromAddress(from);\n\t\t\treturn null;\n\t\t}", "public void getLoco(double lat, double lon){\n cords.setText(lat + \" \"+lon);\n\n // String dress = getCompleteAddressString(lat,lon);\n\n // latt = lat;\n // longg = lon;\n\n //Toast.makeText(getContext(), add, Toast.LENGTH_SHORT).show();\n\n //LocationAddress locationAddress = new LocationAddress();\n //locationAddress.getAddressFromLocation(38.898748, -77.037684\n // , getContext(), new GeocoderHandler());\n\n //String add = getAddressString(lat,lon);\n //Toast.makeText(getContext(), add, Toast.LENGTH_LONG);\n //info.setText(add);\n\n check.setVisibility(View.VISIBLE);\n\n\n\n\n\n\n\n }", "public double[] getLocation()\n {\n \t\t\t\t\n\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tLocation place = null;\n\t\t\t\tdouble[] resultLocation = new double[2];\n\t\t\t\t\n\t\t\t\t\tswitch (option)\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\tcase GPS:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tplace = locationManager\n\t\t\t \t\t.getLastKnownLocation(LocationManager.GPS_PROVIDER);\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase NETWORK:\n\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\tplace = locationManager\n\t\t\t\t\t\t\t\t\t.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\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\tbreak;\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\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tresultLocation[0] = place.getLongitude();\n\t\t\t\t\tresultLocation[1] = place.getLatitude();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn resultLocation;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}catch(Exception error){\n\t\t\t\t\n\t\t\t\tLog.d(\"ERROR CLASS GEO LOCATION - GET LOCATION\", error.getMessage());\n\t\t\t\t\n\t\t\t}\n\t\t\t \n \treturn null;\n\t\t\t\n }", "private void loadTravelTracking() {\n\n ArrayList<LatLng> LatLngs = new ArrayList<LatLng>();\n\n HistoryDBHelper inst = HistoryDBHelper.getInstance(getContext());\n // SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\", Locale.US);\n // String simpleDate = \"24-04-2021 08:00:00\";\n try {\n // Timestamp ts = Timestamp.valueOf(\"2021-04-24 13:00:27.627\");\n // Date date = new Date(ts.getTime());\n Date date = selectedDate;\n Log.d(TAG, date.toString());\n ArrayList<HistoryItem> historyItems = inst.retrieveByDate(date);\n //ArrayList<HistoryItem> historyItems = inst.getAllListHistory();\n int count = 0;\n Timestamp lastTimeStamp = new Timestamp(0);\n for (HistoryItem historyItem : historyItems) {\n Log.d(TAG, historyItem.toString() + count);\n Timestamp currentTimeStamp = historyItem.getTimestamp();\n // Ensure that two time stamps are 1 minutes away from each other.\n if (currentTimeStamp.getTime() - lastTimeStamp.getTime() > 1000 * 60) {\n LatLngs.add(new LatLng(historyItem.getLat(), historyItem.getLon()));\n lastTimeStamp = currentTimeStamp;\n }\n count++;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(TAG, \"Load Travel Tracking Date Error\");\n }\n\n Polyline line = map.addPolyline(new PolylineOptions()\n .addAll(LatLngs)\n .startCap(new RoundCap())\n .endCap(new ButtCap())\n .width(15)\n .color(Color.argb(255, 153, 27, 30)));\n\n line.setTag(new SimpleDateFormat(\"MM/dd/yyyy\", Locale.US).format(selectedDate));\n line.setJointType(JointType.ROUND);\n line.setClickable(true);\n\n map.setOnPolylineClickListener(new GoogleMap.OnPolylineClickListener() {\n @Override\n public void onPolylineClick(Polyline polyline) {\n if ((polyline.getColor() == Color.argb(255, 153, 27, 30))) {\n polyline.setColor(Color.argb(255, 255, 204, 0));\n } else {\n // The default pattern is a solid stroke.\n polyline.setColor(Color.argb(255, 153, 27, 30));\n }\n\n Toast.makeText(getActivity(), \"Date \" + polyline.getTag().toString(),\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "String getISSLatitudeAndLongitude() throws Exception\n\t{\n\t\tString url = \"http://api.open-notify.org/iss-now.json\";\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString latAndLong = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement position = treeObject.get(\"iss_position\");\n\n\t\t\tif (position.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = position.getAsJsonObject();\n\n\t\t\t\tJsonElement latitude = contentsObject.get(\"latitude\");\n\n\t\t\t\tlatAndLong += \"Latitude = \" + latitude.getAsString();\n\n\t\t\t\tJsonElement longitude = contentsObject.get(\"longitude\");\n\n\t\t\t\tlatAndLong += \" Longitude = \" + longitude.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn latAndLong;\n\t}", "@Override\n public String getWeatherAtCoords(@PathVariable(\"lat\") String lat, @PathVariable(\"lon\") String lon, @RequestParam(value = \"period\", defaultValue = \"0\") int period) {\n byte[] bytes;\n String utfLat = null;\n String utfLon = null;\n\n try {\n // First recode lat\n bytes = lat.getBytes(\"ISO-8859-1\");\n utfLat = new String(bytes, \"UTF-8\");\n\n // Now recode lon\n bytes = lon.getBytes(\"ISO-8859-1\");\n utfLon = new String(bytes, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n logger.error(\"Failed to handle byte encoding of url parameter\", e);\n }\n\n if (utfLat != null && utfLon != null) {\n return weatherRequest.requestWeather(utfLat, utfLon, period);\n }\n else {\n return \"Error: please try your request again!\";\n }\n }", "private static String readEnergyJSON(Date start, Date end, String resolution, String point) throws IOException {\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd+HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n String url_string = \"https://rest.buildingos.com/reports/timeseries/?start=\" + df.format(start) + \"&resolution=\" + resolution + \"&end=\" + df.format(end) + \"&name=\" + point;\n URL consumption_url = new URL(url_string);\n Log.i(\"url\", consumption_url.toString());\n InputStream in = consumption_url.openStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String result, line = reader.readLine();\n result = line;\n while((line=reader.readLine())!=null) {\n result += line;\n }\n String json_string = result;\n JSONObject all_electricity_page = null;\n String return_string = \"\";\n\n try {\n all_electricity_page = (JSONObject) new JSONTokener(json_string).nextValue();\n JSONArray results = (JSONArray)all_electricity_page.get(\"results\");\n for (int i = 0; i < results.length(); i++) {\n Double value = -2.0;\n try {\n if (results.get(i) != JSONObject.NULL\n && ((JSONObject)results.get(i)).get(point) != JSONObject.NULL) {\n value = ((JSONObject) ((JSONObject) results.get(i)).get(point)).getDouble(\"value\");\n //Log.i(\"not null\", \"getting here? value = \" + value);\n\n }\n else {\n value = 0.0;\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n Log.i(\"null\", \"adding -1.0? point=\" + point + \" time=\" + timestamp_string);\n }\n\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n return_string += timestamp_string + \";\" + value + \"\\n\";\n }\n catch (Exception e) {\n //System.out.println(results.get(i));\n e.printStackTrace();\n //Log.i(\"null error?\", \"error: value = \" + value);\n //Log.i(\"null error?\", e.toString());\n }\n }\n\n } catch (JSONException e) {\n //didn't find any results - url must have been wrong, or bad connection\n e.printStackTrace();\n Log.i(\"readEnergyJSON\", \"bad url? \" + e.toString());\n }\n return return_string;\n }", "private void _Setup_GetLocData() {\n\t\tString log_msg = \"CONS.LocData.LONGITUDE=\"\n\t\t\t\t\t+ String.valueOf(CONS.LocData.LONGITUDE);\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t\tIntent i = this.getIntent();\n\t\t\n\t\tthis.longitude\t= i.getDoubleExtra(\n\t\t\t\t\t\t\tCONS.IntentData.iName_Showmap_Longitude,\n\t\t\t\t\t\t\tCONS.IntentData.Showmap_DefaultValue);\n\t\t\n\t\tthis.latitude\t= i.getDoubleExtra(\n\t\t\t\tCONS.IntentData.iName_Showmap_Latitude,\n\t\t\t\tCONS.IntentData.Showmap_DefaultValue);\n\t\t\n\t\t// Log\n\t\tlog_msg = \"this.latitude=\" + String.valueOf(this.latitude)\n\t\t\t\t\t\t+ \"/\"\n\t\t\t\t\t\t+ \"this.longitude=\" + String.valueOf(this.longitude);\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t}", "@Override\n\t\tprotected JSONObject doInBackground(Integer... params) {\n\t\t\t{\n\t\t\t\n\t\t \n\t\t Log.d(\"mylog\", \"SerLat:\"+latitude+\" :\"+longitude);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\ttry {\n\t\t\t//\tThread.sleep(3000);\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\twhile (now.toMillis(false)-curt<3000){\n\t\t\t\tnow.setToNow();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public Double[] gps(String ipAddr) {\n String GPScmd = \"gpspipe -w -n10\";\n String GPSdata = \"\";\n Double[] coord = new Double[2];\n char x;\n /*************************************************\n * Code to 'write' request for GPS info from Pi. *\n * \"lan\": 345325643, \"lon\": 23456789, *\n *************************************************/\n if (prompt != null) {\n try {\n GPSdata = sendCommand(GPScmd);\n String lat = \"\", lon = \"\";\n int plusIndex = GPSdata.indexOf(\"lat]\\\":\");\n if (plusIndex != -1) {\n lat = GPSdata.substring(plusIndex + 6);\n int plusIndex2 = GPSdata.indexOf(\"lon]\\\":\");\n if (plusIndex2 != -1) {\n lon = GPSdata.substring(plusIndex2 + 6);\n }\n lat = lat.split(\",\")[0];\n lon = lon.split(\",\")[0];\n coord[0] = Double.parseDouble(lat);\n coord[1] = Double.parseDouble(lon);\n // Use before\n System.out.println(lat + \"----\" + lon);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n }\n return coord;\n }", "long getLatitude();", "@Override\n\tpublic void onLocationChanged(Location location) {\n\t\tmylat=location.getLatitude();\n\t\tmylong=location.getLongitude();\n\t\tgetData();\n\t\t\n\t}", "public void getCoordinates(){\n\t\t\n\t\t // check if GPS enabled\n GPSTracker gpsTracker = new GPSTracker(this);\n \n if (gpsTracker.canGetLocation())\n {\n latitude = gpsTracker.latitude;\n\n longitude = gpsTracker.longitude;\n }\n else\n {\n // can't get location\n // GPS or Network is not enabled\n // Ask user to enable GPS/network in settings\n gpsTracker.showSettingsAlert();\n }\n\t}", "private void loadData() {\n gps = new GPSTracker(LocationActivity.this);\n if (from.equals(\"home\")) {\n if (lat == 0 && lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n lat = gps.getLatitude();\n lon = gps.getLongitude();\n Log.v(\"lati\", \"lat\" + lat);\n Log.v(\"longi\", \"longi\" + lon);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n } else if (from.equals(\"add\")) {\n if (AddProductDetail.lat == 0 && AddProductDetail.lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n Log.v(\"lati\", \"lat\" + AddProductDetail.lat);\n Log.v(\"longi\", \"longi\" + AddProductDetail.lat);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n }\n\n }", "public static void queryLyftTaskAndStore(LocationAndTime locationAndTime,LyftClientUtil lyftClient){\n Map requestMap=new HashMap<>();\n requestMap.put(\"startLatitude\",locationAndTime.getStartLatitude());\n requestMap.put(\"startLongitude\",locationAndTime.getStartLongitude());\n requestMap.put(\"endLatitude\",locationAndTime.getEndLatitude());\n requestMap.put(\"endLongitude\",locationAndTime.getEndLongitude());\n List<CostEstimate> costEstimates=lyftClient.getCostEstimate(requestMap).getCostEstimates();\n LocalDateTime localDateTime=Instant.ofEpochMilli(locationAndTime.getJourneyStartTime().getTime()).atZone( ZoneId.systemDefault()).toLocalDateTime();\n LocalDateTime now=LocalDateTime.now();\n LocalDateTime toDateTime=LocalDateTime.of( now.getYear(),now.getMonthValue(),now.getDayOfMonth() , localDateTime.getHour(), localDateTime.getMinute(), localDateTime.getSecond());\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n if(costEstimates!=null){\n for(CostEstimate estimate:costEstimates){\n estimate.setCurrentDate(formatter.format(toDateTime.atZone(ZoneId.systemDefault()).toInstant()));\n csvUtilLyft.writeRecordToFile(estimate);\n }\n }\n\n\n }", "public int getHora(){\n return minutosStamina;\n }", "public static void query() {\n\n GPS = \"24.9684297,121.1959266\";\n\n SimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date nowDate = new Date();\n\n String startDayStr = \"2017-01-09\";\n Calendar cal = Calendar.getInstance();\n cal.setTime(nowDate);\n // cal.add(Calendar.MONTH, 3);\n cal.add(Calendar.MONTH, 1);\n String endDayStr = sdFormat.format(cal.getTime());\n\n String query = String.format(\"▽活動搜尋▼▽start_day▼%s▽end_day▼%s\", startDayStr, endDayStr);\n\n System.out.println(\"伺服器狀態測試查詢... \" + query + \" \" + GPS + \" \" + radius);\n Socket client = new Socket();\n InetSocketAddress isa = new InetSocketAddress(address, port);\n try {\n client.connect(isa, 10000);\n\n DataOutputStream out = new DataOutputStream(client.getOutputStream());\n out.writeUTF(query + \" \" + GPS + \" \" + radius + \" \" + whichFucntion + \" \" + \"test \" + quantity);\n client.shutdownOutput();\n ObjectInputStream in = new ObjectInputStream(client.getInputStream());\n Object obj = in.readObject();\n\n//\t\t\tSystem.out.println(obj.toString());\n SearchResultShopData searchResultShopData = (SearchResultShopData) obj;\n ArrayList<ShopData> a = (ArrayList<ShopData>) searchResultShopData.getShopDataList();\n//\t\t\tSystem.out.println(\"searchResultShopData.getStaut() : \" + searchResultShopData.getStaut());\n if (searchResultShopData.getStaut() == 1) {\n for (int i = 0; i < a.size(); i++) {\n if (a.get(i).getSearchEngine().equals(ShopData.SEARCH_ENGINE_ATTRIBUTE_FB_ACTIVITY_SOLR)) {\n FBShopActivityDescription fbShopActivityDescription = (FBShopActivityDescription) a.get(i);\n System.out.println(\"/////////////////////////start////////////////////////\");\n System.out.println(\"活動名稱:\" + fbShopActivityDescription.getTitle());\n System.out.println(\"活動發文連結:\" + fbShopActivityDescription.getHttp());\n System.out.println(\"GPS:\" + fbShopActivityDescription.getLatitude() + \",\" + fbShopActivityDescription.getLongitude());\n System.out.println();\n System.out.println(\"*******************活動摘要資訊********************\");\n System.out.println(\"活動開始時間:\" + fbShopActivityDescription.getStartDate());\n System.out.println(\"活動結束時間:\" + fbShopActivityDescription.getEndDate());\n System.out.println(\"活動地點:\" + fbShopActivityDescription.getAddress());\n System.out.println(\"~~~~~~~~~~~~~~~~~~HighlightFBPost~~~~~~~~~~~~~~~~~~~~\");\n System.out.println(fbShopActivityDescription.getDescription());\n System.out.println(\"////////////////////////end/////////////////////////\");\n System.out.println();\n }\n }\n }\n out.flush();\n out.close();\n out = null;\n in.close();\n in = null;\n client.close();\n client = null;\n } catch (java.io.IOException e) {\n System.err.println(\"SocketClient 連線有問題 !\");\n System.err.println(\"IOException :\" + e.toString());\n } catch (ClassNotFoundException e) {\n System.err.println(\"ClassNotFoundException :\" + e.toString());\n } catch (Exception e) {\n System.err.println(\"Exception :\" + e.toString());\n }\n\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n //Toast.makeText(getApplicationContext(), String.valueOf(location.getLatitude()+\",\"+location.getLongitude()), Toast.LENGTH_SHORT).show();\n retrofitPegarOnibus(location.getLatitude() + \",\" + location.getLongitude());\n coord = location.getLatitude() + \",\" + location.getLongitude();\n } else {\n //Toast.makeText(getApplicationContext(), \"Location = null\", Toast.LENGTH_SHORT).show();\n }\n }", "void getMotionInfo(){\n double degreeDistance = Math.sqrt(Math.pow((startLat - endLat),2) + Math.pow((startLong - endLong),2));\n double R = 6378.137; // Radius of earth in KM\n double dLat = startLat * Math.PI / 180 - endLat* Math.PI / 180;\n dLat = Math.abs(dLat);\n double dLon = startLong * Math.PI / 180 - endLong* Math.PI / 180;\n dLon = Math.abs(dLon);\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(endLat * Math.PI / 180) * Math.cos(startLat* Math.PI / 180) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance;\n distance = R * c;\n distance = distance * 1000f;\n pathDistance = distance;\n degToMRatio = degreeDistance/distance;\n double angle = Math.atan(dLat/dLon);\n xCompMotion = Math.cos(angle);\n yCompMotion = Math.sin(angle);\n totalNumSteps = pathDistance/STEP_LENGTH;\n //Rounds number of steps to nearest whole number\n totalNumSteps = Math.round(totalNumSteps);\n }", "public String getLocation() {\n\t\tString longitude = request.getParameter(\"longitude\");\n\t\tString latitude = request.getParameter(\"latitude\");\n\t\trequest.getSession().setAttribute(\"longitude\", longitude);\n\t\trequest.getSession().setAttribute(\"latitude\", latitude);\n\t\t// 调用登录方法\n\t\tloginCommons.thirdType = \"W\";\n\t\texecute();\n\t\tJSONObject mem = HttpRequestUtils.httpGetx(\"http://1829840kl0.iask.in/cardcolv4/smemberwx!loadMex.asp\");\n\t\trequest.setAttribute(\"member\", mem);\n\t\treturn \"loadMe\";\n\t}", "private void cekStatusGPSpeed() {\n\t\t\n\t\tlokasimanager = (LocationManager) Kecepatan.this.getSystemService(Context.LOCATION_SERVICE);\n\t\t\n\t\tcekGpsNet = new CekGPSNet(Kecepatan.this);\n\t\tisInternet = cekGpsNet.cekStatsInternet();\n\t\tisNetworkNyala = cekGpsNet.cekStatsNetwork();\n\t\tisGPSNyala = cekGpsNet.cekStatsGPS();\n\t\t\n\t\tstatusInternet = cekGpsNet.getKondisiNetwork(isInternet, isNetworkNyala);\n\t\tstatusGPS = cekGpsNet.getKondisiGPS(isGPSNyala);\n\t\t\n\t\tLog.w(\"STATUS GPS INTERNET\", \"GPS \" + statusGPS + \" INTERNET \" + statusInternet);\n\t\t\n\t\tif (statusInternet == CekGPSNet.TAG_NYALA) {\n\t\t\t\n\t\t\tlokasimanager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES , locListNetwork);\n\t\t\tLog.w(\"Network\", \"Network\");\n\t\t\t\n\t\t\tif (lokasimanager != null) {\n\t\t\t\tlocation = lokasimanager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\t\t\t\t\n\t\t\t\tif (location != null) {\n\t\t\t\t\tlatitude = location.getLatitude();\n\t\t\t\t\tlongitude = location.getLongitude();\n\t\t\t\t\t\n\t\t\t\t\tLog.w(\"TAG NETWORK\", \" \" + latitude + \" \" + longitude);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif (statusGPS == CekGPSNet.TAG_NYALA) {\n\t\t\t\n\t\t\tlokasimanager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES , locListGPS);\n\t\t\tLog.w(\"GPS\", \"GPS\");\n\t\t\t\n\t\t\tif (lokasimanager != null) {\n\t\t\t\tlocation = lokasimanager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n\t\t\t\t\n\t\t\t\tif (location != null) {\n\t\t\t\t\tlatitude = location.getLatitude();\n\t\t\t\t\tlongitude = location.getLongitude();\n\t\t\t\t\t\n\t\t\t\t\tLog.w(\"TAG GPS\", \" \" + latitude + \" \" + longitude);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "long getLongitude();", "public void miUbicacion() { //Funcion que recupera la ubicacion\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); //Se accede al sistema para el servicio de locatizacion\n Location location = locationManager.getLastKnownLocation(GPS_PROVIDER); //Se recupera la ultima localizacion conocida\n if(location != null) {\n new DownloadWebPageTask(location).execute(\"http://api.openweathermap.org/data/2.5/weather?lat=\" + location.getLatitude() + \"&lon=\" + location.getLongitude() +\n \"&units=metric&lang=fr&appid=5bdfb081811a28abc515bc673fc0d20f\");\n }\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 20000,0,locListenner); //Esto se hace cada 10s\n }", "double getClientTime();", "public void onPositionChanged() {\n\n latPeriodic = location.getLatitude();\n lonperiodic = location.getLongitude();\n\n }", "public int getLon();", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n wayLatitude = location.getLatitude();\n wayLongitude = location.getLongitude();\n SharedStore.getInstance().save(Double.toString(wayLatitude),\"CurrentLat\");\n SharedStore.getInstance().save(Double.toString(wayLongitude),\"CurrentLong\");\n Log.e(\"getLocation\", String.valueOf(wayLatitude));\n }\n }", "@Override\n public String updateLog() {\n return mylon;\n }", "private static void getWeatherDataForInputValues(BigDecimal lat, BigDecimal lon) throws RemoteException{\n\t\t\n\t\tCalendar time = new GregorianCalendar();\t\t\t\t// Pass this as a GregorianCalendar for the Calendar to understand\n\t\ttime.setTime(new Date());\n\t\tSystem.out.println(\"Fetaching data from SOAP Web Service... Please wait\");\n\t\tString result = proxy.NDFDgen(lat,lon,\"time-series\",time,time,\"e\",wp);\n\t\tDocument dom= convertStringToDocument(result);\n\t\ttry{\n\t\t\t//Displaying the result on the output screen\n\t\t\tXPathFactory xpathFactory = XPathFactory.newInstance();\n\t\t\tXPath xpath = xpathFactory.newXPath();\n\t\t\tSystem.out.println(\"Minimum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='minimum']\")); //print the minimum temp\n\t\t\tSystem.out.println(\"Maximum Temperature: \"+getValuesFromDom(dom,xpath,\"temperature[@type='maximum']\")); // print the maximum temp\n\t\t\tSystem.out.println(\"Wind Direction: \"+getValuesFromDom(dom,xpath,\"direction\")); // print the wind direction\n\t\t\tSystem.out.println(\"Wind Speed: \"+getValuesFromDom(dom,xpath,\"wind-speed\")); // print the wind speed\n\t\t\tSystem.out.println(\"Temperature Dew point: \"+getValuesFromDom(dom,xpath,\"temperature[@type='dew point']\")); // print the dew point temperature\n\t\t\tSystem.out.println(\"12 Hour Probability of Precipitation:\"+getValuesFromDom(dom,xpath,\"probability-of-precipitation\"));\n\t\t\tString command = isRefreshed();\n\t\t\tif(command.trim().toLowerCase().equals(\"yes\")){\n\t\t\t\t\n\t\t\t\tgetWeatherDataForInputValues(lat,lon);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test(priority = 2)\r\n\tpublic void getresponse(){\n\t\t\r\n\t\tString resData = get(\"http://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22\").asString();\t\r\n\t\tSystem.out.println(resData);\r\n\t\t\r\n\t\tlong time = get(\"\").getTime();\r\n\t\t\r\n\t\tSystem.out.println(\"Response time \" + time);\r\n\t}", "private String getURL(int rad) {\n \t\tLocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n \n \t\t// Define a listener that responds to location updates\n \t\tLocationListener locationListener = new LocationListener() {\n \t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t\t// Called when a new location is found by the network location provider.\n \t\t\t\tcurrentLocation = String.valueOf(location.getLatitude()) + \"+\" + String.valueOf(location.getLongitude());\n \t\t\t}\n \n \t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {}\n \n \t\t\tpublic void onProviderEnabled(String provider) {}\n \n \t\t\tpublic void onProviderDisabled(String provider) {}\n \t\t};\n \n \t\t// Register the listener with the Location Manager to receive location updates\n \t\tlocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n \n \t\tfinal String android_id = Secure.getString(getBaseContext().getContentResolver(),\n \t\t\t\tSecure.ANDROID_ID);\n \t\t//final String user = \"aaa\"; //idk how to deal with making users unique right now\n \t\tString url = \"http://18.238.2.68/cuisinestream/phonedata.cgi?user=\"+android_id+\"&location=\"+currentLocation+\"&radius=\"+rad;\n \t\treturn url;\n \t}", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n mLastLocation = location;\n Log.wtf(\"-GPS\", \"getLocation 169 : \" + mLastLocation.getLatitude() + \",\" + mLastLocation.getLongitude());\n\n } else {\n Log.wtf(\"-GPS\", \"getLocation 171 : \" + mLastLocation);\n\n }\n }", "private void gettimes() {\n\t\tCursor c=mydb.rawQuery(\"SELECT * FROM timedata \", null);\n\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata after retriving completed @@@@@@@@@@@@@@@@@@@@@\");\n\t\t c.moveToFirst();\n\t\t \n\t\t if(c!=null)\n\t\t {\n\t\t\t do{\n\t\t\t\t \n\t\t\t\t int c1=c.getColumnIndex(\"fromtime\");\n\t\t\t\t if(c.getCount()>0)\n\t\t\t\t dfromtime=c.getString(c1);\n\t\t\t\t System.out.println(\" $$$$$$$$$$$$$$$$$$$$$$$ fetchdata \"+dfromtime);\n\t\t\t\t int c2=c.getColumnIndex(\"totime\");\n\t\t\t\t dtotime=c.getString(c2);\n\t\t\t\t \n\t\t\t }while(c.moveToNext());\n\t\t\t c.close();\n\t\t\t mydb.close();\n\t\t }\n\t}", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n Toast.makeText(this, currentLatitude + \" - \" + currentLongitude + \"\", Toast.LENGTH_LONG).show();\n String latitude = currentLatitude + \",\";\n String latitudeAndLongitude = latitude + currentLongitude;\n REQUEST_URL_1 += latitudeAndLongitude;\n REQUEST_URL_1 += REQUEST_URL_2;\n ForecastAsyncTask task = new ForecastAsyncTask();\n task.execute(REQUEST_URL_1);\n\n }", "@Override\n\tprotected String doInBackground(Object... params) {\n\t\tString location = (String) params[0];\n\t\tString query = (String) params[1];\n\t\tString updateFlag = (String) params[2];\n\t\ttry {\n\t \n\t\t\t// HTTP経由でアクセスし、InputStreamを取得する\n\t\t\tURL url = new URL(location+\"?\"+query);\n\t\t\tInputStream is = url.openConnection().getInputStream();\n\t\t\tparseXml(is);\n\t\t\t\n\t\t\t//アップデート\n\t\t\tupdateDatabase();\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tonStopExecute();\n \t \tToast.makeText(mActivity,\n \"データの送信に失敗しました\", Toast.LENGTH_SHORT)\n .show();\n \t \treturn null;\n\t\t}\n\t\tcdh.close();\n\t\tlong timeMillisEnd = System.currentTimeMillis(); \n\t\tSimpleDateFormat sdf1 = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n\t\tString updateTime = sdf1.format(new Date(timeMillisEnd));\n\t\treturn updateTime;\n\t}", "public void getDistance() {\n if (curLocation == null) {\n Toast.makeText(getApplicationContext(), \"Retrieving location - Try Again\", Toast.LENGTH_LONG).show();\n return;\n }\n String url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial\" +\n \"&origins=\" + curLocation.latitude + \",\" + curLocation.longitude +\n \"&destinations=\" + dest.latitude + \",\" + dest.longitude +\n \"&mode=walking\" +\n \"&key=\" + getString(R.string.google_maps_key);\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n\n //callback for when get distance returns data\n @Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error retrieving directions\", Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(request);\n }", "@Override\n public void onResponse(String response) {\n\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n\n //obtengo la respuesta del servidor relacionada al contacto, si existe o no\n String Latitud = jObj.getString(\"Latitud\");\n String Longitud = jObj.getString(\"Longitud\");\n String Fecha = jObj.getString(\"Fecha\");\n\n //parseo los datos\n double x_lat = Double.parseDouble(Latitud.toString());\n double x_long = Double.parseDouble(Longitud.toString());\n\n //obtengo los datos de mi ubicacion\n Geocoder geoCoder = new Geocoder(getActivity(), Locale.getDefault());\n try {\n List<Address> addresses = geoCoder.getFromLocation(x_lat, x_long, 1);\n\n\n if (addresses.size() > 0){\n for (int i=0; i<addresses.get(0).getMaxAddressLineIndex();i++) {\n direccionCompleta += addresses.get(0).getAddressLine(i) + \" \";\n }\n }\n\n }catch (Exception e1) {\n e1.printStackTrace();\n }\n\n //\n CENTER = new LatLng(x_lat, x_long);\n\n //mapa\n map = mapView.getMap();\n if (map == null) {\n Toast.makeText(getActivity(), \"Map Fragment Not Found or no Map in it\", Toast.LENGTH_SHORT).show();\n }\n\n //muestro la ubiccion\n map.clear();\n\n final LatLng MELBOURNE = new LatLng(x_lat, x_long);\n Marker melbourne = map.addMarker(new MarkerOptions()\n .position(MELBOURNE)\n .title(\"Ultima Ubicacion Conocida\")\n .snippet(direccionCompleta)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker_icon_2)));\n\n melbourne.showInfoWindow();\n\n txtFecha.setText(\"Ultima actualizacion el \"+Fecha);\n\n map.moveCamera(CameraUpdateFactory.zoomTo(16));\n if (CENTER != null) {\n map.animateCamera(CameraUpdateFactory.newLatLng(CENTER), 1750, null);\n }\n\n\n map.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n map.getUiSettings().setZoomControlsEnabled(true);\n\n } else {\n // Error in login. Get the error message\n String errorMsg = jObj.getString(\"error_msg\");\n Toast.makeText(getActivity(), errorMsg, Toast.LENGTH_LONG).show();\n //logerror = errorMsg;\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getActivity(), \"Json error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n }", "private double[] getGPS() {\n \t\tLocationManager locationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);\n \t\tList<String> providers = locationManager.getProviders(true);\n \t\tLocation location = null;\n \t\tfor (String provider : providers) {\n \t\t\tlocation = locationManager.getLastKnownLocation(provider);\n \t\t\tif (location != null)\n \t\t\t\tbreak;\n \t\t}\n \n \t\tdouble[] gps = new double[2];\n \t\tif (location != null) {\n \t\t\tgps[0] = location.getLatitude();\n \t\t\tgps[1] = location.getLongitude();\n \t\t}\n \t\treturn gps;\n \t}", "public String[] getCurrentTime(){\n return responseData;\n }", "public int getLat();", "public void onLocButton(View view) {\n gps = new GPS(MainActivity.this);\n //Checks if the location services are enabled and permitted\n if(gps.canGetLocation()){\n double lat = gps.getLatitude();\n double lon = gps.getLongitude();\n String URL = apiURL + latURL + lat + lonURL + lon + keyURL;\n Log.d(\"**\", URL);\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, URL, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n Log.d(\"**\", \"Response gained\");\n JSONObject main = response.getJSONObject(\"main\");\n JSONObject coord = response.getJSONObject(\"coord\");\n JSONObject wind = response.getJSONObject(\"wind\");\n JSONObject sys = response.getJSONObject(\"sys\");\n JSONObject clouds = response.getJSONObject(\"clouds\");\n\n weatherData.setCity(response.getString(\"name\"));\n weatherData.setTemp(main.getString(\"temp\"));\n weatherData.setFeelsLike(main.getString(\"feels_like\"));\n weatherData.setHumidity(main.getString(\"humidity\"));\n weatherData.setWind(wind.getString(\"speed\"));\n weatherData.setClouds(clouds.getString(\"all\"));\n weatherData.setPressure(main.getString(\"pressure\"));\n weatherData.setSunrise(sys.getString(\"sunrise\"));\n weatherData.setSunset(sys.getString(\"sunset\"));\n weatherData.setLat(coord.getString(\"lat\"));\n weatherData.setLon(coord.getString(\"lon\"));\n weatherData.setCurrentTime(response.getString(\"dt\"));\n\n Intent goIntent = new Intent(context, TTSActivity.class);\n startActivity(goIntent);\n }\n catch (JSONException e) {\n Log.d(\"**\", \"JSON did not work\");\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"**\", String.valueOf(error));\n }\n });\n queue.add(jsonObjectRequest);\n\n } else {\n gps.showSettingsAlert();\n }\n\n }", "public void parseGPSData(){\n List<String> coordData = new ArrayList<String>();\n for (int i = 6; i < currentMessage.size(); i++){\n // Convert to int to rid ourselves of preceding zeros. Yes, this is bad.\n coordData.add(\n String.valueOf(\n Integer.parseInt(\n bcdToStr(currentMessage.get(i))\n )\n )\n );\n }\n\n String latitudeNorthSouth = (\n bcdToIntString(coordData.get(3)).charAt(1) == '0'\n ) ? \"N\" : \"S\";\n \n String longitudeEastWest = (\n bcdToIntString(coordData.get(8)).charAt(1) == '0'\n ) ? \"E\" : \"W\";\n \n triggerCallback(\"onUpdateGPSCoordinates\",\n String.format(\n \"%.4f%s%s %.4f%s%s\", \n //Latitude\n decimalMinsToDecimalDeg(\n coordData.get(0), coordData.get(1), coordData.get(2)\n ),\n (char) 0x00B0,\n latitudeNorthSouth,\n //Longitude\n decimalMinsToDecimalDeg(\n coordData.get(4) + coordData.get(5),\n coordData.get(6),\n coordData.get(7)\n ),\n (char) 0x00B0,\n longitudeEastWest\n )\n );\n \n // Parse out altitude data which is in meters and is stored as a byte coded decimal\n int altitude = Integer.parseInt(\n bcdToStr(currentMessage.get(15)) + bcdToStr(currentMessage.get(16))\n );\n\n triggerCallback(\"onUpdateGPSAltitude\", altitude);\n \n // Parse out time data which is in UTC\n String gpsUTCTime = String.format(\n \"%s:%s\",\n bcdToIntString(bcdToStr(currentMessage.get(18))),\n bcdToIntString(bcdToStr(currentMessage.get(19)))\n );\n \n triggerCallback(\"onUpdateGPSTime\", gpsUTCTime);\n }", "public long getEventTime();", "BigInteger getResponse_time();", "public WeatherData getCurLocCacheData() {\n return reqCurLocCacheData;\n }", "public Longitude getLongitude (){\n return trackLon;\n }", "public interface GPSMetier {\n JSONEntitie createJSON(String Id, double lat, double lon, boolean isServer);\n String jsonToString(JSONEntitie jsonEntitie);\n JSONEntitie stringToJSON(String jsonString, int codeResponse);\n\n}", "private void getCurrentLocation() {\n progressBar.setVisibility(View.VISIBLE);\n LocationRequest locationRequest = new LocationRequest();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(3000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationServices.getFusedLocationProviderClient(IntroActivity.this).requestLocationUpdates(locationRequest, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n LocationServices.getFusedLocationProviderClient(IntroActivity.this).removeLocationUpdates(this);\n if (locationResult != null && locationResult.getLocations().size() > 0) {\n int latestLocationIndex = locationResult.getLocations().size() - 1;\n double LatOrg = locationResult.getLocations().get(latestLocationIndex).getLatitude();\n double LonOrg = locationResult.getLocations().get(latestLocationIndex).getLongitude();\n\n LatitudeTruePref = Double.toString(LatOrg);\n LongitudeTruePref = Double.toString(LonOrg);\n\n LocationReal = new LatLng(LatOrg, LonOrg);\n tvSkip.setText(String.format(\"Lat: %s\\nLon: %s\", LatitudeTruePref, LongitudeTruePref));\n //tvSkip.setText(String.format(\"Lat: %s\\nLon: %s\", LatOrg, LonOrg));\n }\n FalseLocationSignal = false;//*Desactivar FalseLocation para SharedPreferens*//\n TrueLocationSignal = true;\n progressBar.setVisibility(View.GONE);\n btnNext.setEnabled(true);\n }\n }, Looper.getMainLooper());\n\n }", "protected String doInBackground(Double... args) {\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n /*params.add(new BasicNameValuePair(\"latitude\", Double.toString(latitude)));\n params.add(new BasicNameValuePair(\"longitude\", Double.toString(longitude)));*/\n params.add(new BasicNameValuePair(\"latitude\", Double.toString(args[0])));\n params.add(new BasicNameValuePair(\"longitude\", Double.toString(args[1])));\n JSONObject json = jParser.makeHttpRequest(MapsContract.MapsEntry.url_all_products, \"GET\", params);\n Log.d(\"All Locations: \", json.toString());\n try {\n locations = json.getJSONArray(MapsContract.MapsEntry.TAG_LOCATION);\n for (int i = 0; i < locations.length(); i++) {\n JSONObject c = locations.getJSONObject(i);\n String uid = c.getString(MapsContract.MapsEntry.TAG_UID);\n String distance = c.getString(MapsContract.MapsEntry.TAG_DISTANCE);\n String latitude = c.getString(MapsContract.MapsEntry.TAG_LATITUDE);\n String longitude = c.getString(MapsContract.MapsEntry.TAG_LONGITUDE);\n HashMap<String, String> map = new HashMap<String, String>();\n map.put(MapsContract.MapsEntry.TAG_UID, uid);\n map.put(MapsContract.MapsEntry.TAG_DISTANCE, distance);\n map.put(MapsContract.MapsEntry.TAG_LATITUDE, latitude);\n map.put(MapsContract.MapsEntry.TAG_LONGITUDE, longitude);\n locationList.add(map);\n }\n error += json.toString() + \"From DoInBackground\";\n Thread.sleep(5000);\n } catch (JSONException e) {\n error += e.getLocalizedMessage() + \"JSONExecption\";\n\n } catch (InterruptedException e) {\n error += e.getMessage() + \"InterruptedExeption\";\n }\n //Toast.makeText(getApplicationContext(), json.toString(), Toast.LENGTH_LONG).show();\n return error;\n }", "NameValue getLocation(T data);", "long getRetrievedTime();", "@Override\n\t\tprotected GetWeatherRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getWeatherInfo(cityId, timeStamp);\n\t\t}", "@Override\n\tpublic List<PositionData> getLatest10GpsPositionInfo(String terminalId) {\n\t\ttry {\n\t\t\tList<PositionData> returnData = new ArrayList<PositionData>();\n\t\t\tList<PositionData> tempData = new ArrayList<PositionData>();\n\t\t\tList<PositionData> position_list = new ArrayList<PositionData>();\n\t\t\tposition_list = positionDataDao.findByHQL(\"from PositionData where tid = '\" + terminalId + \"' order by date desc\");\n\t\t\tList<PositionData> gps_list = new ArrayList<PositionData>();\n\t\t\tfor(int i=0;i<position_list.size();i++){\n\t\t\t\tif(position_list.get(i).getInfo().contains(\"GPS状态:GPS定位\"))\n\t\t\t\t\tgps_list.add(position_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=0;i<(gps_list.size()>10?10:gps_list.size());i++){\n\t\t\t\ttempData.add(gps_list.get(i));\n\t\t\t}\n\t\t\tfor(int i=tempData.size()-1;i>=0;i--)\n\t\t\t\treturnData.add(tempData.get(i));\n\t\t\treturn returnData;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }", "@Override\n\tpublic int getPositionDataRefreshMinute() {\n\t\ttry {\n\t\t\tProperties p = new Properties();\n\t\t\tInputStream is=this.getClass().getResourceAsStream(\"/system.properties\"); \n\t\t\tp.load(is); \n\t\t\tis.close();\n\t\t\treturn Integer.parseInt(p.getProperty(\"position_info_refresh_millisecond\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t}\n\t}", "private void getlocation() {\n\t\t\t\ttry {\n\n\t\t\t\t\tgps = new GPSTracker(RegisterActivity.this);\n\t\t\t\t\tLog.d(\"LOgggg\", \"inCurrentlocation\");\n\n\t\t\t\t\t// check if GPS enabled\n\t\t\t\t\tif (gps.canGetLocation()) {\n\n\t\t\t\t\t\tlatitude = gps.getLatitude();\n\t\t\t\t\t\tlongitude = gps.getLongitude();\n\n\t\t\t\t\t\tLog.i(\"latitude\", \"\" + latitude);\n\t\t\t\t\t\tLog.i(\"longitude\", \"\" + longitude);\n\n\t\t\t\t\t\tnew getLoc().execute(\"\");\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgps.showSettingsAlert();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception 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}", "private void initLocationData() {\n\n // init google client and request for fused location provider\n fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);\n\n locationRequest = new LocationRequest()\n //.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) // GPS quality location points\n .setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY) // optimized for battery\n .setInterval(20000) // at least once every 20 seconds\n .setFastestInterval(10000); // at most once every 10 seconds\n\n locationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Point userPoint;\n if (locationResult != null) {\n // update user location\n Location lastLocation = locationResult.getLastLocation();\n userPoint = new Point(lastLocation.getLatitude(), lastLocation.getLongitude());\n // cache location\n PreferencesCache.setLastLatitude(lastLocation.getLatitude());\n PreferencesCache.setLastLongitude(lastLocation.getLongitude());\n } else {\n // get cached data\n userPoint = new Point(PreferencesCache.getLastLatitude(), PreferencesCache.getLastLongitude());\n }\n\n navigator.updateUserLocation(userPoint);\n }\n };\n }", "int getLongitude();", "private void getMyLocation() {\n LatLng latLng = new LatLng(latitude, longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(latLng, 18);\n googleMap.animateCamera(cameraUpdate);\n }", "@Override\n public long curtime() {\n\n long result = -1;\n String response = \"\";\n\n try {\n request = new HttpRequest(HTTP_URL_CURTIME);\n request.configPostType(HttpRequest.MineType.VALUES);\n httpCode = request.post();\n\n if( httpCode == HttpURLConnection.HTTP_OK ) { // 정상.\n response = request.getStringResponse();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n result = Long.valueOf( response );\n\n return result;\n }", "@Override\n public void onLocationChanged(Location location) {\n currentLat = location.getLatitude();\n currentLong = location.getLongitude();\n\n if (location != null) {\n CLocation myLocation = new CLocation(location, true);\n this.updateSpeed(myLocation);\n }\n\n// String originUpdate = getAddressFromLatLng(currentLat, currentLong);\n// //Use Geocoder class to calculate minutes walking from current location.\n// String url = \"https://maps.googleapis.com/maps/api/distancematrix/json?origins=\" + originUpdate + \"&destinations=\" + destinationPassed + \"&mode=walking&language=fr-FR&avoid=tolls&key=AIzaSyBCv-Rz8niwSqwicymjqs_iKinNNsVBAdQ\";\n// Log.d(\"url string\", url);\n// geoTask.execute(url);\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n FusedLocationProviderClient mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n lastLatitude = Double.toString(location.getLatitude());\n lastLongitude = Double.toString(location.getLongitude());\n //lastLocation = Double.toString(location.getLatitude()) + \",\" + Double.toString(location.getLongitude()) ;\n //String b = lastLocation;\n // Get into right format\n // Logic to handle location object\n }\n }", "private void getGpsLocation() {\n Log.d(LOG_TAG, \"In getGpsLocation\");\n mLocationMgr = (LocationManager) mContext.getSystemService(mContext.LOCATION_SERVICE);\n try {\n Location mLocation = mLocationMgr.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (null != mLocation) {\n mLatitude = mLocation.getLatitude();\n mLongitude = mLocation.getLongitude();\n }\n } catch (SecurityException se) {\n Log.d(LOG_TAG, \"Security Exception\", se);\n }\n }", "private void getFlowData() {\n\t\tdbService.getCacheLastUpdated(Tables.STATIONS, new ListCallback<GenericRow>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\tString currentMap = localStorage.getItem(\"KEY_CURRENT_MAP\");\n\t\t\t\tboolean shouldUpdate = true;\n\n\t\t\t\tif (!result.isEmpty()) {\n\t\t\t\t\tdouble now = System.currentTimeMillis();\n\t\t\t\t\tdouble lastUpdated = result.get(0).getDouble(CachesColumns.CACHE_LAST_UPDATED);\n\t\t\t\t\tshouldUpdate = (Math.abs(now - lastUpdated) > (3 * 60000)); // Refresh every 3 minutes.\n\t\t\t\t}\n\n\t\t\t view.showProgressIndicator();\n\t\t\t \n\t\t\t if (!currentMap.equalsIgnoreCase(\"seattle\")) {\n\t\t\t \tshouldUpdate = true;\n\t\t\t\t\tlocalStorage.setItem(\"KEY_CURRENT_MAP\", \"seattle\");\n\t\t\t }\n\t\t\t \n\t\t\t if (shouldUpdate) {\n\t\t\t \ttry {\n\t\t\t \t String url = Consts.HOST_URL + \"/api/flowdata/MinuteDataNW\";\n\t\t\t \t JsonpRequestBuilder jsonp = new JsonpRequestBuilder();\n\t\t\t \t jsonp.setTimeout(30000); // 30 seconds\n\t\t\t \t jsonp.requestObject(url, new AsyncCallback<FlowDataFeed>() {\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t \t\t\t\tview.hideProgressIndicator();\n\t\t\t \t\t\t\tGWT.log(\"Failure calling traffic flow api.\");\n\t\t\t \t\t\t}\n\n\t\t\t \t\t\t@Override\n\t\t\t \t\t\tpublic void onSuccess(FlowDataFeed result) {\n\t\t\t \t\t\t\tstationItems.clear();\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\tif (result.getFlowData() != null) {\n\t\t\t \t\t\t\t\tint numStations = result.getFlowData().getStations().length();\n\t\t\t \t\t\t\t\tString timestamp = result.getFlowData().getTimestamp();\n\t\t\t \t\t\t\t\ttimestamp = timestamp.replaceAll(\"PST|PDT\", \"\");\n\t\t\t \t\t\t\t\tDate date = parseDateFormat.parse(timestamp);\n\t\t\t \t\t\t\t\tString lastUpdated = displayDateFormat.format(date);\n\t\t\t \t\t\t\t\tlocalStorage.setItem(\"KEY_LAST_UPDATED\", lastUpdated);\n\t\t\t \t\t\t\t\tStationItem item;\n\t\t\t \t\t\t\t\t\n\t\t\t \t\t\t\t\tfor (int i = 0; i < numStations; i++) {\n\t\t\t \t\t\t\t\t\tString stationId = result.getFlowData().getStations().get(i).getId();\n\t\t\t \t\t\t\t\t\tString status = result.getFlowData().getStations().get(i).getStat();\n\t\t\t \t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\tif (stationItemsMap.containsKey(stationId) && status.equalsIgnoreCase(\"good\")) {\n\t\t\t\t \t\t\t\t\t\titem = new StationItem();\n\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t \t\t\t\t\t\titem.setId(stationId);\n\t\t\t \t\t\t\t\t\t\titem.setVolume(result.getFlowData().getStations().get(i).getVol());\n\t\t\t \t\t\t\t\t\t\titem.setSpeed(result.getFlowData().getStations().get(i).getSpd());\n\t\t\t \t\t\t\t\t\t\titem.setOccupancy(result.getFlowData().getStations().get(i).getOcc());\n\t\t\t \t\t\t\t\t\t\t\n\t\t\t \t\t\t\t\t\t\tstationItems.add(item);\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\t// Purge existing stations covered by incoming data\n\t\t\t \t\t\t\tdbService.deleteStations(new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t// Bulk insert all the new stations and data.\n\t\t\t\t\t\t\t\t\t\tdbService.insertStations(stationItems, new RowIdListCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\tview.hideProgressIndicator();\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<Integer> rowIds) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Update the cache table with the time we did the update\n\t\t\t\t\t\t\t\t\t\t\t\tList<CacheItem> cacheItems = new ArrayList<CacheItem>();\n\t\t\t\t\t\t\t\t\t\t\t\tcacheItems.add(new CacheItem(Tables.STATIONS, System.currentTimeMillis()));\n\t\t\t\t\t\t\t\t\t\t\t\tdbService.updateCachesTable(cacheItems, new VoidCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Get all the stations and data just inserted.\n\t\t\t\t\t\t\t\t\t\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetStations(result);\n\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\t\t\t\t\t\t\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}\n\t\t\t\t\t\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\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}\n\t\t\t \t\t});\n\n\t\t\t \t} catch (Exception e) {\n\t\t\t \t\t// TODO Do something with the exception\n\t\t\t \t}\n\t\t\t } else {\n\t\t\t \tdbService.getStations(new ListCallback<GenericRow>() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onFailure(DataServiceException error) {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSuccess(List<GenericRow> result) {\n\t\t\t\t\t\t\tgetStations(result);\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\t}\n\t\t});\n\t}", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "public double[] getLocation() {\n return new double[]{longitude,latitude};\n }", "private void getLocation() { \n LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); \n Criteria criteria = new Criteria(); \n criteria.setAccuracy(Criteria.ACCURACY_FINE); \n criteria.setAltitudeRequired(false); \n criteria.setBearingRequired(false); \n criteria.setCostAllowed(true);\n criteria.setPowerRequirement(Criteria.POWER_LOW); \n String provider = locationManager.getBestProvider(criteria,true); \n \n //In order to make sure the device is getting location, request updates. locationManager.requestLocationUpdates(provider, 1, 0, this); \n mostRecentLocation = locationManager.getLastKnownLocation(provider); \n }", "java.lang.String getArrivalTime();", "java.lang.String getArrivalTime();", "synchronized String getLocString() {\n String MSG_TERMINATOR = \";\";\n String DATA_SEPARATOR = \",\";\n\n if (loc == null) {\n return System.currentTimeMillis() + DATA_SEPARATOR + \"No Location!\" + MSG_TERMINATOR;\n }\n\n return String.valueOf(System.currentTimeMillis()) +\n DATA_SEPARATOR +\n loc.getLongitude() +\n DATA_SEPARATOR +\n loc.getLatitude() +\n DATA_SEPARATOR +\n loc.getAltitude() +\n DATA_SEPARATOR +\n loc.getSpeed() +\n DATA_SEPARATOR +\n loc.getBearing() +\n DATA_SEPARATOR +\n loc.getAccuracy() +\n DATA_SEPARATOR +\n loc.getTime() +\n DATA_SEPARATOR +\n providerEnabled.toString() +\n DATA_SEPARATOR +\n lastTemp +\n DATA_SEPARATOR +\n lastGravity +\n DATA_SEPARATOR +\n lastPressure +\n MSG_TERMINATOR;\n }", "private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }", "public static List<OptionItem> consultarRutasByLocation(LatLng point){\n RutaDTO ruta = null;\n OptionItem optItem = null;\n List<OptionItem> options = new ArrayList<OptionItem>();\n HttpClient httpClient = new DefaultHttpClient();\n HttpGet del = new HttpGet(HOST_BACKEND+\"mycityviewBE/rest/ruta/consultar?latitud=\"+point.latitude+\"&longitud=\"+point.longitude);\n del.setHeader(\"content-type\", CONTENT_TYPE);\n del.setHeader(\"Authorization\", getAuthorization().trim());\n try {\n HttpResponse resp = httpClient.execute(del);\n if(resp.getStatusLine().getStatusCode() == HttpStatus.SC_OK){\n String respStr = EntityUtils.toString(resp.getEntity());\n JSONArray jsonArray = new JSONArray(respStr);\n if(jsonArray.length() != 0){\n for (int i=0; i<jsonArray.length(); i++){\n Gson gson = new GsonBuilder().create();\n ruta = gson.fromJson(jsonArray.getJSONObject(i).toString(), RutaDTO.class);\n optItem = new OptionItem(ruta.getNombreRuta(), ruta.getIdRuta());\n optItem.setRutaDTO(ruta);\n options.add(optItem);\n }\n }\n }\n } catch (Exception ex) {\n Log.e(\"ServicioRest\", \"Error!\", ex);\n }\n return options;\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tgetLatLongFromAddress(from);\n\t\t\tgetLatLongToAddress(to);\n\t\t\treturn null;\n\t\t}", "@Cacheable(\"weather\")\r\n\tpublic Weather getWeatherByLatitudeAndLongitude(String lat, String lon) {\n\t\tlogger.info(\"Requesting current weather for {}/{}\", lat, lon);\r\n\t\t\t\t\r\n\t\tURI url = new UriTemplate(WEATHER_URL1).expand(lat, lon, this.apiKey);\r\n\t\treturn invoke(url, Weather.class);\r\n\t}", "void handleWeatherDataForLocation(String lon, String lat);", "private GPS readCSVFileGPS(File file)\n {\n // Delimiter used in CSV file //\n final String COMMA_DELIMITER = \";\";\n\n // Display of times //\n SimpleDateFormat sdf_yyyyMMddTHHmmssZ = new SimpleDateFormat(getString(R.string.sdf_yyyyMMddTHHmmssZ));\n sdf_yyyyMMddTHHmmssZ.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n // GPS data //\n List<DateTime> time = new ArrayList<DateTime>();\n List<LatLng> latitude_longitude = new ArrayList<LatLng>();\n List<Double> elevation = new ArrayList<Double>();\n List<Double> heart_rate = new ArrayList<Double>();\n\n try\n {\n FileInputStream fis = new FileInputStream(file);\n\n if (fis != null)\n {\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader br = new BufferedReader(isr);\n\n String line;\n br.readLine(); // Skip the first line (header) //\n while (( line = br.readLine() ) != null)\n {\n String[] data = line.split(COMMA_DELIMITER);\n if (data.length > 0)\n {\n // Time data //\n try\n {\n time.add(new DateTime(sdf_yyyyMMddTHHmmssZ.parse(data[0])));\n }\n catch (java.text.ParseException e)\n {\n Log.e(\"Exception\", \"Parse error: \" + e.toString());\n }\n\n // Latitude and Longitude data //\n latitude_longitude.add(new LatLng(Double.valueOf(data[1]),Double.valueOf(data[2])));\n\n // Elevation data //\n elevation.add(Double.valueOf(data[3]));\n\n // Heart Rate data //\n heart_rate.add(Double.valueOf(data[4]));\n }\n }\n br.close();\n }\n else\n {\n time = null;\n latitude_longitude = null;\n elevation = null;\n heart_rate = null;\n }\n }\n catch (FileNotFoundException e)\n {\n Log.e(\"Exception\", \"File not found: \" + e.toString());\n }\n catch (IOException e)\n {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n\n // Return a HeartRate object //\n GPS gps = new GPS(time, latitude_longitude, elevation, heart_rate);\n return gps;\n }", "@Override\n public void onLocationChanged(final Location location) {\n // Lay vi tri hien tai cua minh\n myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (firstLocation == true) {\n // Neu day la lan dau co thong tin vi tri thi chuyen camera ve vi tri nay\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n firstLocation = false;\n }\n // Gui vi tri cua minh len server\n String myLocationMessage = String.format(\"{\\\"COMMAND\\\":\\\"MEMBER_CURRENT_LOCATION\\\", \\\"LATITUDE\\\": \\\"%s\\\", \\\"LONGITUDE\\\": \\\"%s\\\"}\", myLocation.latitude, myLocation.longitude);\n OnlineManager.getInstance().sendMessage(myLocationMessage);\n // Refresh danh sach timesheet\n if (tourTimesheetAdapter != null) {\n tourTimesheetAdapter.notifyDataSetChanged();\n }\n }", "public String get_loc_and_direc() {\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n String location = (String) jsonObject.get(\"location\");\n String direction = (String) jsonObject.get(\"direction\");\n return location + \"-\" + direction;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public native void getGeoLocation() /*-{\n\t\tif(null == $wnd.navigator.geolocation) {\n\t\treturn;\n\t\t}\n\n\t\t$wnd.navigator.geolocation.getCurrentPosition(\n\t\t@com.binomed.cineshowtime.client.service.geolocation.Geolocation::geoLocationCallback(Lcom/binomed/cineshowtime/client/service/geolocation/Position;),\n\t\t@com.binomed.cineshowtime.client.service.geolocation.Geolocation::geoLocationCallbackError(Lcom/google/gwt/core/client/JavaScriptObject;),\n\t\t{enableHighAccuracy:true, maximumAge:60000});\n\t}-*/;", "@GetMapping(value=\"/gps\")\n public List<GPSInfo> all() {\n return repository.findAll();\n }", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t\n \t\t\t\t\t}" ]
[ "0.61796665", "0.6173651", "0.611806", "0.60415614", "0.58928514", "0.5875868", "0.5858576", "0.58507264", "0.58415496", "0.57971144", "0.5676616", "0.56706154", "0.56564075", "0.56287", "0.5599673", "0.55862164", "0.55856496", "0.5578117", "0.5560271", "0.55596155", "0.5543637", "0.5512189", "0.5511981", "0.55064213", "0.54963475", "0.5485224", "0.5471441", "0.54647154", "0.5455538", "0.545461", "0.5432787", "0.5401809", "0.53957313", "0.53944373", "0.538973", "0.53867686", "0.5365341", "0.5363058", "0.53616697", "0.53509337", "0.5350331", "0.5349462", "0.5335672", "0.533406", "0.5328137", "0.5323688", "0.5318165", "0.53176695", "0.5316955", "0.5314691", "0.5310664", "0.53003645", "0.5296167", "0.5295275", "0.52869034", "0.52859646", "0.52808845", "0.52735066", "0.5272068", "0.5264918", "0.5261134", "0.52603483", "0.52586484", "0.5255804", "0.52546835", "0.52462476", "0.52401334", "0.52249646", "0.52207834", "0.52185917", "0.5208509", "0.5205912", "0.5201324", "0.5200756", "0.5191531", "0.5191044", "0.5188637", "0.51822454", "0.51797694", "0.51778805", "0.51771873", "0.51731", "0.5171327", "0.51659465", "0.51659465", "0.51645035", "0.5163565", "0.51566994", "0.51566994", "0.51546085", "0.515179", "0.51515317", "0.51489425", "0.5139109", "0.51380485", "0.513547", "0.5135261", "0.5133993", "0.51331294", "0.51282364", "0.5118855" ]
0.0
-1
SET para a data e hora da coleta das coordenadas GPS
public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set_point ( String id,String longitud,String latitud, String id_cliente){\n this.id = id;\n this.longitud=longitud;\n this.latitud=latitud;\n this.id_cliente = id_cliente;\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd HH:mm\");\n fecha= df.format(c.getTime()).toString();\n new define_ubicacion_cliente().execute();\n }", "public void setUserData(double latitude, double longitude, int month, int day, int year, double timezone, int hour, int minutes)\n\t{\n\t\tuserLat = latitude;\n\t\tuserLong = longitude;\n\t\tuserYear = year;\n\t\tuserMonth = month;\n\t\t//********************************************\n\t\t//find local time of the user in decimal form\n\t\t//********************************************\n\t\t//Note hour must be in military time\n\t\tdouble temp = (double)minutes / 60.0;\n\t\tuserLocalTime = hour + temp;\n\t\t\n\t\t//******************************************\n\t\t//find GMT time of the user in decimal form\n\t\t//******************************************\n\t\tdouble userGMT = userLocalTime - timezone;\n\t\tif(userGMT > 24.0)\n\t\t\tuserGMT -= 24.0;\n\t\tif(userGMT < 0.0)\n\t\t\tuserGMT += 24.0;\n\t\t\n\t\t\n\t\t//*****************************************\n\t\t//find the Julian Date based on user input\n\t\t//*****************************************\n\t\tif(month < 3) //adjust date if in Jan or Feb\n\t\t{\n\t\t\tyear -= 1;\n\t\t\tmonth += 12;\n\t\t}\n\t\tuserDecimalDay = (double)day + (userGMT / 24.0);\n\t\tint tempA = (int)(year/100);\n\t\tint tempB = 2 - tempA + (int)(tempA/4);\n\t\tuserJulianDate = (int)(365.25 * year) + (int)(30.6001 * (month + 1)) + userDecimalDay + 1720994.5 + tempB;\n\t\tuserDecimalYear = year + (((30.6001 * (month + 1)) + userDecimalDay)/365.25);\n\t\t//*****************************\n\t\t//adjust star map data to user\n\t\t//*****************************\n\t\tadjustStarData();\n\t\tadjustMessierData();\n\t\tadjustSunAndMoonData(); \n\t\tcreatePlanets();\n\t\tadjustPlanetData();\t\n\t}", "private void setTime(String lat, String lon) {\n mDisposable = mRestRepo\n .getSunriseSunsetApi(lat, lon)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(place -> {\n mTvConnectionError.setText(\"\");\n mTvSunriseTime.setText(place.getSunrise());\n mTvSunsetTime.setText(place.getSunset());\n Log.i(TAG, place.getSunrise() + \" \" + place.getSunset());\n }, throwable -> mTvConnectionError.setText(R.string.error_internet_connection));\n }", "public void setDateAndTime(int d,int m,int y,int h,int n,int s);", "public void setHistoryEntry(long time)\r\n\t{\r\n\t\tif (updatedLat && updatedLng)\r\n\t\t{\r\n\t\t\tAddressLocation al = new AddressLocation();\r\n\t\t\tal.latitude = latitude.doubleValue();\r\n\t\t\tal.longitude = longitude.doubleValue();\r\n\t\t\tal.time = time;\r\n\t\t\tdataStorage.setAddressLocation(al);\r\n\t\t}\r\n\t\t\t\r\n\t}", "private void setMyLatLong() {\n }", "public void setHoraCompra() {\n LocalTime hora=LocalTime.now();\n this.horaCompra = hora;\n }", "protected void setTimestamp(long time) \n {\n\t\tlTimestamp = time;\n\t}", "public void setTime(double time) {_time = time;}", "public void setTime(long time,int ento){ \r\n\t}", "public void setARRIVAL_AT_LOC_TIME(java.sql.Time value)\n {\n if ((__ARRIVAL_AT_LOC_TIME == null) != (value == null) || (value != null && ! value.equals(__ARRIVAL_AT_LOC_TIME)))\n {\n _isDirty = true;\n }\n __ARRIVAL_AT_LOC_TIME = value;\n }", "public static void set(long time) {\n\t\tWorldTime.absoluteTime = time;\n\t}", "public void onPositionChanged() {\n\n latPeriodic = location.getLatitude();\n lonperiodic = location.getLongitude();\n\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n currentLocation = new float[]{(float)location.getLatitude(),(float)location.getLongitude()};\n\n Task<String> timeTask = getExtraTime(p.latOfPerson,p.lonOfPerson);\n if(timeTask!=null){\n timeTask.addOnCompleteListener(new OnCompleteListener<String>() {\n @Override\n public void onComplete(@NonNull Task<String> task) {\n if(task.isSuccessful()){\n String[] s = task.getResult().split(\",\");\n extraTime.setText(\"\"+((-Integer.parseInt(s[1])+Integer.parseInt(s[0])+Integer.parseInt(s[3]))/60)+\" Minutes Extra\");\n }\n }\n });\n }\n }\n }", "private void updateGeo(Double latitude, Double longitude) {\n latitudeValue = latitude;\n longitudeValue = longitude;\n }", "public int getHora(){\n return minutosStamina;\n }", "public void setLatitudeLongitude(Latitude updateLat,Longitude updateLon){\n trackLat = updateLat;\n trackLon = updateLon;\n // if(reportLocation != null){\n String out = trackNumber+\" update received\";\n if(debug){\n System.out.println(\"\\n\\n\"+trackNumber+\" set (update) new the location\");\n System.out.println(\"Set lat lon\"+updateLat.getDegrees () +\" and \"+updateLon.getDegrees ());\n }\n\n eventLogger.log(\" \");\n eventLogger.log(out);\n\n Constant.othGoldOutput.println (\"\");\n Constant.othGoldOutput.println (out);\n Constant.othGoldOutput .flush ();\n\n if(reportLocation != null){\n\n EventHandle[] reportLoc = ECAAgent.getEventHandles(reportLocationEventName);\n PrimitiveEventHandle peh = (PrimitiveEventHandle)beginCountDn;\n\n peh.insert(\"TimeStamp\",(Object)TrackUtilities.getTimeStamp());\n ECAAgent.getDefaultECAAgent().raiseEndEvent(reportLoc,this);\n beginCountDown();\n }\n return ;\n }", "public static void addPosition (String poiname, String datetime, String latitude, String lontitude) {\n\t\ttry {\n\t\t\tint\tpoi_id = storage.createPoi(poiname, latitude, lontitude, 1, databox_id);\n\t\t\tint poiext_status = storage.createPoiExt(\"locate_time\", datetime);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t}", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "private void setLocationData(Location location){\r\n currentLat = location.getLatitude();\r\n currentLng = location.getLongitude();\r\n }", "void setTime() {\n\t\tCalendar now = Calendar.getInstance();\n\t\tangleHours = (270 + 30 * now.get(now.HOUR) + now.get(now.MINUTE) / 2 ) % 360;\n\t\tangleMinutes = (270 + 6 * now.get(now.MINUTE)) % 360;\n\t\tangleSeconds = (270 + 6 * now.get(now.SECOND)) % 360;\n\t}", "public void setWorldTime(long time)\n {\n worldTime = time;\n }", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "public void setLocation(){\n //Check if user come from notification\n if (getIntent().hasExtra(EXTRA_PARAM_LAT) && getIntent().hasExtra(EXTRA_PARAM_LON)){\n Log.d(TAG, \"Proviene del servicio, lat: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LAT) + \" - lon: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LON));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getIntent().getExtras().getDouble(EXTRA_PARAM_LAT), getIntent().getExtras().getDouble(EXTRA_PARAM_LON)), 18));\n NotificationManager mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNM.cancel(1);\n } else{\n if (bestLocation!=null){\n Log.d(TAG, \"Posicion actual -> LAT: \"+ bestLocation.getLatitude() + \" LON: \" + bestLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(bestLocation.getLatitude(), bestLocation.getLongitude()), 16));\n } else{\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(41.651981, -4.728561), 16));\n }\n }\n }", "private void setDailyValues(){\n //set updateTime\n SimpleDateFormat t = new SimpleDateFormat(\"h:mm:ss a\");\n updatedTime = \"Last updated: \" + t.format(new Date(System.currentTimeMillis()));\n \n //set maxTemp and minTemp\n maxTemp = Integer.toString(weather.getMaxTemp());\n minTemp = Integer.toString(weather.getMinTemp());\n \n //set sunriseTime and sunsetTime\n SimpleDateFormat sr = new SimpleDateFormat(\"h:mm a\");\n sunriseTime = sr.format(new Date(weather.getSunrise()*1000));\n SimpleDateFormat ss = new SimpleDateFormat(\"h:mm a\");\n sunsetTime = sr.format(new Date(weather.getSunset()*1000));\n }", "private void refreshTime(@Nullable Location location) {\n String provider = location == null ? \"\" : location.getProvider();\n String lat = location == null ? \"\" : formatCoordinate(location.getLatitude());\n String lon = location == null ? \"\" : formatCoordinate(location.getLongitude() * -1);\n\n Log.i(TAG, provider + \" \" + lat + \" \" + lon);\n setTime(lat, lon);\n }", "public abstract void setFecha_ingreso(java.sql.Timestamp newFecha_ingreso);", "@Override\n public String updateLog() {\n return mylon;\n }", "void setLatitude(Double latitude);", "public static void setGpsParameters(Parameters parameters, Location loc) {\n\t\tparameters.removeGpsData();\n\n\t\t// We always encode GpsTimeStamp\n\t\tparameters.setGpsTimestamp(System.currentTimeMillis() / 1000);\n\n\t\t// Set GPS location.\n\t\tif (loc != null) {\n\t\t\tdouble lat = loc.getLatitude();\n\t\t\tdouble lon = loc.getLongitude();\n\t\t\tboolean hasLatLon = (lat != 0.0d) || (lon != 0.0d);\n\n\t\t\tif (hasLatLon) {\n\t\t\t\tLog.d(TAG, \"Set gps location\");\n\t\t\t\tparameters.setGpsLatitude(lat);\n\t\t\t\tparameters.setGpsLongitude(lon);\n\t\t\t\tparameters.setGpsProcessingMethod(loc.getProvider()\n\t\t\t\t\t\t.toUpperCase(Locale.US));\n\t\t\t\tif (loc.hasAltitude()) {\n\t\t\t\t\tparameters.setGpsAltitude(loc.getAltitude());\n\t\t\t\t} else {\n\t\t\t\t\t// for NETWORK_PROVIDER location provider, we may have\n\t\t\t\t\t// no altitude information, but the driver needs it, so\n\t\t\t\t\t// we fake one.\n\t\t\t\t\tparameters.setGpsAltitude(0);\n\t\t\t\t}\n\t\t\t\t// if (loc.getTime() != 0) {\n\t\t\t\t// Location.getTime() is UTC in milliseconds.\n\t\t\t\t// gps-timestamp is UTC in seconds.\n\t\t\t\t// long utcTimeSeconds = loc.getTime() / 1000;\n\t\t\t\t// parameters.setGpsTimestamp(utcTimeSeconds);\n\t\t\t\t// }\n\t\t\t} else {\n\t\t\t\tloc = null;\n\t\t\t}\n\t\t}\n\t}", "public static void main (String[] args)\r\n {\n Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795),\r\n\t\t\t 481742, 4770800, 700, (byte)29, true);\r\n //System.out.println(\"lon=\"+utm.getLon()+\" lat=\"+utm.getLat());\r\n //System.out.println(utm.getGrados(utm.getLon())+\"¦ \"+utm.getMinutos(utm.getLon())+\"' \"+utm.getSegundos(utm.getLon())+\"\\\" \"+utm.getGrados(utm.getLat())+\"¦ \"+utm.getMinutos(utm.getLat())+\"' \"+utm.getSegundos(utm.getLat())+\"\\\"\");\r\n @SuppressWarnings(\"unused\")\r\n Coordenada res;\r\n res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518));\r\n\r\n //System.out.println(\"Coordenadas en Datum destino: X=\"+res.X+\" Y=\"+res.Y);\r\n //System.out.println(\"lon=\"+res.getLon()+\" lat=\"+res.getLat());\r\n //System.out.println(res.getGrados(res.getLon())+\"¦ \"+res.getMinutos(res.getLon())+\"' \"+res.getSegundos(res.getLon())+\"\\\" \"+res.getGrados(res.getLat())+\"¦ \"+res.getMinutos(res.getLat())+\"' \"+res.getSegundos(res.getLat())+\"\\\"\");\r\n\t\t\t\t \r\n }", "public void set_infos_timestamp(long value) {\n setUIntBEElement(offsetBits_infos_timestamp(), 32, value);\n }", "void setLongitude(Double longitude);", "public void setTime(long time)\n {\n this.time = time;\n\n }", "@DSSafe(DSCat.UTIL_FUNCTION)\n \n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:11.275 -0500\", hash_original_method = \"58DD96CFC8DDA00016DEC24CC6519017\", hash_generated_method = \"1F810C618BA62488684578EB05C3C6A1\")\n \n@Override\n public void setTime(long theTime) {\n /*\n * Store the Date based on the supplied time after removing any time\n * elements finer than the day based on zero GMT\n */\n super.setTime(normalizeTime(theTime));\n }", "public void setMovementDate (Timestamp MovementDate);", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "public static void setModemTemperatureTimestamp(long time) {\n\t\t\n\t}", "public void setDateHeure(Long p_odateHeure);", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "@Override\n public void onLocationChanged(Location location) {\n\n clientlat = location.getLatitude();\n clientlon = location.getLongitude();\n System.out.println(\"latitude is \"+clientlat);\n System.out.println(\"longitude is \"+clientlon);\n }", "private void onChange() {\n startTime = -1L;\n endTime = -1L;\n minLat = Double.NaN;\n maxLat = Double.NaN;\n minLon = Double.NaN;\n maxLon = Double.NaN;\n }", "@Override\n public void onLocationChanged(final Location location) {\n // Lay vi tri hien tai cua minh\n myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (firstLocation == true) {\n // Neu day la lan dau co thong tin vi tri thi chuyen camera ve vi tri nay\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n firstLocation = false;\n }\n // Gui vi tri cua minh len server\n String myLocationMessage = String.format(\"{\\\"COMMAND\\\":\\\"MEMBER_CURRENT_LOCATION\\\", \\\"LATITUDE\\\": \\\"%s\\\", \\\"LONGITUDE\\\": \\\"%s\\\"}\", myLocation.latitude, myLocation.longitude);\n OnlineManager.getInstance().sendMessage(myLocationMessage);\n // Refresh danh sach timesheet\n if (tourTimesheetAdapter != null) {\n tourTimesheetAdapter.notifyDataSetChanged();\n }\n }", "public void setDEPARTURE_FROM_LOC_TIME(java.sql.Time value)\n {\n if ((__DEPARTURE_FROM_LOC_TIME == null) != (value == null) || (value != null && ! value.equals(__DEPARTURE_FROM_LOC_TIME)))\n {\n _isDirty = true;\n }\n __DEPARTURE_FROM_LOC_TIME = value;\n }", "public int actualizarTiempo(int empresa_id,int idtramite, int usuario_id) throws ParseException {\r\n\t\tint update = 0;\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\tString timeNow = formateador.format(date);\r\n\t\tSimpleDateFormat formateador2 = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString fecha = formateador2.format(date);\r\n\t\tSimpleDateFormat formateador3 = new SimpleDateFormat(\"hh:mm:ss\");\r\n\t\tString hora = formateador3.format(date);\r\n\t\tSystem.out.println(timeNow +\" \"+ fecha+\" \"+hora );\r\n\t\t\r\n\t\t List<Map<String, Object>> rows = listatks(empresa_id, idtramite);\t\r\n\t\t System.out.println(rows);\r\n\t\t if(rows.size() > 0 ) {\r\n\t\t\t String timeCreate = rows.get(0).get(\"TIMECREATE_HEAD\").toString();\r\n\t\t\t System.out.println(\" timeCreate \" +timeCreate+\" timeNow: \"+ timeNow );\r\n\t\t\t Date fechaInicio = formateador.parse(timeCreate); // Date\r\n\t\t\t Date fechaFinalizo = formateador.parse(timeNow); //Date\r\n\t\t\t long horasFechas =(long)((fechaInicio.getTime()- fechaFinalizo.getTime())/3600000);\r\n\t\t\t System.out.println(\" horasFechas \"+ horasFechas);\r\n\t\t\t long diferenciaMils = fechaFinalizo.getTime() - fechaInicio.getTime();\r\n\t\t\t //obtenemos los segundos\r\n\t\t\t long segundos = diferenciaMils / 1000;\t\t\t \r\n\t\t\t //obtenemos las horas\r\n\t\t\t long horas = segundos / 3600;\t\t\t \r\n\t\t\t //restamos las horas para continuar con minutos\r\n\t\t\t segundos -= horas*3600;\t\t\t \r\n\t\t\t //igual que el paso anterior\r\n\t\t\t long minutos = segundos /60;\r\n\t\t\t segundos -= minutos*60;\t\t\t \r\n\t\t\t System.out.println(\" horas \"+ horas +\" min\"+ minutos+ \" seg \"+ segundos );\r\n\t\t\t double tiempoTotal = Double.parseDouble(horas+\".\"+minutos);\r\n\t\t\t // actualizar cabecera \r\n\t\t\t updateHeaderOut( idtramite, fecha, hora, tiempoTotal, usuario_id);\r\n\t\t\t for (Map<?, ?> row : rows) {\r\n\t\t\t\t Map<String, Object> mapa = new HashMap<String, Object>();\r\n\t\t\t\tint idd = Integer.parseInt(row.get(\"IDD\").toString());\r\n\t\t\t\tint idtramite_d = Integer.parseInt(row.get(\"IDTRAMITE\").toString());\r\n\t\t\t\tint cantidaMaletas = Integer.parseInt(row.get(\"CANTIDAD\").toString());\r\n\t\t\t\tdouble precio = Double.parseDouble(row.get(\"PRECIO\").toString());\t\t\t\t\r\n\t\t\t\tdouble subtotal = subtotal(precio, tiempoTotal, cantidaMaletas);\r\n\t\t\t\tString tipoDescuento = \"\";\r\n\t\t\t\tdouble porcDescuento = 0;\r\n\t\t\t\tdouble descuento = descuento(subtotal, porcDescuento);\r\n\t\t\t\tdouble precioNeto = precioNeto(subtotal, descuento);\r\n\t\t\t\tdouble iva = 0;\r\n\t\t\t\tdouble montoIVA = montoIVA(precioNeto, iva);\r\n\t\t\t\tdouble precioFinal = precioFinal(precioNeto, montoIVA);\r\n\t\t\t\t//actualizar detalle\r\n\t\t\t\tupdateBodyOut( idd, idtramite_d, tiempoTotal , subtotal, tipoDescuento, porcDescuento, descuento, precioNeto, iva, montoIVA, precioFinal );\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\treturn update;\r\n\t}", "public boolean setGPS(String longitude, String latitude);", "public void setDia_especifico(java.sql.Timestamp newDia_especifico);", "public void setTime(){\r\n \r\n }", "public void setLon(double value) {\n lon = value;\n }", "@Override\n\tpublic void onLocationChanged(Location location) {\n\t\tmylat=location.getLatitude();\n\t\tmylong=location.getLongitude();\n\t\tgetData();\n\t\t\n\t}", "long getTimeSinceLastSet(Coordinates coord, double horizon, long time) throws AstrometryException;", "public void set(final long timeValue) {\n stamp = timeValue;\n }", "@Override\npublic void onLocationChanged(Location location) {\nString lat = String.valueOf(location.getLatitude());\nString lon = String.valueOf(location.getLongitude());\nLog.e(\"GPS\", \"location changed: lat=\"+lat+\", lon=\"+lon);\n//tv.setText(\"lat=\"+lat+\", lon=\"+lon);\nLatLng coordinates = new LatLng(location.getLatitude(), location.getLongitude()); \nmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(coordinates, 12));\n\n\n//Update Value of Lat Long\n}", "public void setHora(LocalTime hora) {\n\t\tthis.hora = hora;\n\t}", "public void setTime(int time)\n {\n this.time = time;\n start = time;\n end = time;\n }", "public void setHora(int hora, int minutos, int segundos)\r\n\t{\r\n\t\tthis.reloj.setTime(hora,minutos,segundos,00);\r\n\t}", "public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}", "public void setTime(long time) {\n this.time = time;\n }", "public void setTime(long time) {\r\n this.time = time;\r\n }", "public static void setCurrentLocation(Double lat, Double lng ){\n //SharedPreferences sharedPreferences1=appCompatActivity. getSharedPreferences(\"longitude\", MODE_PRIVATE) ;\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(USER_LTD, String.valueOf(lat));\n editor.putString(USER_LNG, String.valueOf(lng));\n editor.apply();\n }", "@Override\n\tpublic int getPositionDataRefreshMinute() {\n\t\ttry {\n\t\t\tProperties p = new Properties();\n\t\t\tInputStream is=this.getClass().getResourceAsStream(\"/system.properties\"); \n\t\t\tp.load(is); \n\t\t\tis.close();\n\t\t\treturn Integer.parseInt(p.getProperty(\"position_info_refresh_millisecond\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t}\n\t}", "public void setTime(Long time) {\n this.time = time;\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n wayLatitude = location.getLatitude();\n wayLongitude = location.getLongitude();\n SharedStore.getInstance().save(Double.toString(wayLatitude),\"CurrentLat\");\n SharedStore.getInstance().save(Double.toString(wayLongitude),\"CurrentLong\");\n Log.e(\"getLocation\", String.valueOf(wayLatitude));\n }\n }", "public void setTime(Date time) {\r\n this.time = time;\r\n }", "public void setTime(Date time) {\r\n this.time = time;\r\n }", "public void setTime(Date time) {\r\n this.time = time;\r\n }", "public void setHour(int nHour) { m_nTimeHour = nHour; }", "@Override\n public String updateLat() {\n return mylat;\n }", "public abstract void setFecha_fin(java.sql.Timestamp newFecha_fin);", "public void setLocation(Coordinate coordinate);", "private void comenzarLocalizacion()\n {\n \tlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n \t\n \t//Obtiene Ultima Ubicacion\n \t//Location loc = locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n \t \t\n \t//Nos registramos para recibir actualizaciones de la posici�n\n \tlocListener = new LocationListener() {\n\t \tpublic void onLocationChanged(Location location) {\n\t \t\t\n\t \t}\n\t \tpublic void onProviderDisabled(String provider){\n\t \t\t\n\t \t}\n\t \tpublic void onProviderEnabled(String provider){\n\t \t\n\t \t}\n\t \tpublic void onStatusChanged(String provider, int status, Bundle extras){\n\t \t\n\t \t\t\n\t \t}\n \t};\n \t\n \tlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 30000, 0, locListener);\n }", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "public void setTimeInNs(long r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.setTimeInNs(long):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setTimeInNs(long):void\");\n }", "@Override\r\n public void setTimeStamp(long parseLong) throws IOException {\n\r\n }", "public void gotLocation(Location location){\r\n \tif(location!=null){\r\n\t \tConstants.gpslat = location.getLatitude()+\"\";\r\n\t Constants.gpslng = location.getLongitude()+\"\";\r\n\t Log.d(\"location changed: lattitue & longitude\",Constants.gpslat+\" & \"+Constants.gpslng);\r\n \t}\r\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setMontoEstimado(double param){\n \n this.localMontoEstimado=param;\n \n\n }", "public void setTimestamp() {\n timestamp = System.nanoTime();\n }", "void MontaValores(){\r\n // 0;0;-23,3154166666667;-51,1447783333333;0 // Extrai os valores e coloca no objetos\r\n // Dis;Dir;Lat;Long;Velocidade\r\n // Quebra de Rota lat=-999.999 long=-999.999 ==> Marca ...\r\n \r\n int ind=0;\r\n NMEAS=NMEA.replace(\",\" , \".\");\r\n \r\n //1)\r\n dists=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind));\r\n Distancia=Double.valueOf(dists);\r\n ind=ind+dists.length()+1;\r\n \r\n //2)\r\n dirs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Direcao=Double.valueOf(dirs);\r\n ind=ind+dirs.length()+1;\r\n \r\n //3)\r\n lats=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Lat=Double.valueOf(lats);\r\n ind=ind+lats.length()+1;\r\n \r\n //4)\r\n longs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Long=Double.valueOf(longs);\r\n ind=ind+longs.length()+1;\r\n \r\n //5)\r\n vels=NMEAS.substring(ind,NMEAS.length());\r\n // Transforma de Knots para Km/h\r\n Velocidade=Double.valueOf(vels)/100*1.15152*1.60934;\r\n vels=String.valueOf(Velocidade);\r\n ind=ind+vels.length()+1;\r\n \r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void updateData(String _user, String _time, double _x, double _y)\n\t{\n\t\t//update the new time and location send from the headers\n\t\tPersistenceManager pm = PMF.getPM();\n\t\tUser phone = null;\n\t\tString query = \"select from \" + User.class.getName() + \" where user == '\"+_user+\"'\";\n\t\tList<User> phones = (List<User>) pm.newQuery(query).execute();\n\t\tfor (User p : phones)\n\t\t{\n\t\t\tphone = new User(p.getUserName());\n\t\t\t\n\t\t}\n\t\t\n\t\tPersistenceManager pmm = PMF.getPM();\n\t\tQuery query2 = pmm.newQuery(User.class);\n\t\tquery2.deletePersistentAll();\n\t\t\n\t\ttry \n\t\t{\n\t\t pm.makePersistent(phone);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t pm.close();\n\t\t}\n\t}", "public void setLatitud(String latitud);", "@Override\n public void onLocationChanged(Location location) {\n lat=location.getLatitude();\n Log.e(\"MyLat\",Double.toString(lat));\n lng=location.getLongitude();\n Log.e(\"Mylongitude\",Double.toString(lng));\n /* houni c'est bon khdhina el lat w longitude\n donc just taamel el requete li bch tarmiha fel base\n */\n Toast.makeText(this,Double.toString(lng),Toast.LENGTH_LONG).show();\n\n }", "public abstract void setDate(Timestamp uneDate);", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t\n \t\t\t\t\t}", "private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }", "@Override\n public void onLocationChanged(Location location) {\n t.append(\"\\n \" + location.getLongitude() + \"\\n\" + location.getLatitude() + \"\\n\" + location.getAccuracy() + \"\\n\" + location.getTime());\n latitude = Double.toString(location.getLatitude());\n longitude =Double.toString(location.getLongitude());\n }", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t}", "public void setTime(String time) {\n }", "public void realTimeUpdate() {\n if ( millis() - lastTime >= 60000 ) {\n // *Load all_hour data\n eqData.init(hourURL);\n eqData.update(hour);\n println( \"all_hour data updated!\" );\n isHour = true;\n lastTime = millis();\n }\n}", "@Override\n public void onClick(View v) {\n SubPlanListDTO llh = (SubPlanListDTO)v.getTag();\n //Toast.makeText(getApplicationContext(),\"위치 x=\"+llh.getLlh_x()+\"y=\"+llh.getLlh_y(),Toast.LENGTH_SHORT).show();\n ////여기수정하면됨......\n Date date = new Date();\n SimpleDateFormat transFormat = new SimpleDateFormat(\"HH:mm\");\n String to = transFormat.format(date);\n System.out.println(to);\n\n String tos[] = to.split(\":\");\n String times[] = llh.getTime().split(\"~\");\n String start_times[] = times[0].split(\":\");\n String end_times[] = times[1].split(\":\");\n\n lat2 = Double.parseDouble(llh.getLlh_x());\n lon2 = Double.parseDouble(llh.getLlh_y());\n gps = new GpsInfo(ToDayListSubplan.this);\n\n if(Integer.parseInt(tos[0]) == Integer.parseInt(start_times[0])){\n if(Integer.parseInt(tos[1])>=Integer.parseInt(start_times[1])){\n // GPS 사용유무 가져오기\n if (gps.isGetLocation()) {\n\n double latitude = gps.getLatitude();\n double longitude = gps.getLongitude();\n lat1 = latitude;\n lon1 = longitude;\n //txtLat.setText(String.valueOf(latitude));\n //txtLon.setText(String.valueOf(longitude));\n\n if(calDistance(lat1,lon1,lat2,lon2) <= 500){\n Toast.makeText(\n getApplicationContext(),\n \"당신의 위치1 - \\n위도: \" + latitude + \"\\n경도: \" + longitude+\"\\n 위치비교값:\"+calDistance(lat1,lon1,lat2,lon2)+\"\",\n Toast.LENGTH_LONG).show();\n\n int sub_num = llh.getSub_num();\n\n String requestURL = \"http://192.168.14.45:8805/meto/and/schedule/getGPS.do\";\n\n //HttpClient client = new DefaultHttpClient();\n HttpClient client = SessionControl.getHttpclient();\n HttpPost post = new HttpPost(requestURL);\n List<NameValuePair> paramList = new ArrayList<>();\n\n paramList.add(new BasicNameValuePair(\"sub_num\", String.valueOf(sub_num)));\n\n try {\n post.setEntity(new UrlEncodedFormEntity(paramList, \"UTF-8\"));\n HttpResponse response = client.execute(post);\n HttpEntity entity = response.getEntity();\n //Toast.makeText(getApplicationContext(), \"flag 확인 \"+flag,Toast.LENGTH_SHORT).show();\n\n Log.d(\"서브넘버 보냈쨔냐 \", \"\"+sub_num);\n } catch(Exception e) {\n Log.d(\"sendPost===> \", e.toString());\n }\n } else {\n Toast.makeText(\n getApplicationContext(),\n \"당신의 위치에서 500m 사이 거리가 아닙니다.\",\n Toast.LENGTH_LONG).show();\n }\n } else {\n // GPS 를 사용할수 없으므로\n gps.showSettingsAlert();\n }\n }\n } else if(Integer.parseInt(tos[0]) == Integer.parseInt(end_times[0])){\n if(Integer.parseInt(tos[1])<=Integer.parseInt(end_times[1])){\n // GPS 사용유무 가져오기\n if (gps.isGetLocation()) {\n\n double latitude = gps.getLatitude();\n double longitude = gps.getLongitude();\n lat1 = latitude;\n lon1 = longitude;\n //txtLat.setText(String.valueOf(latitude));\n //txtLon.setText(String.valueOf(longitude));\n if(calDistance(lat1,lon1,lat2,lon2) <= 500){\n Toast.makeText(\n getApplicationContext(),\n \"당신의 위치2 - \\n위도: \" + latitude + \"\\n경도: \" + longitude+\"\\n 위치비교값:\"+calDistance(lat1,lon1,lat2,lon2)+\"\",\n Toast.LENGTH_LONG).show();\n\n int sub_num = llh.getSub_num();\n\n String requestURL = \"http://192.168.14.45:8805/meto/and/schedule/getGPS.do\";\n\n //HttpClient client = new DefaultHttpClient();\n HttpClient client = SessionControl.getHttpclient();\n HttpPost post = new HttpPost(requestURL);\n List<NameValuePair> paramList = new ArrayList<>();\n\n paramList.add(new BasicNameValuePair(\"sub_num\", String.valueOf(sub_num)));\n\n try {\n post.setEntity(new UrlEncodedFormEntity(paramList, \"UTF-8\"));\n HttpResponse response = client.execute(post);\n HttpEntity entity = response.getEntity();\n //Toast.makeText(getApplicationContext(), \"flag 확인 \"+flag,Toast.LENGTH_SHORT).show();\n\n Log.d(\"서브넘버 보냈쨔냐 \", \"\"+sub_num);\n } catch(Exception e) {\n Log.d(\"sendPost===> \", e.toString());\n }\n }\n\n } else {\n // GPS 를 사용할수 없으므로\n gps.showSettingsAlert();\n }\n }\n }\n\n\n }", "public void setTimeOfLastValuesChanged(long millis);" ]
[ "0.64323324", "0.6417064", "0.6291466", "0.59867084", "0.5926996", "0.5805794", "0.58006376", "0.5783768", "0.5767684", "0.5754527", "0.56999964", "0.56932724", "0.5680061", "0.5668208", "0.56626487", "0.56332284", "0.5632251", "0.56032795", "0.56024224", "0.5597268", "0.5590089", "0.5580539", "0.5576583", "0.55732304", "0.55661595", "0.55443627", "0.5530275", "0.5521426", "0.5518704", "0.5514667", "0.5501567", "0.5500356", "0.54711574", "0.54602", "0.5448222", "0.5435314", "0.54304576", "0.542954", "0.542954", "0.542954", "0.5418978", "0.5418891", "0.53998613", "0.5398031", "0.5396427", "0.53807026", "0.5378872", "0.5367943", "0.5363468", "0.53587836", "0.5347644", "0.5342816", "0.53409487", "0.5336228", "0.5321547", "0.53212976", "0.53180146", "0.5317019", "0.531647", "0.5316033", "0.5312867", "0.53101116", "0.53079385", "0.53062695", "0.53027856", "0.5300478", "0.5297416", "0.5297416", "0.5297416", "0.5292681", "0.5290178", "0.52864015", "0.52805305", "0.5273533", "0.5272415", "0.5271249", "0.526715", "0.52669525", "0.52660656", "0.52660656", "0.52660656", "0.52660656", "0.5260657", "0.5260657", "0.5260657", "0.5260657", "0.5257482", "0.52493364", "0.5246433", "0.5233427", "0.52316713", "0.52274096", "0.52263296", "0.52205557", "0.5219163", "0.521438", "0.52121353", "0.5210834", "0.5209611", "0.52052206", "0.52006316" ]
0.0
-1
These must be initialized in the runOpmode
@Override public void runOpMode() { hw = new RobotHardware(robotName, hardwareMap); rd = new RobotDrive(hw); rs=new RobotSense(hw, telemetry); /*rd.moveDist(RobotDrive.Direction.FORWARD, .5, .3); rd.moveDist(RobotDrive.Direction.REVERSE, .5, .3); rd.moveDist(RobotDrive.Direction.FORWARD, .5, 1); rd.moveDist(RobotDrive.Direction.REVERSE, .5, 1);*/ telemetry.addData("Ready! ", "Go Flamangos!"); telemetry.update(); //Starting the servos in the correct starting position /*hw.armRight.setPosition(1-.3); hw.armLeft.setPosition(.3); hw.level.setPosition(.3+.05);*/ hw.f_servoLeft.setPosition(1); hw.f_servoRight.setPosition(0.5); rd.moveArm(hw.startPos()); waitForStart(); while (opModeIsActive()) { /*Starting close to the bridge on the building side Move under the bridge and push into the wall*/ rd.moveDist(RobotDrive.Direction.LEFT,2,.5); rd.moveDist(RobotDrive.Direction.FORWARD, 10, .5); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initOperation() {\n\t\tinitialized = true;\r\n\t}", "@Override\n public abstract void runOpMode();", "private cudaComputeMode()\r\n {\r\n }", "private void initOperationMode() throws IllegalArgumentException {\n String writeModeStr = getProperties().getProperty(WRITE_MODE, \"single\");\n String readModeStr = getProperties().getProperty(READ_MODE, \"single\");\n String sortKeysCountStr = getProperties().getProperty(SORT_KEY_COUNT, \"10\");\n\n int count = Integer.parseInt(sortKeysCountStr);\n startSortKey = String.valueOf(0).getBytes();\n stopSortKey = String.valueOf(count).getBytes();\n while ((--count) >= 0) {\n sortKeys.add(String.valueOf(count).getBytes());\n }\n\n if (writeModeStr.equals(\"single\") && readModeStr.equals(\"single\")) {\n writeMode = WriteMode.SINGLE;\n readMode = ReadMode.SINGLE;\n } else if (writeModeStr.equals(\"batch\") && readModeStr.equals(\"batch\")) {\n writeMode = WriteMode.BATCH;\n readMode = ReadMode.BATCH;\n } else if (writeModeStr.equals(\"multi\") && readModeStr.equals(\"multi\")) {\n writeMode = WriteMode.MULTI;\n readMode = ReadMode.MULTI;\n } else if (writeModeStr.equals(\"multi\") && readModeStr.equals(\"batch\")) {\n writeMode = WriteMode.MULTI;\n readMode = ReadMode.BATCH;\n } else if (writeModeStr.equals(\"multi\") && readModeStr.equals(\"range\")) {\n writeMode = WriteMode.MULTI;\n readMode = ReadMode.RANGE;\n } else if (writeModeStr.equals(\"batch\") && readModeStr.equals(\"multi\")) {\n writeMode = WriteMode.BATCH;\n readMode = ReadMode.MULTI;\n } else {\n writeMode = WriteMode.INVALID;\n readMode = ReadMode.INVALID;\n throw new IllegalArgumentException(\"The operation mode is not been supported\");\n }\n System.out.println(\"OperationMode:writeMode=\" + writeModeStr + \",readMode=\" + readModeStr);\n }", "private DiscretePotentialOperations() {\r\n\t}", "public void runOpMode() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n robot.leftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n robot.leftMotor.getCurrentPosition(),\n robot.rightMotor.getCurrentPosition());\n telemetry.addData(\"Gyro Heading:\", \"%.4f\", getHeading());\n telemetry.update();\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n\n parameters.vuforiaLicenseKey = \"Adiq0Gb/////AAAAme76+E2WhUFamptVVqcYOs8rfAWw8b48caeMVM89dEw04s+/mRV9TqcNvLkSArWax6t5dAy9ISStJNcnGfxwxfoHQIRwFTqw9i8eNoRrlu+8X2oPIAh5RKOZZnGNM6zNOveXjb2bu8yJTQ1cMCdiydnQ/Vh1mSlku+cAsNlmfcL0b69Mt2K4AsBiBppIesOQ3JDcS3g60JeaW9p+VepTG1pLPazmeBTBBGVx471G7sYfkTO0c/W6hyw61qmR+y7GJwn/ECMmXZhhHkNJCmJQy3tgAeJMdKHp62RJqYg5ZLW0FsIh7cOPRkNjpC0GmMCMn8AbtfadVZDwn+MPiF02ZbthQN1N+NEUtURP0BWB1CmA\";\n\n\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n telemetry.addData(\">\", \"Press Play to start\");\n telemetry.update();\n\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n relicTrackables.activate();\n\n //while (opModeIsActive()) {\n\n /**\n * See if any of the instances of {@link relicTemplate} are currently visible.\n * {@link RelicRecoveryVuMark} is an enum which can have the following values:\n * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than\n * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}.\n */\n RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate);\n while (vuMark == RelicRecoveryVuMark.UNKNOWN) {\n vuMark = RelicRecoveryVuMark.from(relicTemplate);\n /* Found an instance of the template. In the actual game, you will probably\n * loop until this condition occurs, then move on to act accordingly depending\n * on which VuMark was visible. */\n }\n telemetry.addData(\"VuMark\", \"%s visible\", vuMark);\n telemetry.update();\n sleep(550);\n\n //switch (vuMark) {\n // case LEFT: //RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.LEFT;\n // coLumn = 2;\n // case CENTER:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.CENTER;\n // coLumn = 1;\n // case RIGHT:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.RIGHT;\n // coLumn = 0;\n //}\n if ( vuMark == RelicRecoveryVuMark.LEFT) {\n coLumn = 2;\n }\n else if(vuMark == RelicRecoveryVuMark.RIGHT){\n coLumn = 0;\n }\n else if(vuMark == RelicRecoveryVuMark.CENTER){\n coLumn = 1;\n }\n\n\n telemetry.addData(\"coLumn\", \"%s visible\", coLumn);\n telemetry.update();\n sleep(550);\n\n\n\n//if jewej is red 1 if jewel is blue 2\n\n // if(jewel == 1) {\n // gyroturn(-10, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //gyroturn(-2, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n //else if(jewel == 2){\n // gyroturn(10, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n // gyroturn(-2, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[0][coLumn], disandTurn[0][coLumn], 5.0); // S1: Forward 24 Inches with 5 Sec timeout shoot ball\n\n gyroturn(disandTurn[1][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[0], -turndistance[0], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[2][coLumn], disandTurn[2][coLumn], 5.0); // S3: Forward 43.3 iNCHES\n\n gyroturn(disandTurn[3][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[4][coLumn], disandTurn[4][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n gyroturn(disandTurn[5][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[6][coLumn], disandTurn[6][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n\n Outake();\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[7][coLumn], disandTurn[7][coLumn], 5.0);// S6: Forward 48 inches with 4 Sec timeout\n }", "public KNN() {\r\n\t\tallowRun = true;\r\n\t}", "@Override\n public void runOpMode() {\n\n robot.init(hardwareMap);\n robot.MotorRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorRightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n /** Wait for the game to begin */\n while (!isStarted()) {\n telemetry.addData(\"angle\", \"0\");\n telemetry.update();\n }\n\n\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "public void init() {\n // Define and Initialize Motors (note: need to use reference to actual OpMode).\n leftDrive = myOpMode.hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = myOpMode.hardwareMap.get(DcMotor.class, \"right_drive\");\n armMotor = myOpMode.hardwareMap.get(DcMotor.class, \"arm\");\n\n // To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.\n // Pushing the left stick forward MUST make robot go forward. So adjust these two lines based on your first test drive.\n // Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy\n // leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Define and initialize ALL installed servos.\n leftHand = myOpMode.hardwareMap.get(Servo.class, \"left_hand\");\n rightHand = myOpMode.hardwareMap.get(Servo.class, \"right_hand\");\n leftHand.setPosition(MID_SERVO);\n rightHand.setPosition(MID_SERVO);\n\n myOpMode.telemetry.addData(\">\", \"Hardware Initialized\");\n myOpMode.telemetry.update();\n }", "@Override\n public void runOpMode() {\n servo0 = hardwareMap.servo.get(\"servo0\");\n servo1 = hardwareMap.servo.get(\"servo1\");\n digital0 = hardwareMap.digitalChannel.get(\"digital0\");\n motor0 = hardwareMap.dcMotor.get(\"motor0\");\n motor1 = hardwareMap.dcMotor.get(\"motor1\");\n motor0B = hardwareMap.dcMotor.get(\"motor0B\");\n motor2 = hardwareMap.dcMotor.get(\"motor2\");\n blinkin = hardwareMap.get(RevBlinkinLedDriver.class, \"blinkin\");\n motor3 = hardwareMap.dcMotor.get(\"motor3\");\n park_assist = hardwareMap.dcMotor.get(\"motor3B\");\n\n if (digital0.getState()) {\n int_done = true;\n } else {\n int_done = false;\n }\n motor_stuff();\n waitForStart();\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n lancher_position();\n slow_mode();\n drive_robot();\n foundation_grabber(1);\n launcher_drive();\n data_out();\n Pickingupblockled();\n lettingoutblockled();\n Forwardled();\n backwardled();\n Turnleftled();\n Turnrightled();\n Stationaryled();\n }\n }\n }", "ROp() {super(null); _ops=new HashMap<>(); }", "protected void initialize() {\n \t_finalTickTargetLeft = _ticksToTravel + Robot.driveTrain.getEncoderLeft();\n \t_finalTickTargetRight = _ticksToTravel + Robot.driveTrain.getEncoderRight();\n \t\n }", "@Override\n public void runOpMode() {\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorBL = hardwareMap.get(DcMotor.class, \"motorBL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorBR = hardwareMap.get(DcMotor.class, \"motorBR\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser.setDirection(DcMotor.Direction.FORWARD);\n landerRiser.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n markerDrop = hardwareMap.get(Servo.class, \"marker\");\n markerDrop.setDirection(Servo.Direction.FORWARD);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //Landing & unlatching\n landerRiser.setPower(-1);\n telemetry.addData(\"Status\", \"Descending\");\n telemetry.update();\n sleep(5550);\n landerRiser.setPower(0);\n telemetry.addData(\"Status\",\"Unhooking\");\n telemetry.update();\n move(-0.5, 600, true);\n strafe(-0.4,0.6, 3600, true);\n move(0.5,600,true);\n markerDrop.setPosition(0);\n sleep(1000);\n markerDrop.setPosition(0.5);\n sleep(700);\n markerDrop.setPosition(0);\n strafe(0, -0.5,500,true);\n strafe(0.5, -0.25, 8500, true);\n\n }", "public RobotHardware (LinearOpMode opmode) {\n myOpMode = opmode;\n }", "@BeforeAll\n\tstatic void initOperate()\n\t{\t\n\t\tSystem.out.println(\"only Before All the tests....\");\n\t\toperate = new Operations();\n\t}", "protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Initializing. Please Wait...\");\n telemetry.update();\n\n\n //Use the Teleop initialization method\n testPaddle = hardwareMap.get(CRServo.class, \"servoPaddle\");\n\n //Tell drivers that initializing is now complete\n telemetry.setAutoClear(true);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n // run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n\n testPaddle.setPower(0.80);\n\n telemetry.update();\n\n }\n\n }", "public void baiscSetting(){\n generations_ = 0;\n maxGenerations_ = ((Integer) this.getInputParameter(\"maxGenerations\")).intValue();\n populationSize_ = ((Integer) this.getInputParameter(\"populationSize\")).intValue();\n mutation_ = operators_.get(\"mutation\");\n crossover_ = operators_.get(\"crossover\");\n selection_ = operators_.get(\"selection\");\n learning_ = operators_.get(\"learning\");\n\n }", "@Override\n public void runOpMode() {\n frontLeftWheel = hardwareMap.dcMotor.get(\"frontLeft\");\n backRightWheel = hardwareMap.dcMotor.get(\"backRight\");\n frontRightWheel = hardwareMap.dcMotor.get(\"frontRight\");\n backLeftWheel = hardwareMap.dcMotor.get(\"backLeft\");\n\n //telemetry sends data to robot controller\n telemetry.addData(\"Output\", \"hardwareMapped\");\n\n // The TFObjectDetector uses the camera frames from the VuforiaLocalizer, so we create that\n // first.\n initVuforia();\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n }\n\n /**\n * Activate TensorFlow Object Detection before we wait for the start command.\n * Do it here so that the Camera Stream window will have the TensorFlow annotations visible.\n **/\n if (tfod != null) {\n tfod.activate();\n }\n\n /** Wait for the game to begin */\n telemetry.addData(\">\", \"Press Play to start op mode\");\n telemetry.update();\n waitForStart();\n\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n if (tfod != null) {\n // getUpdatedRecognitions() will return null if no new information is available since\n // the last time that call was made\n List<Recognition> updatedRecognitions = tfod.getUpdatedRecognitions();\n if(updatedRecognitions == null) {\n frontLeftWheel.setPower(0);\n frontRightWheel.setPower(0);\n backLeftWheel.setPower(0);\n backRightWheel.setPower(0);\n } else if (updatedRecognitions != null) {\n telemetry.addData(\"# Object Detected\", updatedRecognitions.size());\n // step through the list of recognitions and display boundary info.\n int i = 0;\n\n\n for (Recognition recognition : updatedRecognitions) {\n float imageHeight = recognition.getImageHeight();\n float blockHeight = recognition.getHeight();\n\n //-----------------------\n// stoneCX = (recognition.getRight() + recognition.getLeft())/2;//get center X of stone\n// screenCX = recognition.getImageWidth()/2; // get center X of the Image\n// telemetry.addData(\"screenCX\", screenCX);\n// telemetry.addData(\"stoneCX\", stoneCX);\n// telemetry.addData(\"width\", recognition.getImageWidth());\n //------------------------\n\n telemetry.addData(\"blockHeight\", blockHeight);\n telemetry.addData(\"imageHeight\", imageHeight);\n telemetry.addData(String.format(\"label (%d)\", i), recognition.getLabel());\n telemetry.addData(String.format(\" left,top (%d)\", i), \"%.03f , %.03f\", recognition.getLeft(), recognition.getTop());\n telemetry.addData(String.format(\" right,bottom (%d)\", i), \"%.03f , %.03f\", recognition.getRight(), recognition.getBottom());\n\n\n if(hasStrafed == false) {\n float midpoint = (recognition.getLeft() + recognition.getRight()) /2;\n float multiplier ;\n if(midpoint > 500) {\n multiplier = -(((int)midpoint - 500) / 100) - 1;\n log = \"Adjusting Right\";\n sleep(200);\n } else if(midpoint < 300) {\n multiplier = 1 + ((500 - midpoint) / 100);\n log = \"Adjusting Left\";\n sleep(200);\n } else {\n multiplier = 0;\n log = \"In acceptable range\";\n hasStrafed = true;\n }\n frontLeftWheel.setPower(-0.1 * multiplier);\n backLeftWheel.setPower(0.1 * multiplier);\n frontRightWheel.setPower(-0.1 * multiplier);\n backRightWheel.setPower(0.1 * multiplier);\n } else {\n if( blockHeight/ imageHeight < .5) {\n frontLeftWheel.setPower(-.3);\n backLeftWheel.setPower(.3);\n frontRightWheel.setPower(.3);\n backRightWheel.setPower(-.3);\n telemetry.addData(\"detecting stuff\", true);\n } else {\n frontLeftWheel.setPower(0);\n backLeftWheel.setPower(0);\n frontRightWheel.setPower(0);\n backRightWheel.setPower(0);\n telemetry.addData(\"detecting stuff\", false);\n }\n }\n\n telemetry.addData(\"Angle to unit\", recognition.estimateAngleToObject(AngleUnit.DEGREES));\n telemetry.addData(\"Log\", log);\n\n }\n telemetry.update();\n }\n\n }\n }\n }\n if (tfod != null) {\n tfod.shutdown();\n }\n }", "public static void start(LinearOpMode opMode) {\n }", "private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "public abstract void initMode();", "protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "public void startTrainingMode() {\n\t\t\r\n\t}", "void executionOver() {\n this.reporter = null;\n this.options = null;\n this.executorEngine = null;\n this.progressSuppressingEventHandler = null;\n this.outputService = null;\n this.buildActionMap = null;\n this.completedAndResetActions = null;\n this.lostDiscoveredInputsMap = null;\n this.actionCacheChecker = null;\n this.outputDirectoryHelper = null;\n }", "public void setOp(int op) {\n\t\tthis.op = op;\n\t}", "protected void initialize() {\n\t\t//System.out.println(\"Cube collector is spitting\");\n\t}", "protected void initialize() {\n\t\tsquaredInputs = false;\n\t\t// SmartDashboard.putString(\"DB/LED 0\", \"TeleOpDrive is init\");\n\t}", "protected void initVars() {}", "public void initialize()\r\n {\r\n isImageLoaded=false; \r\n isInverted=false;\r\n isBlured=false;\r\n isChanged=false;\r\n isCircularCrop= false;\r\n isRectangularCrop = false;\r\n isReadyToSave = false;\r\n didUndo = false;\r\n brightnessLevel=0.0f;\r\n }", "private void initValues() {\n \n }", "@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }", "private void init() {\n\n\n\n }", "public void init() {\r\n\r\n\t}", "private void init() {\n\n\t}", "public void init() {\n super.setEditMode(false);\n positions = taskPropertyService.getPositionsInString(PerformanceAppraisal.class.getSimpleName());\n levels = taskPropertyService.getCandidateLevelsInString(PerformanceAppraisal.class.getSimpleName());\n //questions = getQuestionNamesFromList(performanceAppraisalService.getAllActiveQuestions());\n questions = performanceAppraisalService.getAllActiveQuestions();\n numberOfQuestions = questions.size();\n\n setIndQuestionInEditMode(-1);\n for (Question x : questions) {\n LOG.info(getQuestionIndex(x) + \" : \" + getQuestionNumber(x) + x.getName());\n }\n\n setEditMode(false);\n setPositionEditMode(false);\n setLevelEditMode(false);\n setQuestionEditMode(false);\n setIsAddQuestion(false);\n }", "void PrepareRun() {\n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "private void init() {\n sensorEnabled = false;\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }", "protected void init()\r\n\t{\n\t\tif (ConfigManager.getInstance().getIsCrossClassify() && WekaTool.dataStageOn)\r\n\t\t{\r\n\t\t\t//System.out.println(\"in init for data stage\");\r\n\t\t\tsrcDirUrl = ConfigManager.getInstance().getTrainPath();\r\n\t\t\tdestDirUrl = ConfigManager.getInstance().getTrainPath() +\r\n\t\t\t File.separator + \"output\";\r\n\t\t\t//System.out.println(\"srcDirUrl = \" + srcDirUrl);\r\n\t\t\t//System.out.println(\"destDirUrl = \" + destDirUrl);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//System.out.println(\"here, good\");\r\n\t\t\tsrcDirUrl = getSrcDirUrl();\r\n\t\t\tdestDirUrl = getDestDirUrl();\r\n\t\t}\r\n\t\tdatalibSVMUrl = getLibSVMDirUrl();\r\n\t\ttry {\r\n\t\t\tsrcDir = Utils.getDir(srcDirUrl);\r\n\t\t\tdestDir = Utils.getDir(destDirUrl);\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t}\r\n\t}", "@Override\n public void preRun() {\n super.preRun();\n }", "protected void initializeExecutionRandomness() {\r\n\r\n\t}", "@Override\n public void runOpMode() {\n initialize();\n\n //wait for user to press start\n waitForStart();\n\n if (opModeIsActive()) {\n\n // drive forward 24\"\n // turn left 90 degrees\n // turnLeft(90);\n // drive forward 20\"\n // driveForward(20);\n // turn right 90 degrees\n // turnRight(90);\n // drive forward 36\"\n // driveForward(36);\n\n }\n\n\n }", "@Override\n public void runInit() {\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "private OperatorManager() {}", "public static void init(){\t\t\n\t\tParameters p = RunEnvironment.getInstance().getParameters();\n\n\t\tSIM_RANDOM_SEED = (Integer)p.getValue(\"randomSeed\");\n\t\tSIM_NUM_AGENTS = (Integer)p.getValue(\"maxAgents\");\n\t\tSIM_NORM_VIOLATION_RATE = (Float) p.getValue(\"Norm Violation Rate\");\n\t\tNUM_TICKS_TO_CONVERGE = (Long)p.getValue(\"NumTicksToConverge\");\n\t\tCONTENTS_QUEUE_SIZE = (Long)p.getValue(\"ContentsQueueSize\");\n\t\t\n\t\tNORM_GEN_EFF_THRESHOLD = (Double)p.getValue(\"NormsGenEffThreshold\");\n\t\tNORM_GEN_NEC_THRESHOLD = (Double)p.getValue(\"NormsGenNecThreshold\");\n\t\tNORM_SPEC_EFF_THRESHOLD = (Double)p.getValue(\"NormsSpecEffThreshold\");\n\t\tNORM_SPEC_NEC_THRESHOLD = (Double)p.getValue(\"NormsSpecNecThreshold\");\n\t\tNORM_UTILITY_WINDOW_SIZE = (Integer)p.getValue(\"NormsPerfRangeSize\");\n\t\tNORM_DEFAULT_UTILITY = (Double)p.getValue(\"NormsDefaultUtility\");\n\n\t\tNORM_SYNTHESIS_STRATEGY = (Integer)p.getValue(\"NormSynthesisStrategy\");\n\t\tNORM_GENERATION_REACTIVE = (Boolean)p.getValue(\"NormGenerationReactive\");\n\t\tNORM_GENERALISATION_MODE = (Integer)p.getValue(\"NormGeneralisationMode\");\n\t\tNORM_GENERALISATION_STEP = (Integer)p.getValue(\"NormGeneralisationStep\");\n\t\tNORM_SPEC_THRESHOLD_EPSILON = (Double)p.getValue(\"NormsSpecThresholdEpsilon\");\n\t\tNORMS_MIN_EVALS_CLASSIFY = (Integer)p.getValue(\"NormsMinEvaluationsToClassify\");\n\t\tNORMS_WITH_USER_ID = (Boolean)p.getValue(\"NormsWithUserId\");\n\n\t\t\n\t\t\n\t\t// System goals and their constants\n\t\tsystemGoals = new ArrayList<Goal>();\n\t\tsystemGoals.add(new GComplaints());\n\n\t\t//\t\tdouble tMinusEpsilon = NORM_SPEC_NEC_THRESHOLD - NORM_SPEC_THRESHOLD_EPSILON;\n\t\t//\t\t\n\t\t//\t\t/* For SIMON+ and LION, set default utility in a different manner... */\n\t\t//\t\tif(NORM_SYNTHESIS_STRATEGY == 3 || NORM_SYNTHESIS_STRATEGY == 4) {\n\t\t//\t\t\tNORM_DEFAULT_UTILITY = (float)(tMinusEpsilon * (NORM_MIN_EVALS+1)); \n\t\t//\t\t}\n\n\t\t/* For SIMON+ and LION, set default utility in a different manner... */\n\t\tif((NORM_SYNTHESIS_STRATEGY == 3 || NORM_SYNTHESIS_STRATEGY == 4) &&\n\t\t\t\t!NORM_GENERATION_REACTIVE) \n\t\t{\n\t\t\tNORM_DEFAULT_UTILITY = 0f; \n\t\t\tSystem.out.println(\"Norm generation is set as Deliberative\");\n\t\t}\n\t}", "@Override\n public void resetDeviceConfigurationForOpMode() {\n\n }", "@Override\n public void runOpMode() {\n detector = new modifiedGoldDetector(); //Create detector\n detector.init(hardwareMap.appContext, CameraViewDisplay.getInstance(), DogeCV.CameraMode.BACK); //Initialize it with the app context and camera\n detector.enable(); //Start the detector\n\n //Initialize the drivetrain\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorRL = hardwareMap.get(DcMotor.class, \"motorRL\");\n motorRR = hardwareMap.get(DcMotor.class, \"motorRR\");\n motorFL.setDirection(DcMotor.Direction.REVERSE);\n motorFR.setDirection(DcMotor.Direction.FORWARD);\n motorRL.setDirection(DcMotor.Direction.REVERSE);\n motorRR.setDirection(DcMotor.Direction.FORWARD);\n\n //Reset encoders\n motorFL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorFR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorFL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorFR.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRR.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n telemetry.addData(\"IsFound: \", detector.isFound());\n telemetry.addData(\">\", \"Waiting for start\");\n telemetry.update();\n\n\n //TODO Pass skystone location to storage\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n /**\n * *****************\n * OpMode Begins Here\n * *****************\n */\n\n //Disable the detector\n if(detector != null) detector.disable();\n\n //Start the odometry processing thread\n odometryPositionUpdate positionUpdate = new odometryPositionUpdate(motorFL, motorFR, motorRL, motorRR, inchPerCount, trackWidth, wheelBase, 75);\n Thread odometryThread = new Thread(positionUpdate);\n odometryThread.start();\n runtime.reset();\n\n //Run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n\n absPosnX = startPosnX + positionUpdate.returnOdometryX();\n absPosnY = startPosnY + positionUpdate.returnOdometryY();\n absPosnTheta = startPosnTheta + positionUpdate.returnOdometryTheta();\n\n telemetry.addData(\"X Position [in]\", absPosnX);\n telemetry.addData(\"Y Position [in]\", absPosnY);\n telemetry.addData(\"Orientation [deg]\", absPosnTheta);\n telemetry.addData(\"Thread Active\", odometryThread.isAlive());\n telemetry.update();\n\n//Debug: Drive forward for 3.0 seconds and make sure telemetry is correct\n if (runtime.seconds() < 3.0) {\n motorFL.setPower(0.25);\n motorFR.setPower(0.25);\n motorRL.setPower(0.25);\n motorRR.setPower(0.25);\n }else {\n motorFL.setPower(0);\n motorFR.setPower(0);\n motorRL.setPower(0);\n motorRR.setPower(0);\n }\n\n\n }\n //Stop the odometry processing thread\n odometryThread.interrupt();\n }", "@Override\r\n\tpublic void init() { \r\n\t\t\r\n\t\tsession = -1;\r\n\t\t\r\n\t\tProgressDif = 0;\r\n\t\tnoisFact = 0;\r\n\t\tcompromiseFact = 0;\r\n\t\t\r\n\t\tcompromiseLearn = 20;\r\n\t\tprogressLearn = 10;\r\n\t\tnoisLearn = 0.2;\r\n\t\t\r\n\t\treservationPanic = 0.2;\r\n\t\tmyBids = new ArrayList<Pair<Bid,Double>>();\r\n\t\topponentBidsA = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\t\topponentBidsB = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\r\n\t\tdf = utilitySpace.getDiscountFactor();\r\n\t\tif (df==0) df = 1; \r\n\r\n\t\ttry {\r\n\t\t\tinitStates();\r\n\t\t} catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "public GlobalState() {\r\n\t\t//initialize ITANet location vector\r\n\t\tint ITACount = Model.getITACount();\r\n\t\tthis.locVec = new int[ITACount];\r\n\t\tfor (int i = 0; i < ITACount; i++){\r\n\t\t\tthis.locVec[i] = Model.getITAAt(i).getInitLoc();\r\n\t\t}\r\n\r\n\t\t//initialize interruption vector\r\n\t\tint interCount = Model.getInterCount();\r\n\t\tthis.interVec = new boolean[interCount];\r\n\t\tfor(int i = 0; i < interCount; i++){\r\n\t\t\tthis.interVec[i] = false;\r\n\t\t}\r\n\t\t\r\n\t\tthis.cvMap = Model.getCVMap(); //share 'cvMap' with Model\r\n\t\tthis.srArray = Model.getSRArray();\t//share 'srArray' with Model \r\n\t\tthis.stack = new CPUStack();\r\n\t\tthis.switches = new IRQSwitch();\r\n\t}", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Simple Ready to run\"); //\n telemetry.update();\n telemetry.addData(\"Status\", \"Initialized\");\n\n /**\n * Initializes the library functions\n * Robot hardware and motor functions\n */\n robot = new Robot_1617(hardwareMap);\n motorFunctions = new MotorFunctions(-1, 1, 0, 1, .05);\n\n //servo wheels are flipped in configuration file\n robot.servoLeftWheel.setPosition(.45);\n robot.servoRightWheel.setPosition(.25);\n\n robot.servoLeftArm.setPosition(0);\n robot.servoRightArm.setPosition(0.7);\n\n robot.servoFlyAngle.setPosition(1);\n\n robot.servoElbow.setPosition(0.95);\n robot.servoShoulder.setPosition(0.1);\n\n robot.servoFeed.setPosition(.498);\n\n robot.servoPlaid.setPosition(.85);\n\n telemetry.addData(\"Servos: \", \"Initialized\");\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n sleep(5000);\n robot.motorLift.setPower(0);\n robot.servoFlyAngle.setPosition(0);\n sleep(500);\n robot.motorFlyLeft.setPower(.9);\n robot.motorFlyRight.setPower(1);\n sleep(250);\n robot.motorIntakeElevator.setPower(1);\n robot.servoFeed.setPosition(-1);\n telemetry.addData(\"Status\", \"Shooting\"); //\n telemetry.update();\n sleep(5000);\n robot.motorFlyLeft.setPower(0);\n robot.motorFlyRight.setPower(0);\n// sleep(5000); //no idea why this is here\n robot.motorIntakeElevator.setPower(0);\n robot.servoFeed.setPosition(.1);\n sleep(250);\n\n telemetry.addData(\"Status\", \"Driving\");\n telemetry.update();\n encoderDrive(1.0, 30, 30, 1);\n\n encoderDrive(1.0, 35, 35, 1);\n }", "public void setOperation(String op) {this.operation = op;}", "private void init() {\n }", "private void initialize() {\n\t\t\n\t}", "private void InitData() {\n\t}", "private void initData() {\n\t}", "@Override\n public void startUpOperations() {\n }", "@Override\n public void runOpMode () {\n motor1 = hardwareMap.get(DcMotor.class, \"motor1\");\n motor2 = hardwareMap.get(DcMotor.class, \"motor2\");\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n //Wait for game to start (driver presses PLAY)\n waitForStart();\n\n /*\n the overridden runOpMode method happens with every OpMode using the LinearOpMode type.\n hardwareMap is an object that references the hardware listed above (private variables).\n The hardwareMap.get method matches the name of the device used in the configuration, so\n we would have to change the names (ex. motorTest to Motor 1 or Motor 2 (or something else))\n if not, the opMode won't recognize the device\n\n in the second half of this section, it uses something called telemetry. In the first and\n second lines it sends a message to the driver station saying (\"Status\", \"Initialized\") and\n then it prompts the driver to press start and waits. All linear functions should have a wait\n for start command so that the robot doesn't start executing the commands before the driver\n wants to (or pushes the start button)\n */\n\n //run until end of match (driver presses STOP)\n double tgtpower = 0;\n while (opModeIsActive()) {\n telemetry.addData(\"Left Stick X\", this.gamepad1.left_stick_x);\n telemetry.addData(\"Left Stick Y\", this.gamepad1.left_stick_y);\n telemetry.addData(\"Right Stick X\", this.gamepad1.right_stick_x);\n telemetry.addData(\"Right Stick Y\", this.gamepad1.right_stick_y);\n if (this.gamepad1.left_stick_y < 0){\n tgtpower=-this.gamepad1.left_stick_y;\n motor1.setPower(tgtpower);\n motor2.setPower(-tgtpower);\n }else if (this.gamepad1.left_stick_y > 0){\n tgtpower=this.gamepad1.left_stick_y;\n motor1.setPower(-tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x > 0){\n tgtpower=this.gamepad1.left_stick_x;\n motor1.setPower(tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x < 0){\n tgtpower=-this.gamepad1.left_stick_x;\n motor1.setPower(-tgtpower);\n motor2.setPower(-tgtpower);\n }else{\n motor1.setPower(0);\n motor2.setPower(0);\n }\n telemetry.addData(\"Motor1 Power\", motor1.getPower());\n telemetry.addData(\"Motor2 Power\", motor2.getPower());\n telemetry.addData(\"Status\", \"Running\");\n telemetry.update ();\n\n\n /*\n if (this.gamepad1.right_stick_x == 1){\n //trying to make robot turn right, == 1 may be wrong\n motor2.setPower(-1);\n }\n else if (this.gamepad1.right_stick_x == -1){\n //trying to make robot turn left, == -1 may be wrong\n motor1.setPower(-1);\n }\n else {\n\n }\n */\n\n\n /*\n After the driver presses start,the opMode enters a while loop until the driver presses stop,\n while the loop is running it will continue to send messages of (\"Status\", \"Running\") to the\n driver station\n */\n\n\n }\n }", "@Override\n\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n // FR = hardwareMap.get(DcMotor.class, \"FR\");\n // FL = hardwareMap.get(DcMotor.class, \"FL\");\n // BR = hardwareMap.get(DcMotor.class, \"BR\");\n //BL = hardwareMap.get(DcMotor.class, \"BL\");\n //yoo are ___\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n/* FR.setDirection(DcMotor.Direction.FORWARD);\n FL.setDirection(DcMotor.Direction.REVERSE);\n BR.setDirection(DcMotor.Direction.FORWARD);\n BL.setDirection(DcMotor.Direction.REVERSE);\n\n */ RevBlinkinLedDriver blinkinLedDriver;\n RevBlinkinLedDriver.BlinkinPattern pattern;\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n blinkinLedDriver = this.hardwareMap.get(RevBlinkinLedDriver.class, \"PrettyBoi\");\n blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.RAINBOW_WITH_GLITTER);\n// runtime.reset();\n\n // run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n\n\n\n // Show the elapsed game time and wheel power.\n// telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n// // telemetry.addData(\"Motors\", \"FL (%.2f), FR (%.2f), BL (%.2f), BR (%.2f)\", v1, v2, v3, v4);\n// telemetry.update();\n }\n }", "public void init() {\n \n }", "public void init() {\n\t\t}", "public void init() {\n\t\t\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void setOp(String op) {\n this.op = op;\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "@Override\n public void runOpMode() {\n commands.init(hardwareMap);\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n // run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n sleep(30000);\n }\n }", "private void initData() {\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n robot.FL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.FL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "private static void init () {\r\n\t\t// make sure they all have non-null entries\r\n\t\tName undef = new Name(\"undef\", 'u');\r\n\t\tArrays.fill(op_names, undef);\r\n\t\tArrays.fill(fn_names, undef);\r\n\t\tArrays.fill(cfn_names, undef);\r\n\t\tArrays.fill(rs_names, undef);\r\n\t\tArrays.fill(rt_names, undef);\r\n\r\n\t\tfor (int n = 0; n < 32; n++)\r\n\t\t\treg_nums[n] = \"$\".concat(Integer.toString(n));\r\n\r\n\t\top_names[OP_SPECIAL] = new Name(\"**spec\");\r\n\t\top_names[OP_REGIMM] = new Name(\"**regimm\");\r\n\t\top_names[OP_J] = new Name(\"j\", 'J');\r\n\t\top_names[OP_JAL] = new Name(\"jal\", 'J');\r\n\t\top_names[OP_BEQ] = new Name(\"beq\", 'r');\r\n\t\top_names[OP_BNE] = new Name(\"bne\", 'r');\r\n\t\top_names[OP_BLEZ] = new Name(\"blez\", 'r');\r\n\t\top_names[OP_BGTZ] = new Name(\"bgtz\", 'r');\r\n\t\top_names[OP_ADDIU] = new Name(\"addiu\", 'b');\r\n\t\top_names[OP_SLTI] = new Name(\"slti\", 'b');\r\n\t\top_names[OP_SLTIU] = new Name(\"sltiu\", 'b');\r\n\t\top_names[OP_ANDI] = new Name(\"andi\", 'b');\r\n\t\top_names[OP_ORI] = new Name(\"ori\", 'b');\r\n\t\top_names[OP_XORI] = new Name(\"xori\", 'b');\r\n\t\top_names[OP_LUI] = new Name(\"lui\", 'I');\r\n\t\top_names[OP_COP1] = new Name(\"**cop1\");\r\n\t\top_names[OP_SPEC2] = new Name(\"**spec2\");\r\n\t\top_names[OP_LB] = new Name(\"lb\", 'l');\r\n\t\top_names[OP_LH] = new Name(\"lh\", 'l');\r\n\t\top_names[OP_LWL] = new Name(\"lwl\", 'l');\r\n\t\top_names[OP_LW] = new Name(\"lw\", 'l');\r\n\t\top_names[OP_LBU] = new Name(\"lbu\", 'l');\r\n\t\top_names[OP_LHU] = new Name(\"lhu\", 'l');\r\n\t\top_names[OP_LWR] = new Name(\"lwr\", 'l');\r\n\t\top_names[OP_SB] = new Name(\"sb\", 's');\r\n\t\top_names[OP_SH] = new Name(\"sh\", 's');\r\n\t\top_names[OP_SWL] = new Name(\"swl\", 's');\r\n\t\top_names[OP_SW] = new Name(\"sw\", 's');\r\n\t\top_names[OP_SWR] = new Name(\"swr\", 's');\r\n\t\top_names[OP_LWC1] = new Name(\"lwc1\", 'L');\r\n\t\top_names[OP_SWC1] = new Name(\"swc1\", 'S');\r\n\r\n\t\tfn_names[FN_SLL] = new Name(\"sll\");\r\n\t\tfn_names[FN_SRL] = new Name(\"srl\");\r\n\t\tfn_names[FN_SRA] = new Name(\"sra\");\r\n\t\tfn_names[FN_SLLV] = new Name(\"sllv\");\r\n\t\tfn_names[FN_SRLV] = new Name(\"srlv\");\r\n\t\tfn_names[FN_SRAV] = new Name(\"srav\");\r\n\t\tfn_names[FN_JR] = new Name(\"jr\", 'j');\r\n\t\tfn_names[FN_JALR] = new Name(\"jalr\", 'j');\r\n\t\tfn_names[FN_MOVN] = new Name(\"movn\", 'u');\r\n\t\tfn_names[FN_SYSCALL] = new Name(\"**sys\");\r\n\t\tfn_names[FN_BREAK] = new Name(\"**break\");\r\n\t\tfn_names[FN_MFHI] = new Name(\"mfhi\");\r\n\t\tfn_names[FN_MFLO] = new Name(\"mflo\");\r\n\t\tfn_names[FN_MULT] = new Name(\"mult\");\r\n\t\tfn_names[FN_MULTU] = new Name(\"multu\");\r\n\t\tfn_names[FN_DIV] = new Name(\"div\");\r\n\t\tfn_names[FN_DIVU] = new Name(\"divu\");\r\n\t\tfn_names[FN_ADDU] = new Name(\"addu\", 'B');\r\n\t\tfn_names[FN_SUBU] = new Name(\"subu\", 'B');\r\n\t\tfn_names[FN_AND] = new Name(\"and\", 'B');\r\n\t\tfn_names[FN_OR] = new Name(\"or\", 'B');\r\n\t\tfn_names[FN_XOR] = new Name(\"xor\", 'B');\r\n\t\tfn_names[FN_NOR] = new Name(\"nor\", 'B');\r\n\t\tfn_names[FN_SLT] = new Name(\"slt\", 'B');\r\n\t\tfn_names[FN_SLTU] = new Name(\"sltu\", 'B');\r\n\r\n\t\trs_names[RS_MF] = new Name(\"mfc1\", '6');\r\n\t\trs_names[RS_CF] = new Name(\"cfc1\", '4');\r\n\t\trs_names[RS_MT] = new Name(\"mtc1\", '5');\r\n\t\trs_names[RS_CT] = new Name(\"ctc1\");\r\n\t\trs_names[RS_BC] = new Name(\"bc1\");\r\n\t\trs_names[RS_FMT_SINGLE] = new Name(\"**fmts\");\r\n\t\trs_names[RS_FMT_DOUBLE] = new Name(\"**fmtd\");\r\n\t\trs_names[RS_FMT_WORD] = new Name(\"**fmtw\");\r\n\r\n\t\tcfn_names[CFN_ADD_D] = new Name(\"add\", '3');\r\n\t\tcfn_names[CFN_SUB_D] = new Name(\"sub\", '3');\r\n\t\tcfn_names[CFN_MUL_D] = new Name(\"mul\", '3');\r\n\t\tcfn_names[CFN_DIV_D] = new Name(\"div\", '3');\r\n\t\tcfn_names[CFN_MOV_D] = new Name(\"mov\", '2'); // 2?\r\n\t\tcfn_names[CFN_NEG_D] = new Name(\"neg\", '2');\r\n\t\tcfn_names[CFN_CVTS] = new Name(\"cvts\", '2'); // all type 2\r\n\t\tcfn_names[CFN_CVTD] = new Name(\"cvtd\", '2');\r\n\t\tcfn_names[CFN_CVTW] = new Name(\"cvtw\", '2');\r\n\t\tcfn_names[CFN_FC_ULT] = new Name(\"ult\", 'c');\r\n\t\tcfn_names[CFN_FC_EQ] = new Name(\"eq\", 'c'); // all type c\r\n\t\tcfn_names[CFN_FC_LT] = new Name(\"lt\", 'c');\r\n\t\tcfn_names[CFN_FC_LE] = new Name(\"le\", 'c');\r\n\r\n\t\trt_names[RT_BLTZ] = new Name(\"bltz\", 'v');\r\n\t\trt_names[RT_BGEZ] = new Name(\"bgez\", 'v');\r\n\t\trt_names[RT_BLTZAL] = new Name(\"bltzal\", 'v');\r\n\t\trt_names[RT_BGEZAL] = new Name(\"bgezal\", 'v');\r\n\t}", "public void alg_INIT(){\r\n}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "protected AutonomousMode() {\n driveMotions = new Vector();\n auxMotions = new Vector();\n }", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "protected abstract void initHardwareInstructions();", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "@Override\n public void runOpMode() {\n\n //PUTS THE NAMES OF THE MOTORS INTO THE CODE\n\n //DRIVE Motors\n aDrive = hardwareMap.get(DcMotor.class, \"aDrive\");\n bDrive = hardwareMap.get(DcMotor.class, \"bDrive\");\n cDrive = hardwareMap.get(DcMotor.class, \"cDrive\");\n dDrive = hardwareMap.get(DcMotor.class, \"dDrive\");\n cDrive.setDirection(DcMotor.Direction.REVERSE);\n dDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //FUNCTIONS Motors\n Arm = hardwareMap.get(DcMotor.class, \"Arm\");\n ArmExtender = hardwareMap.get(DcMotor.class, \"ArmExtender\");\n Spindle = hardwareMap.get(DcMotor.class, \"Spindle\");\n Lift = hardwareMap.get(DcMotor.class, \"Lift\");\n\n //SERVOS\n Cover = hardwareMap.get(Servo.class, \"Cover\");\n\n //Vuforia\n telemetry.addData(\"Status\", \"DogeCV 2018.0 - Gold Align Example\");\n\n detector = new GoldAlignDetector();\n detector.init(hardwareMap.appContext, CameraViewDisplay.getInstance());\n detector.useDefaults();\n\n // Phone Stuff\n detector.alignSize = 100; // How wide (in pixels) is the range in which the gold object will be aligned. (Represented by green bars in the preview)\n detector.alignPosOffset = 0; // How far from center frame to offset this alignment zone.\n detector.downscale = 0.4; // How much to downscale the input frames\n detector.areaScoringMethod = DogeCV.AreaScoringMethod.MAX_AREA; // Can also be PERFECT_AREA\n //detector.perfectAreaScorer.perfectArea = 10000; // if using PERFECT_AREA scoring\n detector.maxAreaScorer.weight = 0.005;\n detector.ratioScorer.weight = 5;\n detector.ratioScorer.perfectRatio = 1.0;\n detector.enable();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n waitForStart();\n\n telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral\n\n goldPos = detector.getXPosition(); // Gets gold block posistion\n\n sleep(1000); // Waits to make sure it is correct\n\n // Move Depending on gold position\n if(goldPos < 160){\n driftleft();\n sleep(1500);\n }else if (goldPos > 500) {\n driftright();\n sleep(1500);\n }else{\n forward();\n }\n\n forward(); //Drives into crater\n sleep(4000);\n\n detector.disable();\n\n }", "public void alg_INIT(){\nBlock.value=false;\nTokenOut.value=false;\nSystem.out.println(\"init head, grant false, token true\");\n\n}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public Context() {\n this.mFunctionSet=new ArrayList();\n this.mTerminalSet=new ArrayList();\n this.mPrimitiveMap=new TreeMap();\n this.mCache=new MyLinkedHashMap(500, .75F, true);\n this.previousBest=Double.MAX_VALUE;\n}", "private GameStatePresets()\n {\n\n }", "public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\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}" ]
[ "0.6445536", "0.6429513", "0.6384415", "0.6288649", "0.6144974", "0.6119435", "0.59062827", "0.59005266", "0.5870183", "0.58671665", "0.5861385", "0.58397555", "0.5801953", "0.5783338", "0.5775833", "0.5768233", "0.5747397", "0.5746296", "0.57115734", "0.57016486", "0.56876564", "0.56617874", "0.56532574", "0.5645918", "0.5627147", "0.5611075", "0.56110287", "0.56009805", "0.5600766", "0.55976945", "0.55916554", "0.55890286", "0.5588734", "0.5586946", "0.5571241", "0.5559453", "0.55512214", "0.55395687", "0.5536523", "0.55318004", "0.5526662", "0.5523517", "0.5512453", "0.55112845", "0.55110365", "0.55088615", "0.5504912", "0.5494695", "0.5486363", "0.54854053", "0.5482378", "0.5477058", "0.547045", "0.5466276", "0.54641104", "0.54534775", "0.54507583", "0.5450756", "0.5449011", "0.5445766", "0.54368705", "0.5429852", "0.5426147", "0.54204154", "0.5403861", "0.54003316", "0.53991044", "0.53956753", "0.5379459", "0.53760237", "0.53752667", "0.53752667", "0.53752667", "0.53743076", "0.5368856", "0.5368856", "0.5368856", "0.5368856", "0.5368349", "0.5367916", "0.5367291", "0.5357986", "0.5355644", "0.5345901", "0.5345901", "0.5345901", "0.5345901", "0.5345901", "0.5344675", "0.53432435", "0.5337791", "0.53365594", "0.5335965", "0.5335102", "0.5334963", "0.5333127", "0.5331113", "0.53210074", "0.5319372", "0.5319372" ]
0.54172796
64
based on Alon and Michaelov's calculations used in 2020 vision code: ScoreMatchingPipeline.calcAngleOffsetDegrees
public static double calculateHorizontalOffsetDegrees2(double centerX, double imageWidth, double camFovRadians) { double imageCenter = imageWidth * 0.5; double xOffset = centerX - imageCenter; double focalLengthPixel = imageCenter / Math.tan(Math.toDegrees(camFovRadians) * 0.5 * Math.PI/180); return Math.toDegrees(Math.atan(xOffset / focalLengthPixel)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "protected void calculatePointerAngle() {\r\n\t\tfloat progressPercent = ((float)mProgress / (float)mMax);\r\n\t\tmPointerPosition = (progressPercent * mTotalCircleDegrees) + mStartAngle;\r\n\t\tmPointerPosition = mPointerPosition % 360f;\r\n\t}", "private int DirectionCalculation(int angle)\r\n\t{\t\r\n\t\treturn (int) ((angle/14.28)+1); //Angle divided by (100/(parts-1)) = 1-8\r\n\t}", "private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}", "public void calculateAngleAndRotate(){\n\t\tdouble cumarea = 0;\n\t\tdouble sina = 0;\n\t\tdouble cosa = 0;\n\t\tdouble area, angle;\n\t\tfor (int n = 0; n < rt.size();n++) {\n\t\t\tarea = rt.getValueAsDouble(rt.getColumnIndex(\"Area\"),n);\n\t\t\tangle = 2*rt.getValueAsDouble(rt.getColumnIndex(\"Angle\"),n);\n\t\t\tsina = sina + area*Math.sin(angle*Math.PI/180);\n\t\t\tcosa = cosa + area*Math.cos(angle*Math.PI/180);\n\t\t\tcumarea = cumarea+area;\n\t\t}\n\t\taverageangle = Math.abs(0.5*(180/Math.PI)*Math.atan2(sina/cumarea,cosa/cumarea)); // this is the area weighted average angle\n\t\t// rotate the data \n\t\tIJ.run(ActiveImage,\"Select All\",\"\");\n\t\tActiveImageConverter.convertToGray32();\n\t\tIJ.run(ActiveImage,\"Macro...\", \"code=[v= x*sin(PI/180*\"+averageangle+\")+y*cos(PI/180*\"+averageangle+\")]\");\n\t\treturn;\n\t}", "double getCalibratedLevelAngle();", "public double findAngleOfAttack() {\n\t\tdouble dy = this.trailingPt.y - this.leadingPt.y; // trailingPt goes first since positive numbers are down\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// y-axis in Canvas\n\t\tdouble dx = this.leadingPt.x - this.trailingPt.x;\n\t\treturn Math.atan2(dy, dx);\n\t}", "private void calculateAngle(){\n for (Point point : points) {\n double d = Math.abs(point.x)+Math.abs(point.z);\n double angle = 0;\n\n if (point.x >= 0 && point.z >= 0){\n angle = point.z/d;\n } else if (point.x < 0 && point.z >= 0){\n angle = 2 - point.z/d;\n } else if (point.x < 0 && point.z <0){\n angle = 2 + Math.abs(point.z)/d;\n } else if (point.x >=0 && point.z < 0){\n angle = 4 - Math.abs(point.z)/d;\n }\n point.setAngle(angle);\n }\n Collections.sort(points);\n }", "@Override\n public int getSteeringAngle(int[] pixels) {\n leftLine.clearPoints();\n rightLine.clearPoints();\n findLaneLines(pixels, getCameraHeight() - START_SEARCH, getCameraWidth() / 2, getCameraWidth() / 2);\n setMidPoints(calculateMidPoints());\n setSteerPoint(calculateSteerPoint());\n setLeftPoints(leftLine.getLanePoints());\n setRightPoints(rightLine.getLanePoints());\n return getDegreeOffset(getOrigin(), getSteerPoint());\n }", "double getAngle();", "double getAngle();", "public double passAlign() {\n \tdouble angle;\n \tif (MasterController.ourSide == TeamSide.LEFT) {\n \t\tangle = angleToX();\n \t} else {\n \t\tangle = angleToNegX();\n \t}\n \tdouble amount = -0.7 * angle;\n\t\tDebug.log(\"Angle: %f, Rotating: %f\", angle, amount);\n\t\trotate(amount); // TODO: Test if works as expected\n\t\treturn amount;\n\t}", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "double getCalibrationOffset();", "private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }", "public double findAngle() {\n return 0d;\n }", "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "public static double getAngle(ArrayList<MatOfPoint> filterContoursOutput)\n\t{\n\t\tdouble constant = WIDTH_BETWEEN_TARGET / lengthBetweenContours;\n\t\tdouble angleToGoal = 0;\n\t\t\t//Looking for the 2 blocks to actually start trig\n\t\tif(!filterContoursOutput.isEmpty() && filterContoursOutput.size() >= 2)\n\t\t{\n\n\t\t\tif(centerX.length == 2)\n\t\t\t{\n\t\t\t\t// this calculates the distance from the center of goal to center of webcam \n\t\t\t\tdouble distanceFromCenterPixels = ((centerX[0] + centerX[1]) / 2) - (CAMERA_WIDTH / 2);\n\t\t\t\t// Converts pixels to inches using the constant from above.\n\t\t\t\tdouble distanceFromCenterInch = distanceFromCenterPixels * constant;\n\t\t\t\t// math brought to you buy Chris and Jones\n\t\t\t\tangleToGoal = Math.atan(distanceFromCenterInch / distanceFromTarget(filterContoursOutput));\n\t\t\t\tangleToGoal = Math.toDegrees(angleToGoal);\n\t\t\t\t// prints angle\n\t\t\t\t//System.out.println(\"Angle: \" + angleToGoal);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn angleToGoal;\n\t}", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "public double getAngle();", "public double getdAdjusted(double pitch_angle, double yaw_angle){\n double distance_d = Constants.DELTA_H / Math.tan(Math.toRadians(Constants.ANGLE_I + pitch_angle)); // This is the distance from\n // the CAMERA to the centre\n // of target\n double side_d = distance_d / Math.tan(Math.toRadians(90-yaw_angle));\n double distance_d_adjusted = Math.sqrt(Math.pow(side_d,2) + Math.pow(distance_d + Constants.LENGTH_E_C,2)); \n\n // double distance_d_adjusted = Math.sqrt((Math.pow(distance_d, 2)) + (Math.pow(Constants.LENGTH_E_C, 2))\n // - ((2 * distance_d * Constants.LENGTH_E_C) * Math.cos(Math.toRadians(180 - yaw_angle)))); // This is the\n // // distance from the\n // // CENTRE OF ROBOT (E)\n // // to centre of target\n\n this.distance_d = distance_d;\n this.side_d = side_d;\n this.distance_d_adjusted = distance_d_adjusted;\n\n return distance_d_adjusted;\n }", "public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);", "public double translateAngle( Figure f, double angle, double dir);", "public abstract int getIndexForAngle(float paramFloat);", "public double getAngleToTarget(){\n return 0d;\n }", "public void updateAngle() {\n\t\tfloat ak = 0;\n\t\tfloat gk = 0;\n\t\tak = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterX() - x);\n\t\tgk = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterY() - y);\n\t\tangleDesired = (float) Math.toDegrees(Math.atan2(ak*-1, gk));\n\t\t// if the angle and the angleDesired are opposites the Vector point into the opposite direction\n\t\t// this means the angle will be the angle of the longer vector which is always angle\n\t\t// so if that happens the angleDesired is offset so this won't happen\n\t\tangle = Commons.calculateAngleAfterRotation(angle, angleDesired, rotationDelay);\n\t}", "static double calcAngle(long val, long centerVal, double focalLen) {\n return Math.atan(((double)(val - centerVal)) / focalLen);\n }", "public float getAngleForPoint(float x, float y) {\n /* 262 */\n MPPointF c = getCenterOffsets();\n /* */\n /* 264 */\n double tx = (x - c.x), ty = (y - c.y);\n /* 265 */\n double length = Math.sqrt(tx * tx + ty * ty);\n /* 266 */\n double r = Math.acos(ty / length);\n /* */\n /* 268 */\n float angle = (float) Math.toDegrees(r);\n /* */\n /* 270 */\n if (x > c.x) {\n /* 271 */\n angle = 360.0F - angle;\n /* */\n }\n /* */\n /* 274 */\n angle += 90.0F;\n /* */\n /* */\n /* 277 */\n if (angle > 360.0F) {\n /* 278 */\n angle -= 360.0F;\n /* */\n }\n /* 280 */\n MPPointF.recycleInstance(c);\n /* */\n /* 282 */\n return angle;\n /* */\n }", "private double calculateAngle(Point2D p, Point2D q)\n {\n return Math.atan2(q.getY() - p.getY(), q.getX() - p.getX());\n }", "public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }", "public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }", "public static double calculateAngleInDegrees(Vector3D sourceLocation, Vector3D listenerLocation, Speaker speakerPojo) {\n Vector listener = listenerLocation.toLa4j();\n Vector source = sourceLocation.toLa4j();\n Vector speaker = speakerPojo.getPosition().toLa4j();\n double angle = calculateAngleInDegrees(listener, source, speaker);\n // In case of the listener being at exactly the same position as either the source or the speaker,\n // there is no angle (NaN), so fall back to a default value.\n if (angle == Double.NaN) {\n if (listener.equals(source)) {\n // If the listener is 'in' the source, all speakers are equal.\n angle = 0;\n } else {\n // If the listener is 'in' the speaker, 'disable' that speaker by giving it the max angle.\n angle = 180;\n }\n }\n return angle;\n }", "public double getStartAngle();", "public static native int OpenMM_AmoebaInPlaneAngleForce_getNumAngles(PointerByReference target);", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "AngleResource inclination();", "AngleSmaller createAngleSmaller();", "@XmlElement(\"PerpendicularOffset\")\n Expression getPerpendicularOffset();", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "double getAngle(int id);", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)\n {\n float f = par3 * (float)Math.PI * -0.1F;\n\n for (int i = 0; i < 4; i++)\n {\n field_78106_a[i].rotationPointY = -2F + MathHelper.cos(((float)(i * 2) + par3) * 0.25F);\n field_78106_a[i].rotationPointX = MathHelper.cos(f) * 9F;\n field_78106_a[i].rotationPointZ = MathHelper.sin(f) * 9F;\n f += ((float)Math.PI / 2F);\n }\n\n f = ((float)Math.PI / 4F) + par3 * (float)Math.PI * 0.03F;\n\n for (int j = 4; j < 8; j++)\n {\n field_78106_a[j].rotationPointY = 2.0F + MathHelper.cos(((float)(j * 2) + par3) * 0.25F);\n field_78106_a[j].rotationPointX = MathHelper.cos(f) * 7F;\n field_78106_a[j].rotationPointZ = MathHelper.sin(f) * 7F;\n f += ((float)Math.PI / 2F);\n }\n\n f = 0.4712389F + par3 * (float)Math.PI * -0.05F;\n\n for (int k = 8; k < 12; k++)\n {\n field_78106_a[k].rotationPointY = 11F + MathHelper.cos(((float)k * 1.5F + par3) * 0.5F);\n field_78106_a[k].rotationPointX = MathHelper.cos(f) * 5F;\n field_78106_a[k].rotationPointZ = MathHelper.sin(f) * 5F;\n f += ((float)Math.PI / 2F);\n }\n\n field_78105_b.rotateAngleY = par4 / (180F / (float)Math.PI);\n field_78105_b.rotateAngleX = par5 / (180F / (float)Math.PI);\n }", "@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}", "double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }", "boolean evolveCurrentAngle() {\n float checkSum = 0;\n for (int i = 0; i < 2; i++) {\n float delta = target_angle[i] - angle[i];\n float sign = 1;\n if (Math.abs(delta) > Math.PI) {\n // go the other way\n boolean isPos = delta > 0;\n sign = -1;\n delta = (float) (2 * Math.PI - Math.abs(delta));\n if (!isPos) delta = -delta;\n }\n angle[i] += sign * 0.1f * delta;\n if (angle[i] > Math.PI) angle[i] = (float) -(2 * Math.PI - angle[i]);\n if (angle[i] < -Math.PI) angle[i] = (float) (2 * Math.PI - angle[i]);\n checkSum += Math.abs(delta);\n }\n\n float delta = target_angle[2] - angle[2];\n float sign = 1;\n if (Math.abs(delta) > Math.PI / 2) {\n // go the other way\n boolean isPos = delta > 0;\n sign = -1;\n delta = (float) (Math.PI - Math.abs(delta));\n if (!isPos) delta = -delta;\n }\n angle[2] += sign * 0.1f * delta;\n if (angle[2] > Math.PI / 2) angle[2] = (float) -(Math.PI - angle[2]);\n if (angle[2] < -Math.PI / 2) angle[2] = (float) (Math.PI - angle[2]);\n checkSum += Math.abs(delta);\n\n if (checkSum < 0.0001) {\n for (int i = 0; i < target_angle.length; i++) {\n angle[i] = target_angle[i];\n }\n return false;\n }\n return true;\n }", "protected void calculateProgressDegrees() {\r\n\t\tmProgressDegrees = mPointerPosition - mStartAngle; // Verified\r\n\t\tmProgressDegrees = (mProgressDegrees < 0 ? 360f + mProgressDegrees : mProgressDegrees); // Verified\r\n\t}", "DMatrix3C getOffsetRotation();", "private double getAngleDisplacement(SkeletonNode root, int f) {\r\n\r\n\t\t/**------------------------------------------------------**/\r\n\t\tdouble ang = 0;\r\n\t\tint ang_counter = 0;\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tSkeletonNode parent =\troot.getParent();\r\n\t\tif(parent==null) return ang;\r\n\t\tString root_name = \t\troot.getName();\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tint group_size = ControlVariables.third_level_ang_filter_size;\r\n\t\tint group_size_half = (group_size/2)+(group_size % 2);\r\n\t\tint total_filter_size_i = (group_size_half*2) +\r\n\t\t\t\t(Math.min(f-group_size_half, 0)) +\r\n\t\t\t\t(Math.min(skeletonNodes.length - (f+group_size_half+1), 0));\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tfor(int j = f-group_size_half; j < f; j++) {\r\n\t\t\tif(j < 0) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\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 j = f; j < f+group_size_half; j++) {\r\n\t\t\tif((j+1) >= skeletonWrappers.length) continue;\r\n\t\t\telse {\r\n\r\n\t\t\t\tSkeletonNode root_j_1 = skeletonWrappers[j+1].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j_1 = root_j_1.getParent();\r\n\r\n\t\t\t\tSkeletonNode root_j = skeletonWrappers[j].getFromHash(root_name);\r\n\t\t\t\tSkeletonNode parent_j = root_j.getParent();\r\n\r\n\r\n\t\t\t\tdouble [] r_j = root_j.getPoint();\r\n\t\t\t\tdouble [] p_j = parent_j.getPoint();\r\n\r\n\t\t\t\tdouble [] r_j_1 = root_j_1.getPoint();\r\n\t\t\t\tdouble [] p_j_1 = parent_j_1.getPoint();\r\n\r\n\t\t\t\tdouble [] par_diff = VectorTools.sub(p_j, p_j_1);\r\n\t\t\t\tr_j_1 = VectorTools.add(par_diff, r_j_1);\r\n\r\n\t\t\t\tang += VectorTools.ang(r_j_1, p_j, r_j);\r\n\t\t\t\tang_counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**------------------------------------------------------**/\r\n\t\t/**||||||||||||||||||||||||||||||||||||||||||||||||||||||**/\r\n\t\t/**------------------------------------------------------**/\r\n\t\tif(total_filter_size_i != ang_counter) {\r\n\t\t\tSystem.out.println(total_filter_size_i);\r\n\t\t\tSystem.out.println(ang_counter);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn((1.0)/(ang_counter+0.0))*ang;\r\n\t\t/**------------------------------------------------------**/\r\n\t}", "public double getAngle() { return angle; }", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, IntBuffer particle4, DoubleBuffer length, DoubleBuffer quadraticK);", "static double calculateAngle(Line2D line, ArrowEnd end) {\n \t\t// Translate the line to 0,0\n \t\tdouble x1 = line.getX1();\n \t\tdouble y1 = line.getY1();\n \t\tdouble x2 = line.getX2();\n \t\tdouble y2 = line.getY2();\n \t\tdouble opposite = y2-y1;\n \t\tdouble adjacent = x2-x1;\n \n \t\tdouble radians = Math.atan(opposite/adjacent);\n \n \t\tif (adjacent < 0) radians += Math.PI;\n \n \t\t// TODO: Flip for other end\n \t\treturn radians;\n \t}", "float calcRotate(float rotateDeg, float anglePerIn)\n {\n return rotateDeg / anglePerIn;\n }", "public float getAngle() {\n if(vectorAngle < 0 )\n return (float) Math.toDegrees(Math.atan(longComponent / latComponent));\n else\n return vectorAngle;\n\n }", "public float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 0.0F;\n\t}", "public static float map180to360(float angle) {\n return (angle + 360) % 360;\n }", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "public static native int OpenMM_AmoebaAngleForce_getNumAngles(PointerByReference target);", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public static double angleApproach(double current, double wanted, double divide){\n\t\t//if (dirY(1, current - wanted) > 0)\n\t\t\treturn approach(current, wanted, divide);\n\t\t/*else\n\t\t\treturn approach(current, wanted - 360, divide);*/\n\t}", "public static int convertAngle(double angle) {\n // Using convertDistance method to calculate constant rotation of the robot + scaling\n return convertDistance((Math.PI * BASE_WIDTH * angle / 360.0) * 100) / 100;\n }", "private int getAttackAngle() {\n\t\treturn (160 - (level * 10));\n\t}", "private double getPolarAngle(double refX, double refY, double px, double py) {\n\t\tdouble tethaRadian = -1;\n\t\tif ((px - refX) > 0 && (refY - py) >= 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX));\n\t\t} else if ((px - refX) > 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + 2 * Math.PI;\n\t\t} else if ((px - refX) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + Math.PI;\n\t\t} else if ((px - refX) == 0 && (refY - py) > 0) {\n\t\t\ttethaRadian = Math.PI / 2;\n\t\t} else if ((px - refX) == 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = 3 * Math.PI / 2;\n\t\t}\n\t\treturn tethaRadian;\n\t}", "public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "public float onRotate(FPointType fptPos, float offset) {\n FPointType fptCalculate = getCalculate();\n \n float radPos = calculateRadian(fptPos, fptCalculate);\n float radBegin = calculateRadian(fptStart, fptCalculate);\n \n rotateRadian = radPos - radBegin + offset;\n rotate(rotateRadian);\n return rotateRadian;\n }", "@Override\n\tpublic Integer apply(Integer angle) {\n\t\treturn (int)Math.toDegrees(Math.atan2(\n\t\t\t\tcosFilter.apply(Math.cos(Math.toRadians(angle))), \n\t\t\t\tsinFilter.apply(Math.sin(Math.toRadians(angle)))));\n\t}", "public AccOrientation calculateAngle(SensorEvent event) {\t\t\n\t final int _DATA_X = 0;\n\t final int _DATA_Y = 1;\n\t final int _DATA_Z = 2;\n\t // Angle around x-axis thats considered almost perfect vertical to hold\n\t // the device\n\t final int PIVOT = 20;\n\t // Angle around x-asis that's considered almost too vertical. Beyond\n\t // this angle will not result in any orientation changes. f phone faces uses,\n\t // the device is leaning backward.\n\t final int PIVOT_UPPER = 65;\n\t // Angle about x-axis that's considered negative vertical. Beyond this\n\t // angle will not result in any orientation changes. If phone faces uses,\n\t // the device is leaning forward.\n\t final int PIVOT_LOWER = -10;\n\t // Upper threshold limit for switching from portrait to landscape\n\t final int PL_UPPER = 295;\n\t // Lower threshold limit for switching from landscape to portrait\n\t final int LP_LOWER = 320;\n\t // Lower threshold limt for switching from portrait to landscape\n\t final int PL_LOWER = 270;\n\t // Upper threshold limit for switching from landscape to portrait\n\t final int LP_UPPER = 359;\n\t // Minimum angle which is considered landscape\n\t final int LANDSCAPE_LOWER = 235;\n\t // Minimum angle which is considered portrait\n\t final int PORTRAIT_LOWER = 60;\n\t \n\t // Internal value used for calculating linear variant\n\t final float PL_LF_UPPER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float PL_LF_LOWER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t // Internal value used for calculating linear variant\n\t final float LP_LF_UPPER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float LP_LF_LOWER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t \n\t int mSensorRotation = -1; \n\t \n\t\t\tfinal boolean VERBOSE = true;\n float[] values = event.values;\n float X = values[_DATA_X];\n float Y = values[_DATA_Y];\n float Z = values[_DATA_Z];\n float OneEightyOverPi = 57.29577957855f;\n float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);\n float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;\n int rotation = -1;\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n AccOrientation result = new AccOrientation();\n \n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n result.orientation = orientation;\n result.angle = zyangle; \n result.threshold = 0;\n if ((zyangle <= PIVOT_UPPER) && (zyangle >= PIVOT_LOWER)) {\n // Check orientation only if the phone is flat enough\n // Don't trust the angle if the magnitude is small compared to the y value\n \t/*\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n normalize to 0 - 359 range\n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n mOrientation.setText(String.format(\"Orientation: %d\", orientation));\n */ \n // Orientation values between LANDSCAPE_LOWER and PL_LOWER\n // are considered landscape.\n // Ignore orientation values between 0 and LANDSCAPE_LOWER\n // For orientation values between LP_UPPER and PL_LOWER,\n // the threshold gets set linearly around PIVOT.\n if ((orientation >= PL_LOWER) && (orientation <= LP_UPPER)) {\n float threshold;\n float delta = zyangle - PIVOT;\n if (mSensorRotation == ROTATION_090) {\n if (delta < 0) {\n // Delta is negative\n threshold = LP_LOWER - (LP_LF_LOWER * delta);\n } else {\n threshold = LP_LOWER + (LP_LF_UPPER * delta);\n }\n rotation = (orientation >= threshold) ? ROTATION_000 : ROTATION_090;\n if (mShowLog) \n \tLog.v(TAG, String.format(\"CASE1. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n } else {\n if (delta < 0) {\n // Delta is negative\n threshold = PL_UPPER+(PL_LF_LOWER * delta);\n } else {\n threshold = PL_UPPER-(PL_LF_UPPER * delta);\n }\n rotation = (orientation <= threshold) ? ROTATION_090: ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE2. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n }\n result.threshold = threshold;\n } else if ((orientation >= LANDSCAPE_LOWER) && (orientation < LP_LOWER)) {\n rotation = ROTATION_090;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE3. 90 (%d)\", orientation));\n } else if ((orientation >= PL_UPPER) || (orientation <= PORTRAIT_LOWER)) {\n rotation = ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE4. 00 (%d)\", orientation)); \n } else {\n \tif (mShowLog)\n \t\tLog.v(TAG, \"CASE5. \"+orientation);\n }\n if ((rotation != -1) && (rotation != mSensorRotation)) {\n mSensorRotation = rotation;\n if (mSensorRotation == ROTATION_000) {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 00\");\n }\n else if (mSensorRotation == ROTATION_090) \n {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 90\");\n } \n }\n result.rotation = rotation;\n } else {\n \t//Log.v(TAG, String.format(\"Invalid Z-Angle: %2.4f (%d %d)\", zyangle, PIVOT_LOWER, PIVOT_UPPER));\n }\t\n return result;\n\t\t}", "public double getOffset(){\n\t\tdouble percentHeight = networkTableValues.get(\"height\")/cameraHeightPixel;\n\t\t//Get the height of the frame in inches\n\t\tdouble cameraHeightInches = networkTableValues.get(\"height\")/percentHeight;\n\t\t//Get the width of the frame in inches\n\t\tdouble cameraWidthInches = cameraHeightInches*(cameraWidthPixel/cameraHeightPixel);\n\t\t//Get the distanceFromTower from the camera to the goal\n\t\tdistanceFromTower = (cameraWidthInches/2)/Math.tan(cameraFOV*(Math.PI/180));\n\t\t//Get the distanceFromTower from the camera to the base of the tower\n\t\tdouble horizontalDistance = Math.sqrt(Math.pow(distanceFromTower, 2) - Math.pow(towerHeight, 2));\n\t\t//Get offset in inches\n\t\tdouble distanceFromCenterInches = (networkTableValues.get(\"centerX\") / cameraWidthPixel)*cameraWidthInches;\n\t\tdouble offset = Math.atan((distanceFromCenterInches/distanceFromTower)*(180/Math.PI));\n\t\t\n\t\tSystem.out.println(\"OFFSET: \" + offset);\n\t\treturn offset;\n\t}", "@Override\n public void reAngle() {\n }", "public double getAngleXY() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.z/l);\r\n\t}", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, DoubleByReference length, DoubleByReference quadraticK);", "Angle createAngle();", "private static int convertAngle(double radius, double width, double angle) {\r\n\t\t\treturn convertDistance(radius, Math.PI * width * angle / 360.0);\r\n\t\t}", "EDataType getAngleDegrees();", "public double getAngleXZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.y/l);\r\n\t}", "public static int convertAngle(double angle) {\n return convertDistance(Math.PI * BASE_WIDTH * angle / 360.0);\n }", "private void initOffset(){\n\t\tdouble maxDistance = Math.sqrt(Math.pow(getBattleFieldWidth(),2) + Math.pow(getBattleFieldHeight(),2));\n\n\t\tif(eDistance < 100) { \n\t\t\toffset = 0;\n\t\t} else if (eDistance <=700){\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\n\t\t\t\toffset=eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset=-eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/8;\n\t\t}\n\t\telse {\n\t\t\tif((getHeadingRadians()-enemy)<-(3.14/2) && (enemy-getHeadingRadians())>= (3.14/2)) {\n\t\t\t\toffset = eDistance / maxDistance*0.4;\n\t\t\t} else {\n\t\t\t\toffset = -eDistance / maxDistance*0.4;\n\t\t\t}\n\t\t\toffset*=velocity/4;\n\t\t}\n\t}", "public double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public static double normalizeAngle(double a, double center)\r\n/* 25: */ {\r\n/* 26: 91 */ return a - 6.283185307179586D * FastMath.floor((a + 3.141592653589793D - center) / 6.283185307179586D);\r\n/* 27: */ }", "private float angleDistance(float from, float to) {\n float d = to - from;\n if (d > Math.PI) {\n return d - (float) Math.PI;\n }\n if (d < -Math.PI) {\n return d + (float) Math.PI;\n }\n return d;\n }", "public double getAngle() {\n\t\treturn this.position[2];\n\t}", "public double getAngle(float x, float y )\n {\n double dx = x - centerX;\n // Minus to correct for coord re-mapping\n double dy = -(y - centerY);\n\n double inRads = Math.atan2(dy,dx);\n\n // We need to map to coord system when 0 degree is at 3 O'clock, 270 at 12 O'clock\n if (inRads < 0)\n inRads = Math.abs(inRads);\n else\n inRads = 2*Math.PI - inRads;\n\n return Math.toDegrees(inRads);\n }", "private Point extractVectorFromAngle(int arg) {\n double theta = Math.toRadians( 2* (double)arg );\n double dx = Cell.move_dist * Math.cos(theta);\n double dy = Cell.move_dist * Math.sin(theta);\n return new Point(dx, dy);\n }", "public double getAngle()\n {\n return (AngleAverage);\n }", "private static int convertAngle(double radius, double width, double angle) {\n\t\treturn convertDistance(radius, Math.PI * width * angle / 360.0);\n\t}", "public double getTargetAngle(){\n return lastKnownAngle;\n }", "float getWindingConnectionAngle();", "public double getAngleAway(Point p) {\n if (Math.abs(p.getAngle() - getAngle()) <= 180)\n return p.getAngle() - getAngle();\n else if (p.getAngle() - getAngle() > 0)\n return p.getAngle() - getAngle() - 360;\n else\n return p.getAngle() - getAngle() + 360;\n }", "private Integer alignWithZone(Point point) {\n Zone zone = Zone.Find(target);\n if (null == zone) {\n return 0;\n }\n Double oppositeLength = point.y() - zone.drawY();\n Double adjacentLength = point.x() - zone.drawX();\n Double angle = Math.atan2(oppositeLength, adjacentLength);\n angle = Math.toDegrees(angle);\n\n return angle.intValue() + 90;\n }", "public double getAngle(int[][] tab) {\n\t\tdouble[] res= new double[4];int resi=0;\n\t\tint cmpt=0;\n\t\tint angle=0;\n\t\tfor (int i=0;i<tab.length;i++) {\n\t\t\tif (!(tab[i][0]==0) || !(tab[i][1]==0))\n\t\t\t\tcmpt++;\n\t\t}\n\t\t\n\t\tif (cmpt<=1) {\n\t\t\t return 0; //RIP CODE\n\t\t}\n\t\t\n\t\tfor (int i=1;i<tab.length && (!(tab[i][0]==0) || !(tab[i][1]==0));i++) {\n\t\t\tfor(int c=1;i<tab.length && (tab[c][0]!=0 || tab[c][1]!=0);i++)\n\t\t\t{\n\t\t\t\tint diffx=tab[i-1][0]-tab[i][0];\n\t\t\t\tint diffy=tab[i-1][1]-tab[i][1];\n\t\t\t\t\n\t\t\t\tdouble yb=tab[i][1];\n\t\t\t\tdouble xb=tab[i][0];\n\t\t\t\tdouble ya=tab[i-1][1];\n\t\t\t\tdouble xa=tab[i-1][0];\n\t\t\t\t\n\t\t\t\tdouble pointy,pointx;\n\t\t\t\tpointy=yb; \t\t\t\t\t\t\t//pointy/x = coord du 3e point de triangle rectangle\n\t\t\t\tpointx=xa;\t\t\t\t\n\t\t\t\t\n\t\t\t\tdouble dhypo=Math.sqrt(Math.pow(xb-xa,2)+Math.pow(yb-ya,2));\t//(yb-ya)/(xb-xa)\n\t\t\t\tdouble dadj=Math.sqrt(Math.pow(xb-pointx, 2)+Math.pow(yb-pointy, 2));\t//adjacent / rapport a xb,yb\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (dhypo<img.getWidth() && dhypo!=0) {\t\t//deux points selectionnees sont des diagonales\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\n\t\t\t\t\tif (retour>90/2)\n\t\t\t\t\t\tretour=180-90-retour;\n\t\t\t\t\t\n\t\t\t\t\tif((xa<xb && ya<yb )||( xb<xa && yb<ya))\t\t\t\t//point de droite plus haut que celui de gauche\n\t\t\t\t\t\treturn -retour;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn retour;\n\t\t\t\t}\n\t\t\t\t/*else {\t\t\t//deux points sont en diagonnale\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\t\t// ne marche pas \n\t\t\t\t\treturn (Math.abs(45-retour)/2);\n\t\t\t\t\t\n\t\t\t\t}*/\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\t\n\t\treturn 0;\n\t}", "public float getAzimuthAngle()\n {\n return azimuth_slider.getValue() / ANGLE_SCALE_FACTOR;\n }", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public static native void OpenMM_AmoebaAngleForce_getAngleParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, DoubleBuffer length, DoubleBuffer quadraticK);", "public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }", "public double PlaneAngle() {\n return OCCwrapJavaJNI.Units_Dimensions_PlaneAngle(swigCPtr, this);\n }", "public int[] angleMarker()\n {\n int[] coord = {(int)X(),(int)Y()};\n if (leftNeighbour == null || rightNeighbour == null) return coord;\n double middleAngle = getMiddleDirection();\n coord[0] = (int)(X() + Math.cos(middleAngle) * 32);\n coord[1] = (int)(Y() + Math.sin(middleAngle) * 32);\n return coord;\n }", "private double getRawAngle() {\n return (m_pot.getVoltage() / Constants.AIO_MAX_VOLTAGE) * Constants.Hood.POT_SCALE;\n }", "public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }", "public void updateAngle(){\n\t\tif (turnUp && (angle < 180) ){\n\t\t\tangle+=1;\n\t\t}\n\t\tif (turnDown && (angle > 0)){\n\t\t\tangle-=1;\n\t\t}\n\t}", "protected void calculateTotalDegrees() {\r\n\t\tmTotalCircleDegrees = (360f - (mStartAngle - mEndAngle)) % 360f; // Length of the entire circle/arc\r\n\t\tif (mTotalCircleDegrees <= 0f) {\r\n\t\t\tmTotalCircleDegrees = 360f;\r\n\t\t}\r\n\t}", "private double degToRadian(double angle)\n\t{\n\t\treturn angle/180*Math.PI;\n\t}", "public void setAngle( double a ) { angle = a; }" ]
[ "0.6923538", "0.65216947", "0.6450107", "0.64081436", "0.6276516", "0.62752914", "0.6266825", "0.6202314", "0.6186178", "0.61594814", "0.61594814", "0.6156484", "0.615488", "0.61528903", "0.6145031", "0.614326", "0.61416066", "0.6114472", "0.61076653", "0.6098438", "0.609425", "0.60398227", "0.60301715", "0.6028681", "0.6012564", "0.6010855", "0.6002595", "0.59623754", "0.5954114", "0.59421736", "0.5931643", "0.5931615", "0.5923867", "0.5915399", "0.58973247", "0.58966416", "0.5882937", "0.5878281", "0.58776045", "0.5869987", "0.5854078", "0.583941", "0.58388484", "0.58258593", "0.5811286", "0.58085144", "0.57987773", "0.57983243", "0.57952034", "0.5759898", "0.5757245", "0.57533145", "0.5743891", "0.57390004", "0.57280785", "0.5720487", "0.5711305", "0.5710865", "0.5705276", "0.57028717", "0.56773865", "0.5675607", "0.5665589", "0.56578386", "0.56463635", "0.5645811", "0.5644122", "0.5632962", "0.56292397", "0.56158656", "0.5610778", "0.5605444", "0.5601695", "0.5601265", "0.55950326", "0.5594325", "0.5593111", "0.5593101", "0.55861735", "0.55835813", "0.557716", "0.5576873", "0.5575974", "0.557323", "0.5573211", "0.5572057", "0.55688417", "0.5565975", "0.5546245", "0.5537103", "0.55369866", "0.55359846", "0.5523192", "0.55195445", "0.5513407", "0.550971", "0.55096585", "0.55072117", "0.55001056", "0.5497556", "0.54960155" ]
0.0
-1
Create a simple Java program CurrentDateTime.java to print the current date and time. Locale.setDefault(Locale.ROOT); Locale.setDefault(new Locale("BG", "BG")); Locale.setDefault(Locale.US);
public static void main(String[] args) { LocalDateTime dt = LocalDateTime.now(); System.out.println(dt); System.out.printf( "Today is %1$td.%1$tm.%1$tY\n", LocalDate.now()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void currentDateTime() {\n // Just the date\n LocalDate date = LocalDate.now();\n System.out.println(\"LocalDate now: \" + date);\n\n // Just the time\n LocalTime time = LocalTime.now();\n System.out.println(\"LocalTime now: \" + time);\n\n // Date and time\n LocalDateTime dateTime = LocalDateTime.now();\n System.out.println(\"LocalDateTime now: \" + dateTime);\n\n // Date, time and time zone! Fancy\n ZonedDateTime zonedDateTime = ZonedDateTime.now();\n System.out.println(\"ZonedDateTime now: \" + zonedDateTime);\n System.out.println();\n }", "public static void main(String[] args) {\n // Get the current date\n final LocalDate currentDate = LocalDate.now();\n System.out.println(\"Current Date is: \" + currentDate);\n\n // Get the current time\n final LocalTime currentTime = LocalTime.now();\n System.out.println(\"Current Time is: \" + currentTime);\n\n // Get the current date and time\n final LocalDateTime currentDateTime = LocalDateTime.now();\n System.out.println(\"Current Date & Time is: \" + currentDateTime);\n\n // Get the current timestamp\n final Instant timestamp = Instant.now();\n System.out.println(\"Current Timestamp is: \" + timestamp);\n\n // Get the current Zone\n final ZoneId currentZone = ZoneId.systemDefault();\n System.out.println(\"Current Zone is: \" + currentZone);\n\n // Get ZonedDateTime from specific Calendar\n final ZonedDateTime gregorianCalendarDateTime = new GregorianCalendar().toZonedDateTime();\n System.out.println(\"Current Zoned Date Time is: \" + gregorianCalendarDateTime);\n\n // Date formatting.\n final LocalDate date = LocalDate.now();\n System.out.println(\"Default format: \" + date);\n System.out.println(\"Specific format: \" + date.format(DateTimeFormatter.ofPattern(\"d::MMM::uuuu\")));\n System.out.println(\"ISO format: \" + date.format(DateTimeFormatter.BASIC_ISO_DATE));\n }", "public static void main(String[] arg){\n\tDate today;\n\ttoday=new Date();\n\tSystem.out.println(today);\n}", "public static String currentDateTime() {\r\n Calendar c = Calendar.getInstance();\r\n return String.format(\"%tB %te, %tY%n%tl:%tM %tp%n\", c, c, c, c, c, c);\r\n }", "public static void main(String[] args) {\n\t String str = String.format(\"%tc\", new Date());\r\n\t System.out.printf(str);\r\n\t \r\n//\t // display time and date\r\n//\t System.out.printf(\" Today is : %1$s %2$tB %2$td, %2$tY\", \"Due date : \", new Date());\r\n//\r\n\r\n\t System.out.println( new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a zzz\").format(new Date()));\r\n\t System.out.println( new SimpleDateFormat(\"EEEE, MMMM d, yyyy\").format(new Date()));\r\n\t}", "public static void main(String[] args) {\n\t\tDate now = new Date();\r\n\t\tSystem.out.println( now );\r\n\t}", "public static String getCurrentDateTime()\n\t{\n\t\treturn getDateTime(new Date());\n\t}", "public void getCurrentDate(){\n Date now = new Date(); //get todays date \n \n SimpleDateFormat formatter = new SimpleDateFormat( \"MM/dd/yyyy\" ); \n System.out.println ( \"The current date is: \" + formatter.format( now ) ); \n \n month = (String) formatter.format( now ).subSequence(0, 2);\n day = (String) formatter.format( now ).subSequence(3, 5);\n year = (String) formatter.format( now ).subSequence(6, 10);\n \n System.out.println(\"month: \" + month);\n System.out.println(\"day: \" + day);\n System.out.println(\"year: \" + year);\n \n }", "public static void main(String[] args) {\n System.out.println(TimeZone.getTimeZone(\"GMT+08:00\"));\n System.out.println(LocalDateTime.now());\n System.out.println(new Date());\n }", "public static void main(String[] args) {\n\tDate date=new Date();\n\t//Display Time and Date using toStrng().\n\tSystem.out.println(date.toString());\n\t\n\tDate dNow=new Date();\n\tSimpleDateFormat ft=new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a zzz\");\n\tSystem.out.println(\"Current Date: \"+ft.format(dNow));\n\t\n\t//This method is used for sleep for 3 seconds.\n\ttry { \n System.out.println(new Date( ) + \"\\n\"); \n Thread.sleep(5*60*10); \n System.out.println(new Date( ) + \"\\n\"); \n } catch (Exception e) {\n System.out.println(\"Got an exception!\"); \n }\n\t GregorianCalendar gcalendar = new GregorianCalendar();\n\t int year = 0;\n\t// Test if the current year is a leap year\n if(gcalendar.isLeapYear(year)) {\n System.out.println(\"The current year is a leap year\");\n }else {\n System.out.println(\"The current year is not a leap year\");\n }\n }", "public static void main(String[] args) {\n\t\t\t\tSystem.out.println(LocalDate.now());\n\t\t\t\t\t\t\n\t\t\t\t// Bugunun zamanini saat, dakika, saniye ve salise olarak ekrana yazdiralim\n\t\t\t\tSystem.out.println(LocalTime.now());\n\t\t\t\t\n\t\t\t\t// Bugunun tarihini ve zamanini ekrana yazdiralim\n\t\t\t\tSystem.out.println(LocalDateTime.now());//2020-05-20T11:02:06.295 Buradaki \"T\" tarih ile\n\t\t\t\t // zamani ayirmak icin konuluyor.\n\n\t}", "public static void main(String[] args) {\n\t\tCalendar now = Calendar.getInstance();\r\n\t\tint hour = now.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minute = now.get(Calendar.MINUTE);\r\n\t\tint month = now.get(Calendar.MONTH + 1);\r\n\t\tint day = now.get(Calendar.DAY_OF_MONTH);\r\n\t\tint year = now.get(Calendar.YEAR);\r\n\r\n\t\tSystem.out.println(now.getTime());\r\n\r\n\t\t// Crear una fecha fija\r\n\t\tCalendar sameDate = new GregorianCalendar(2010, Calendar.FEBRUARY, 22, 23, 11, 44);\r\n\r\n\t\t// mostrar los agradecimientos\r\n\t\tif (hour < 12)\r\n\t\t\tSystem.out.println(\"Buenos días. \\n\");\r\n\t\telse if (hour < 17)\r\n\t\t\tSystem.out.println(\"Buenas tardes. \\n\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Buenas noches charAt(\\n)\");\r\n\r\n\t\t// Mostrar minutos\r\n\t\tSystem.out.println(\"It is\");\r\n\t\tif (minute != 0) {\r\n\t\t\tSystem.out.print(\" \" + minute + \" \");\r\n\t\t\tSystem.out.print((minute != 1) ? \"minutes\" : \"minute\");\r\n\t\t\tSystem.out.print(\" past\");\r\n\t\t}\r\n\t\t// Mostrar la hora\r\n\t\tSystem.out.print(\" \");\r\n\t\tSystem.out.print((hour > 12) ? (hour - 12) : hour);\r\n\t\tSystem.out.print(\" o'clock on \\n\");\r\n\r\n\t\t// Mostrar el mes\r\n\r\n\t\tSystem.out.print(\"Estamos en el mes de: \");\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"Enero\");\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Febrero\");\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Marzo\");\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Abril\");\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"Mayo\");\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"Junio\");\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tSystem.out.println(\"Julio\");\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tSystem.out.println(\"Agosto\");\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tSystem.out.println(\"Septiembre\");\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tSystem.out.println(\"Octubre\");\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tSystem.out.println(\"Noviembre\");\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tSystem.out.println(\"Diciembre\");\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tLocalDate localDate = LocalDate.now();\r\n\t\tSystem.out.println(\"Local Date : \" + localDate); // toString()\r\n\t\t\r\n\t\tLocalTime localTime = LocalTime.now();\r\n\t\tSystem.out.println(\"Local Time : \" + localTime);\r\n\t\t\r\n\t\t\r\n\t\tLocalDateTime localDateTime = LocalDateTime.now();\r\n\t\tSystem.out.println(\"Local Date Time : \" + localDateTime);\r\n\t}", "public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displaying date\n simpleformat = new SimpleDateFormat(\"dd/MMMM/yyyy\");\n String str = simpleformat.format(new Date());\n System.out.println(\"Current Date = \"+str);\n // current time\n simpleformat = new SimpleDateFormat(\"HH:mm:ss\");\n String strTime = simpleformat.format(new Date());\n System.out.println(\"Current Time = \"+strTime);\n // displaying hour in HH format\n simpleformat = new SimpleDateFormat(\"HH\");\n String strHour = simpleformat.format(new Date());\n System.out.println(\"Hour in HH format = \"+strHour);\n\n\n\n //formato ideal\n simpleformat = new SimpleDateFormat(\"dd/MM/yyyy - HH:mm:ss\");\n String strTimeDay = simpleformat.format(new Date());\n System.out.println(\"Dia e Hora = \" + strTimeDay);\n\n }", "public void Print_date()\n {\n \n System.out.println(\"Date: \" + date);\n }", "@Test\n\tpublic void systemDate_Get()\n\t{\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\n\t\t// Created object of Date, to get system current date\n\t\tDate date = new Date();\n\t\t\n\t\tString currDate = dateFormat.format(date);\n\t\t\n\t\tSystem.out.println(\"Today's date is : \"+currDate);\n\n\t}", "public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }", "public String getCurrentTime() {\r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm:ss\"); //https://www.javatpoint.com/java-get-current-date\r\n LocalDateTime now = LocalDateTime.now();\r\n return dtf.format(now);\r\n }", "public static String getCurrentDate()\n\t{\n\t\treturn getDate(new Date());\n\t}", "public static void main(String[] args) {\n DateFormat df=new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss a\");\n \n //Get the date today using calender object.\n Date today=Calendar.getInstance().getTime();\n //using DateFormat format method we can create a string\n //representation of a date with the defined format.\n String reportDate=df.format(today);\n //print what date is today!\n System.out.println(\"Current Date: \"+reportDate);\n }", "public static void main(String[] args) {\n\n\t\tjava.util.Calendar cal = java.util.Calendar.getInstance(); // new로\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\t\t\t\t\t\t\t\t\t// getinstance로\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 객체받아옴\n\t\t// System.out.println(cal);\n\n\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"년\");\n\t\tSystem.out.print(cal.get(Calendar.MONTH) + 1 + \"월\"); // 전산에서\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calendar.MONTH\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// : 0월~11월 ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// +1해줘야한다.\n\t\tSystem.out.print(cal.get(Calendar.DATE) + \"일\");\n\t\tSystem.out.println();\n\t\tSystem.out.print(cal.get(Calendar.HOUR_OF_DAY) + \"시\"); // 24시 기준\n\t\t// System.out.print(cal.get(Calendar.HOUR)+\"시\"); 0시~11\n\t\tSystem.out.print(cal.get(Calendar.MINUTE) + \"분\");\n\t\tSystem.out.println(cal.get(Calendar.SECOND) + \"초\");\n\t\tSystem.out.println(\"ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ\");\n\n\t\tif (cal.get(Calendar.AM) == 0) {\n\t\t\tSystem.out.print(\"am\");\n\t\t} else if (cal.get(Calendar.AM) == 1) {\n\t\t\tSystem.out.print(\"pm\");\n\t\t}\n\t\tSystem.out.print(cal.get(Calendar.HOUR) + \"시\"); // 0~11시\n\t\tSystem.out.print(cal.get(Calendar.MINUTE) + \"분\");\n\t\tSystem.out.println(cal.get(Calendar.SECOND) + \"초\");\n\n\t\t// System.out.println(cal.get(Calendar.DAY_OF_WEEK));요일은 숫자로 표현. 1~7 일~토\n\t\tchar ch = '?';\n\t\tswitch (cal.get(Calendar.DAY_OF_WEEK)) {\n\t\t\tcase 1:\n\t\t\t\tch = '일';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tch = '월';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tch = '화';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\n\t\t\tcase 4:\n\t\t\t\tch = '수';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tch = '목';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tch = '금';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tch = '토';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tSystem.out.print(\"[\" + ch + \"]\");\n\t\tSystem.out.println(\"요일\");\n\n\t\tSystem.out.println(\"2020년의 \" + cal.get(Calendar.WEEK_OF_YEAR) + \"번째 주\");\n\t\tSystem.out.println(\"2020년의 \" + cal.get(Calendar.DAY_OF_YEAR) + \"번째 날\");\n\t\tSystem.out.println(\"2020년 5월의 \" + cal.get(Calendar.DAY_OF_MONTH)\n\t\t\t\t+ \"번째 날\");\n\t\tSystem.out.println(\"2020년 5월의 \" + cal.get(Calendar.WEEK_OF_MONTH)\n\t\t\t\t+ \"번째 주\");\n\t\tSystem.out.println(\"ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ\");\n\t\tSystem.out.println(cal.get(0)); // 1\n\t\tSystem.out.println(cal.get(1)); // year\n\t\tSystem.out.println(cal.get(2)); //\n\t\tSystem.out.println(cal.get(3)); //\n\t\tSystem.out.println(cal.get(4)); // month\n\t\tSystem.out.println(cal.get(5)); // day\n\t\tSystem.out.println(cal.get(6)); //\n\t\tSystem.out.println(cal.get(7)); //\n\t\tSystem.out.println(cal.get(8)); //\n\t\tSystem.out.println(cal.get(9)); // ?\n\n\t}", "public String getCurrentDateTime(){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\", Locale.getDefault()\n );\n Date date = new Date();\n return simpleDateFormat.format(date);\n }", "public static void main(String[] args) {\n System.out.println(\"Instant.now(): \" + Instant.now());\n System.out.println(\"LocalDate.now(): \" + LocalDate.now());\n System.out.println(\"LocalTime.now(): \" + LocalTime.now());\n System.out.println(\"LocalDateTime.now(): \" + LocalDateTime.now());\n System.out.println(\"ZonedDateTime.now(): \" + ZonedDateTime.now());\n\n //All output values are using the ISO 8601 standard formatting. For dates, the basic for‐\n //mat is yyyy-MM-dd. For times, the format is hh:mm:ss.sss.\n\n //The of method for the date/time classes\n System.out.println(\"First landing on the Moon:\");\n LocalDate moonLandingDate = LocalDate.of(1969, Month.JULY, 20);\n LocalTime moonLandingTime = LocalTime.of(20, 18);\n System.out.println(\"Date: \" + moonLandingDate);\n System.out.println(\"Time: \" + moonLandingTime);\n System.out.println(\"Neil Armstrong steps onto the surface: \");\n LocalTime walkTime = LocalTime.of(20, 2, 56, 150_000_000);\n LocalDateTime walk = LocalDateTime.of(moonLandingDate, walkTime);\n System.out.println(walk);\n\n Set<String> regionNames = ZoneId.getAvailableZoneIds();\n System.out.println(\"There are \" + regionNames.size() + \" region names\");\n\n //Applying a time zone to a LocalDateTime\n LocalDateTime dateTime = LocalDateTime.of(2017, Month.JULY, 4, 13, 20, 10);\n ZonedDateTime nyc = dateTime.atZone(ZoneId.of(\"America/New_York\"));\n System.out.println(nyc);\n ZonedDateTime london = nyc.withZoneSameInstant(ZoneId.of(\"Europe/London\"));\n System.out.println(london);\n\n //Some methods in the Month enum\n System.out.println(\"Days in Feb in a leap year: \" +\n Month.FEBRUARY.length(true));\n System.out.println(\"Day of year for first day of Aug (leap year): \" +\n Month.AUGUST.firstDayOfYear(true));\n System.out.println(\"Month.of(1): \" + Month.of(1));\n System.out.println(\"Adding two months: \" + Month.JANUARY.plus(2));\n System.out.println(\"Subtracting a month: \" + Month.MARCH.minus(1));\n\n //Creating Dates and Times from Existing Instances\n //Once you’ve created a LocalDate, LocalTime, LocalDateTime, or ZonedDateTime,\n //it can no longer be changed. each returns a new instance, which is a copy of the original with the added\n //amount.\n\n //Using plus methods on LocalDate and LocalTime\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n LocalDate start = LocalDate.of(2017, Month.FEBRUARY, 2);\n LocalDate end = start.plusDays(3);\n assertEquals(\"2017-02-05\", end.format(formatter));\n end = start.plusWeeks(5);\n assertEquals(\"2017-03-09\", end.format(formatter));\n end = start.plusMonths(7);\n assertEquals(\"2017-09-02\", end.format(formatter));\n end = start.plusYears(2);\n assertEquals(\"2019-02-02\", end.format(formatter));\n\n formatter = DateTimeFormatter.ISO_LOCAL_TIME;\n LocalTime startLocaltime = LocalTime.of(11, 30, 0, 0);\n LocalTime endLocaltime = startLocaltime.plusNanos(1_000_000);\n assertEquals(\"11:30:00.001\", end.format(formatter));\n startLocaltime = startLocaltime.plusSeconds(20);\n assertEquals(\"11:30:20\", end.format(formatter));\n startLocaltime = startLocaltime.plusMinutes(45);\n assertEquals(\"12:15:00\", end.format(formatter));\n startLocaltime = startLocaltime.plusHours(5);\n assertEquals(\"16:30:00\", end.format(formatter));\n\n Period period = Period.of(2, 3, 4); // 2 years, 3 months, 4 days\n LocalDateTime startLocalDateTime = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n LocalDateTime endLocalDateTime = startLocalDateTime.plus(period);\n assertEquals(\"2019-05-06T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.plus(3, ChronoUnit.HALF_DAYS);\n assertEquals(\"2017-02-03T23:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.minus(period);\n assertEquals(\"2014-10-29T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.minus(2, ChronoUnit.CENTURIES);\n assertEquals(\"1817-02-02T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.plus(3, ChronoUnit.MILLENNIA);\n assertEquals(\"5017-02-02T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n LocalDateTime start2 = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n LocalDateTime end2 = start2.withMinute(45);\n assertEquals(\"2017-02-02T11:45:00\",\n start2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withHour(16);\n assertEquals(\"2017-02-02T16:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withDayOfMonth(28);\n assertEquals(\"2017-02-28T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withDayOfYear(300);\n assertEquals(\"2017-10-27T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withYear(2020);\n assertEquals(\"2020-02-02T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n LocalDateTime start3 = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n start3.withDayOfMonth(29);\n\n //Adjusting the month to an invalid value\n LocalDateTime start4 = LocalDateTime.of(2017, Month.JANUARY, 31, 11, 30);\n LocalDateTime end4 = start4.with(ChronoField.MONTH_OF_YEAR, 2);\n assertEquals(\"2017-02-28T11:30:00\",\n end.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n\n }", "public static String getCurrentDate() {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"); \n LocalDateTime now = LocalDateTime.now(); \n return dtf.format(now);\n }", "public static void main(String[] args) {\r\n//\t\tlong totalSeconds = System.currentTimeMillis() / 1000;\r\n//\t\tint currentSecond = (int) (totalSeconds % 60);\t\t\t\t\t\tformulas used to calculate current seconds, minutes and hours\r\n//\t\tint currentMinute = (int) ((totalSeconds / 60) % 60);\r\n//\t\tint currentHour = (int) (((totalSeconds / 60) / 60) % 24);\r\n\t\tlong currentMillis = System.currentTimeMillis();\r\n\t\tSimpleDateFormat simpleDate = new SimpleDateFormat(\"dd MMM, yyyy HH:mm:ss\"); \t//usage of SimpleDateFormat class allows us to format the date we're going to \r\n\t\tDate date = new Date(currentMillis);\t\t\t\t\t\t\t\t\t\t//print in order we want(days, months, year, and time\r\n\t\tSystem.out.println(simpleDate.format(date));\t\t\t\t\t\t\t\t//while printing we're using SDF to format date output\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tLocalDate date = LocalDate.now(); \n\t\tSystem.out.println(date);\n\t\t//date.atStartOfDay();\n\t\t int d=date.getDayOfMonth();\n\t\t System.out.println(d);\n\t\t int y=date.getYear();\n\t\t System.out.println(y);\n\t\t int m=date.getMonthValue();\n\t\t System.out.println(m);\n\t\t\n\t\t \n\t\t \n\t\t \n\t\t\n\t\t \n\t\t \n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"현재 기준 월요일 날짜 : \" + getCurMonday());\r\n\t\t\r\n\t\tSystem.out.println(\"현재 기준 일요일 날짜 : \" + getCurSunday());\r\n\t\t\r\n\t\tSystem.out.println(\"현재 날짜 기준 주차 : \" + getWeek());\r\n\t\t\r\n\t\tSystem.out.println(\"설정한 날의 해당월의 마지막날짜 : \" + lastDayOfMonth(\"20190924\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString dateTime = \"\";\r\n\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tDate d = new Date();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMM\");\r\n\r\n\t\ttry {\r\n\t\t\tString today = \"\"; // 오늘\r\n\t\t\tDate targetDay = null; // Biz 로그 대상일(하루 전일자)\r\n\t\t\ttoday = sdf.format(d);\r\n\t\t\ttargetDay = sdf.parse(today);\r\n\t\t\tcal.setTime(targetDay);\r\n\t\t\tcal.add(Calendar.DAY_OF_MONTH, -2);\r\n\t\t\tdateTime = sdf.format(cal.getTime());\r\n\t\t} catch (ParseException pe) {\r\n\t\t\tSystem.out.println(pe);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tSystem.out.println(dateTime);\r\n\t\t\r\n\t}", "public void printDate() {\r\n printDayOfWeek();\r\n System.out.println(cur.getDay());\r\n printMonth();\r\n System.out.println(cur.getYear());\r\n }", "public static void main(String[] args) {\n\t\tDate today = new Date();\r\n\t\t\r\n\t\tSystem.out.println(random()); //////// 이렇게 생략가능 Math.random() -> random()\r\n\t\t\r\n\t\tSimpleDateFormat date = new SimpleDateFormat(\"yyyy/MM/dd\");//연도,월,일 순으로 date에 저장\r\n\t\tSimpleDateFormat time = new SimpleDateFormat(\"hh:mm:ss a\");\r\n\t\t\r\n\t\tSystem.out.println(\"오늘 날짜는 \" + date.format(today));\r\n\t\tSystem.out.println(\"현재 시간은 \" + time.format(today));\r\n\t}", "@Test\n\tpublic void getTheCurrentDateSystem() {\n\t\tAssert.assertNotNull(\"The actual date is returned in the expected format \",\n\t\t\t\tTimeMilisecondHelper.fromMilisecondsToDate());\n\t}", "public static String getCurrentDate() {\n\n long now = System.currentTimeMillis();\n if ((now - currentDateGenerated) > 1000) {\n synchronized (format) {\n if ((now - currentDateGenerated) > 1000) {\n currentDateGenerated = now;\n currentDate = format.format(new Date(now));\n }\n }\n }\n return currentDate;\n\n }", "public static void displayDate(Locale locale)\n\t{\n\t\tDateFormat dateFormat = DateFormat.getDateInstance(DateFormat.DEFAULT, locale);\n\t\tDate currentDate = new Date();\n\t\tString date = dateFormat.format(currentDate);\n\t\tSystem.out.println(\"Date value in \" + locale + \" locale = \" + date);\n\t}", "public void displayDate() {\n\t\tSystem.out.print(year + \"/\" + month + \"/\" + day);\r\n\t}", "public static String datetimeNow(){\n return now(DATETIME_FORMAT_PATTERN);\n }", "public void m1() {\n\t\tLocalDate dateInIndia = LocalDate.now();\r\n\t\tSystem.out.println(\"Date in India \" +dateInIndia);\r\n\r\n\t\t// Current Date and Time\r\n\t\t\t\tLocalTime timeInIndia = LocalTime.now();\r\n\t\t\t\tSystem.out.println(\"Time in India \" +timeInIndia);\r\n\t\t\r\n\t\t\r\n\t\tZoneId PSTZone = ZoneId.of(\"America/Los_Angeles\");\r\n\t\tLocalDate dateInUS = LocalDate.now(PSTZone);\r\n\t\tSystem.out.println(\"Date in US \" +dateInUS);\r\n\t\t\r\n\t\tLocalTime timeInUS = LocalTime.now(PSTZone);\r\n\t\tSystem.out.println(\"Time in US \" +timeInUS);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now);\n String strTime = sdfTime.format(now);\n System.out.println(\"Date: \" + strDate);\n System.out.println(\"Time: \" + strTime); \n return \"date\"+strDate+\" \"+strTime;\n\t}", "public static void main(String[] args) {\n\t\tZoneId zone = ZoneId.systemDefault();\n\t\tSystem.out.println(\"My Time Zone is: \" + zone);\n\t\t\n\t\t// Calculate Time in America/Los_Angeles\n\t\tZoneId la = ZoneId.of(\"America/Los_Angeles\");\n\t\tZonedDateTime dt = ZonedDateTime.now(la);\n\t\tSystem.out.println(dt);\n\n\t}", "public static void main(String[] args) {\n GregorianCalendar date = new GregorianCalendar();\n\n // display current date time\n System.out.print(date.get(GregorianCalendar.YEAR) + \"/\");\n System.out.print(date.get(GregorianCalendar.MONTH) + \"/\");\n System.out.print(date.get(GregorianCalendar.DAY_OF_MONTH));\n\n // change time\n long elapsedTime = 1234567898765L;\n date.setTimeInMillis(elapsedTime);\n\n // redisplay\n System.out.println();\n System.out.print(date.get(GregorianCalendar.YEAR) + \"/\");\n System.out.print(date.get(GregorianCalendar.MONTH) + \"/\");\n System.out.print(date.get(GregorianCalendar.DAY_OF_MONTH));\n }", "public static void main(String[] args) {\n\t\tDateTime dt = new DateTime();\r\n\t\tCalendar c1 = Calendar.getInstance();\r\n\t\tc1.setTimeInMillis(dt.getMillis());\r\n\t\tCalendar c2 = dt.toCalendar(Locale.getDefault());\r\n\t\t System.out.println(c1.getTime());\r\n\t\t System.out.println(c2.getTime());\r\n\t}", "public static String now() {\n\t\t\treturn fromCalendar(GregorianCalendar.getInstance());\n\t\t}", "public static Date getCurrentDate() {\n return new Date();\n }", "public static String getCurrentTime() {\r\n\t\tDate date = new Date();\r\n\t\treturn date.toString();\r\n\t}", "public static String now() {\n // TODO: move this method to DateUtils\n return fromCalendar(GregorianCalendar.getInstance());\n }", "private String getCurrentDate() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Calendar cal = Calendar.getInstance();\n return dateFormat.format(cal.getTime());\n }", "public static void main(String[] args) {\n\n LocalDate date = LocalDate.now();\n System.out.println(\"print date- \"+date);\n // print day \n DayOfWeek dow = date.getDayOfWeek();\n System.out.println(\"print day name - \"+ dow);\n int dateNo = date.getDayOfMonth();\n System.out.println(\"print day (number) - \"+ dateNo);\n // print month \n Month monthName = date.getMonth();\n System.out.println(\"print month name - \"+ monthName);\n int monthNo = date.getMonthValue();\n System.out.println(\"print month (Number) - \"+ monthNo);\n // print month \n int year = date.getYear();\n System.out.println(\"print year - \"+ year);\n // print particuller date like birth day\n LocalDate birthDay = LocalDate.of(1990, Month.NOVEMBER, 20);\n System.out.println(\"print particuller date - \"+birthDay);\n }", "public Main() {\n initComponents();\n setColor(btn_home);\n String date = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\").format(new Date());\n jcurrentDate.setText(date);\n \n }", "public static void main(String[] args) {\n\t\tDate DateDisplay = new Date();\r\n\t\tDateDisplay.start();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"Hello World\");\r\n\t\tSystem.out.println(\"Today's Date: \"+new Date());\r\n\t}", "public static void main(String[] args) {\n MutableDateTime dateTime = new MutableDateTime();\n System.out.println(\"Current date = \" + dateTime);\n\n // Find the first day of the next month can be done by:\n // 1. Add 1 month to the date\n // 2. Set the day of the month to 1\n // 3. Set the millis of day to 0.\n dateTime.addMonths(1);\n dateTime.setDayOfMonth(1);\n dateTime.setMillisOfDay(0);\n System.out.println(\"First day of next month = \" + dateTime);\n }", "public static void main(String[] args){\n\t\tCalendar now = Calendar.getInstance(); // Gets the current date and time\n\t\tint year = now.get(Calendar.YEAR); \n\t\tint moth = now.get(Calendar.MONTH);\n\t\tint date = now.get(Calendar.DATE); \n\t\tDate d = now.getTime();\n\t\tTime t = ServletFunctions.getNowTime();\n\t\tSystem.out.println(t);\n\t\tSystem.out.println(year+\"-\"+moth+\"-\"+date);\n\t\t\n\t\tSystem.out.println(moth);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(d);\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tString ti = \"22:12:22\";\n\t\ttry {\n\t\t\tjava.sql.Time timeValue = new java.sql.Time(formatter.parse(ti).getTime());\n\t\t\tSystem.out.println(timeValue);\n\t\t} catch (ParseException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tDateTimeFormatter formatterr = DateTimeFormatter.ofPattern(\"HH:mm:ss\");\n\t\tString str = \"12:22:10\";\n\t\tLocalTime time = LocalTime.parse(str, formatterr);\n\t\tSystem.out.println(time);\n\t\t\n\t\tTime tt = ServletFunctions.strToTime(\"08:10:12\");\n\t\tSystem.out.println(tt);\n\t}", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "public static void main(String[] args) {\n\t\tDate today = new Date();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy:MM:dd hh:MM:ss\");\n\t\tString s= sdf.format(today);\n\t\tSystem.out.println(s);\n\t}", "public static void main (String args[]){\n Date date = new Date();\n\n // display time and date using toString()\n System.out.println(\"The current date is: \" + date.toString());\n // display time and date\n System.out.printf(\"%1$s %2$tB %2$td, %2$tY\", \"Due date: \", date);\n System.out.println(\"\\n\");\n\n Date dNow = new Date( );\n SimpleDateFormat ft =\n new SimpleDateFormat (\"E yyyy.MM.dd 'at' hh:mm:ss a zzz\");\n /* For more info, look for: https://www.tutorialspoint.com/java/java_date_time.htm*/\n\n System.out.println(\"Current Date: \" + ft.format(dNow));\n\n\n SimpleDateFormat ft2 = new SimpleDateFormat (\"yyyy-MM-dd\");\n String input = args.length == 0 ? \"1818-11-11\" : args[0];\n\n System.out.print(input + \" Parses as \");\n Date t;\n try {\n t = ft2.parse(input);\n System.out.println(t);\n } catch (ParseException e) {\n System.out.println(\"Unparseable using \" + ft);\n }\n\n try {\n long start = System.currentTimeMillis( );\n System.out.println(new Date( ) + \"\\n\");\n\n Thread.sleep(5*60*10);\n System.out.println(new Date( ) + \"\\n\");\n\n long end = System.currentTimeMillis( );\n long diff = end - start;\n System.out.println(\"Difference is : \" + diff);\n } catch (Exception e) {\n System.out.println(\"Got an exception!\");\n }\n\n }", "public static String getCurrentDateTime() {\n String format = null;\n format = sdfNormal.format(new Date());\n return format;\n }", "public static void main(String[] args) {\n\t\tDate d1=new Date();\n\t\tSystem.out.println(\"date is\"+d1);\n\t\t\n\n\t}", "public static void main(String argv[])\n {\n Calendar cal = Calendar.getInstance();\n\n //Sets TimeZone variable time to our default time zone (America/New_York)\n TimeZone time = TimeZone.getDefault();\n\n //Sets table format for output\n System.out.println(\"Time zone: City: Time:\");\n System.out.println();\n\n //Sets a time format for the output\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh:mm:ss\");\n \n //Prints out the time and timezone in Washington DC\n \n //If cal.get(Calendar.AM_PM returns a value of 0 than AM is printed, \n //otherwise PM is printed\n if (cal.get(Calendar.AM_PM) == 0)\n System.out.println(time.getID() + \" \" + \"Washington DC \" + sdf.format(cal.getTime()) + \" AM\");\n else\n System.out.println(time.getID() + \" \" + \"Washington DC \" + sdf.format(cal.getTime()) + \" PM\");\n\n //Prints out the time in Los Angeles\n time = TimeZone.getTimeZone(\"America/Los_Angeles\");\n \n //Sets the SimpleDateFormat variable to the time zone given by the time variable\n //to display the time\n sdf.setTimeZone(time);\n \n //Sets the calendar to the time zone given by the time variable to display AM/PM\n cal.setTimeZone(time);\n\n if (cal.get(Calendar.AM_PM) == 0)\n System.out.println(time.getID() + \" \" + \"Los Angeles \" + sdf.format(cal.getTime()) + \" AM\");\n else\n System.out.println(time.getID() + \" \" + \"Los Angeles \" + sdf.format(cal.getTime()) + \" PM\");\n\n //Prints out the time in Amsterdam\n time = TimeZone.getTimeZone(\"Europe/Amsterdam\");\n sdf.setTimeZone(time);\n cal.setTimeZone(time);\n\n if (cal.get(Calendar.AM_PM) == 0)\n System.out.println(time.getID() + \" \" + \" Amsterdam \" + sdf.format(cal.getTime()) + \" AM\");\n else\n System.out.println(time.getID() + \" \" + \" Amsterdam \" + sdf.format(cal.getTime()) + \" PM\");\n\n //Prints out the time in Jerusalem\n time = TimeZone.getTimeZone(\"Asia/Jerusalem\");\n sdf.setTimeZone(time);\n cal.setTimeZone(time);\n\n if (cal.get(Calendar.AM_PM) == 0)\n System.out.println(time.getID() + \" \" + \" Jerusalem \" + sdf.format(cal.getTime()) + \" AM\");\n else\n System.out.println(time.getID() + \" \" + \" Jerusalem \" + sdf.format(cal.getTime()) + \" PM\");\n\n //Prints out the time in Hong Kong\n time = TimeZone.getTimeZone(\"Asia/Hong_Kong\");\n sdf.setTimeZone(time);\n cal.setTimeZone(time);\n\n if (cal.get(Calendar.AM_PM) == 0)\n System.out.println(time.getID() + \" \" + \" Hong Kong \" + sdf.format(cal.getTime()) + \" AM\");\n else\n System.out.println(time.getID() + \" \" + \" Hong Kong \" + sdf.format(cal.getTime()) + \" PM\");\n\n }", "public static String getCurrentTime()\n\t{\n\t\treturn getTime(new Date());\n\t}", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "public static void main(String[] args) {\n \n String day;\n String date;\n String month;\n int year;\n \n day = \"Friday\";\n date = \"4th\";\n month = \"March\";\n year = 2016;\n System.out.println(\"The current date is:\");\n System.out.println(day);\n System.out.println(date);\n System.out.println(month);\n System.out.println(year);\n \n }", "public static String now(){\n return now(DATE_FORMAT_PATTERN);\n }", "public static void main(String[] args) {\n\n String s = DateUtil.formatNow(\"yyyy-MM-dd HH:mm:ss.SSS\");\n\n System.out.println(s);\n\n }", "public static String getToday() {\n return getToday(\"yyyy-MM-dd HH:mm:ss\");\n }", "private static String getFormattedCurrentDateAndTime(){\n StringBuilder dateAndTime = new StringBuilder();\n LocalDateTime now = LocalDateTime.now();\n\n String hour = Integer.toString(now.getHour());\n String minute = Integer.toString(now.getMinute());\n\n if (hour.length() == 1){\n hour = \"0\" + hour;\n }\n if (minute.length() == 1){\n minute = \"0\" + minute;\n }\n\n //Creates \"XX/XX/XX @ XX:XX\" format (24 hours)\n dateAndTime.append(now.getMonthValue()).append(\"/\").\n append(now.getDayOfMonth()).append(\"/\").\n append(now.getYear()).append(\" @ \").\n append(hour).append(\":\").\n append(minute);\n\n return dateAndTime.toString();\n }", "public static void main(String[] args) {\n\n\t\tDate date = new Date();\n\t\tSystem.out.println(date.toString());\n\t\t\n\t\t//If date is required in specific format\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy hh::mm::ss\");\n\t\tsdf.format(date);\n\t\tSystem.out.println(\"In required date format \"+sdf.format(date));\n\t\t\n\t\t//Using calendar objects\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSimpleDateFormat sdf1 = new SimpleDateFormat(\"M/d/yyyy hh::mm::ss\");\n\t\tSystem.out.println(\"Using the Calendar objects \"+sdf1.format(cal.getTime()));\n\t\tSystem.out.println(\"Methods in Calendar \"+Calendar.DAY_OF_WEEK_IN_MONTH);\n\t\t\n\t\t\n\t}", "private static String currentTimestamp()\r\n {\n \r\n long currentTime = System.currentTimeMillis();\r\n sCalendar.setTime(new Date(currentTime));\r\n \r\n String str = \"\";\r\n str += sCalendar.get(Calendar.YEAR) + \"-\";\r\n \r\n final int month = sCalendar.get(Calendar.MONTH) + 1;\r\n if (month < 10)\r\n {\r\n str += 0;\r\n }\r\n str += month + \"-\";\r\n \r\n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\r\n if (day < 10)\r\n {\r\n str += 0;\r\n }\r\n str += day;\r\n \r\n str += \"T\";\r\n \r\n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\r\n if (hour < 10)\r\n {\r\n str += 0;\r\n }\r\n str += hour + \":\";\r\n \r\n final int minute = sCalendar.get(Calendar.MINUTE);\r\n if (minute < 10)\r\n {\r\n str += 0;\r\n }\r\n str += minute + \":\";\r\n \r\n final int second = sCalendar.get(Calendar.SECOND);\r\n if (second < 10)\r\n {\r\n str += 0;\r\n }\r\n str += second + \".\";\r\n \r\n final int milli = sCalendar.get(Calendar.MILLISECOND);\r\n str += milli;\r\n \r\n str += \"Z\";\r\n \r\n return str;\r\n }", "public static void main(String[] args) {\n\n\t\tLocalDate date= LocalDate.now();\n\t\tSystem.out.println(date);\n\t\t\n\t\tLocalDate anyDate=LocalDate.of(2021, 7, 15);\n\t\tSystem.out.println(anyDate);\n\t\t\n\t\tLocalTime lt= LocalTime.now();\n\t\tSystem.out.println(lt);\n\n\t\tLocalTime ant= LocalTime.of(5, 56,24);\n\t\tSystem.out.println(ant);\n\t\t\n\t\tLocalDateTime ldt= LocalDateTime.now();\n\t\tSystem.out.println(ldt);\n\t\t\n\t\tLocalDateTime adt= LocalDateTime.of(anyDate,ant);\n\t\tSystem.out.println(adt);\n\t\t\n\t\tZonedDateTime zdt= ZonedDateTime.now();\n\t\tSystem.out.println(zdt);\n\t\t\n\t\tZoneId dZ=ZoneId.systemDefault();\n\t\tSystem.out.println(dZ);\n\n//\t\tZonedDateTime azdt= ZonedDateTime.of(anyDate,ant);\n//\t\tSystem.out.println(azdt);\n\t\t\n\t\tSet<String> zones = ZoneId.getAvailableZoneIds();\n\t\tzones.stream().sorted()\n\t\t\t\t\t\t.filter(z->z.startsWith(\"I\")||z.startsWith(\"A\"))\n\t\t\t\t\t\t.forEach(System.out::println);\n\t\t\n\n\t}", "public static void main(String[] args) {\n LocalDate d = LocalDate.of(1989, Month.APRIL, 1);\r\n System.err.println(d);\r\n LocalTime lt = LocalTime.now();\r\n System.err.println(lt);\r\n }", "public static String now() {\n return dateTimeFormatZ.format(new Date());\n }", "private String getCurrentTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "public static void main(String[] args) {\n\t\tCalendar today = new GregorianCalendar();\n\t\tSystem.out.println(today);\n\t\t\n\t\tGregorianCalendar christmas = new GregorianCalendar(1970,11,5);\n\t\t\n\t\tSystem.out.println(christmas.get(Calendar.DAY_OF_WEEK));\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd (E)\");\n\t\tSystem.out.println(sdf.format(christmas.getGregorianChange())); // 날짜오류\n\t\t\n\t\tSystem.out.println(sdf.format(today.getTime()));\n\t\t\n\t}", "public static void main(String[] args) throws ParseException {\n LocalDate dataAtual = LocalDate.now(); //temos a data atual aqui\n\n System.out.println(\"Data Atual: \" + dataAtual);\n\n LocalTime horaAtual = LocalTime.now(); //hora de agora\n\n System.out.println(\"Hora atual: \" + horaAtual.format(DateTimeFormatter.ofPattern(\"HH:mm:ss\")));\n\n LocalDateTime dataAutalHoraAtual = LocalDateTime.now();\n\n System.out.println(\"Hora e data atual: \" + dataAutalHoraAtual.format(DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm\")));\n }", "public static void main(String[] args) {\n\t\t\n\t\tDate d=new Date();\n\t\tSystem.out.println(d.toString());\n\t\t\n\t\t/**\n\t\t * mm/dd/yyyy format or HH:MM:SS format\n\t\t */\n\t\t//SimpleDateFormat sdf=new SimpleDateFormat(\"M/d/yyyy\");\n\t\t\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"M/d/yyyy hh:mm:ss\");\n\t\t\n\t\tSystem.out.println(sdf.format(d));\n\t\t\n\n\t}", "public static String getTime() {\r\n\r\n\t\t//Gets current date and time\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tDate date = new Date();\r\n\t\tcurrDateTime = dateFormat.format(date);\r\n\t\treturn currDateTime;\r\n\t}", "public static Date now()\r\n\t{\r\n\t\treturn new Date(System.currentTimeMillis());\r\n\t}", "public static void main(String []args) {\n ZonedDateTime zd1 = ZonedDateTime.now();\n ZonedDateTime zd2 = ZonedDateTime.now(ZoneId.of(\"Europe/London\"));\n \n System.out.println(zd1);\n System.out.println(zd2);\n \n \n }", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "private Date getCurrentDateTime() {\n return Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant());\n }", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public static String currentTimestamp()\n {\n \n long currentTime = System.currentTimeMillis();\n sCalendar.setTime(new Date(currentTime));\n \n String str = \"\";\n str += sCalendar.get(Calendar.YEAR) + \"-\";\n \n final int month = sCalendar.get(Calendar.MONTH) + 1;\n if (month < 10)\n {\n str += 0;\n }\n str += month + \"-\";\n \n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\n if (day < 10)\n {\n str += 0;\n }\n str += day;\n \n str += \"T\";\n \n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\n if (hour < 10)\n {\n str += 0;\n }\n str += hour + \":\";\n \n final int minute = sCalendar.get(Calendar.MINUTE);\n if (minute < 10)\n {\n str += 0;\n }\n str += minute + \":\";\n \n final int second = sCalendar.get(Calendar.SECOND);\n if (second < 10)\n {\n str += 0;\n }\n str += second + \".\";\n \n final int milli = sCalendar.get(Calendar.MILLISECOND);\n str += milli;\n \n str += \"Z\";\n \n return str;\n }", "public static void main(String[] args){\n \n time time = new Time();\n time.display();\n System.out.println(time);\n\n // h m s am\n Time time2 = new Time(10, 30, 0, true);\n\n time.display();\n }", "public static String getDateAndTime() {\n Calendar JCalendar = Calendar.getInstance();\n String JMonth = JCalendar.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.UK);\n String JDate = JCalendar.getDisplayName(Calendar.DATE, Calendar.LONG, Locale.UK);\n String JHour = JCalendar.getDisplayName(Calendar.HOUR, Calendar.LONG, Locale.UK);\n String JSec = JCalendar.getDisplayName(Calendar.SECOND, Calendar.LONG, Locale.UK);\n\n return JDate + \"th \" + JMonth + \"/\" + JHour + \".\" + JSec + \"/24hours\";\n }", "public static void main(String[] args){\n System.out.println(\"Hello World!\");\n \n // write the code you wish you have:\n // this is how we want to interact with dates - \n // the exercise is to create and fill the methods\n // in class Date\n // such that the this class compiles and the \n // program outputs the date in a \n // format like \"22.4.2022\". Start by uncommenting\n // the following lines (one by one) which will\n // result in a compile error - then define the \n // methods:\n //\n // Date date = new Date(2022,4,22);\n // System.out.println(date.format());\n }", "public static void main(String[] args) {\n\t\tCalendar cl = Calendar.getInstance();\r\n\t\tSystem.out.println(\"lich hien tai :\"+cl.getTime());\r\n\t\tSystem.out.println(\"min cua year \"+cl.getActualMinimum(Calendar.YEAR));\r\n\t\tSystem.out.println(\"min cua month \"+cl.getActualMinimum(Calendar.MONTH));\r\n\t\tSystem.out.println(\"min cua cac tuan trong thang \"+cl.getActualMinimum(Calendar.WEEK_OF_MONTH));\r\n\t\tSystem.out.println(\"min cac tuan trong nam \"+cl.getActualMinimum(Calendar.WEEK_OF_YEAR));\r\n\t\tSystem.out.println(\"min cac ngay trong tuan \"+cl.getActualMinimum(Calendar.DAY_OF_WEEK));\r\n\t\tSystem.out.println(\"min date \"+cl.getActualMinimum(Calendar.DATE));\r\n\t\tSystem.out.println(\"min cua cac day trong Month \"+cl.getActualMinimum(Calendar.DAY_OF_MONTH));\r\n\t\tSystem.out.println(\"min cua cac day trong year \"+cl.getActualMinimum(Calendar.DAY_OF_YEAR));\r\n\t\tSystem.out.println(\"min cua minute \"+cl.getActualMinimum(Calendar.MINUTE));\r\n\t\tSystem.out.println(\"min cua hour \"+cl.getActualMinimum(Calendar.HOUR));\r\n\t\tSystem.out.println(\"min cua hour trong day \"+cl.getActualMinimum(Calendar.HOUR_OF_DAY));\r\n\t\tSystem.out.println(\"min cua second \"+cl.getActualMinimum(Calendar.SECOND));\r\n\t}", "public static void main(String[] args) {\n\t\tDate dd = new Date();\r\n\t\tSystem.out.println(dd);//Fri Feb 07 16:09:49 CST 2020\r\n\t\tSystem.out.println(dd.getTime());//1581063032540 返回long类型的System.currentTimeMillis()\r\n\t\tlong theTime = System.currentTimeMillis();\r\n\t\tDate cc = new Date(theTime);\r\n\t\t//将System.currentTimeMillis转化为Date\r\n\t\tSystem.out.println(cc);//Fri Feb 07 16:12:19 CST 2020\r\n\t\tSystem.out.println(cc.getTime());\r\n\t}", "public static void main(String[] args) {\n Arrays.asList(\n LocalDate.now(),\n LocalTime.now(),\n LocalDateTime.now(),\n ZonedDateTime.now()).stream()\n .forEach(System.out::println);\n\n // LocalDate etc. may never be constructed directly!\n //LocalDate localDate = new LocalDate(); - will not compile: \"LocalDate(...) has private access\"\n\n // daily Scrum Standup at 9:15\n LocalTime dailyStandup = LocalTime.of(9, 15);\n // tomorrow (as seen from today, 18.5.17)\n LocalDate tomorrow = LocalDate.of(2017, Month.MAY, 19);\n\n // Constructing a new ZonedDateTime.\n ZoneId bern = ZoneId.of(\"Europe/Zurich\");\n ZonedDateTime bernStandup = ZonedDateTime.of(tomorrow, dailyStandup, bern);\n System.out.println(\"Scrum standup meeting tomorrow in Bern: \" + bernStandup); // 2017-05-19T09:15+02:00\n\n // Find other timezones\n String europeanTimezones = ZoneId.getAvailableZoneIds().stream()\n .filter(s -> s.contains(\"Europe\"))\n .limit(10)\n .reduce(\"\", (s, t) -> s + \", \" + t);\n System.out.print(\"Some timezones in Europe: \" + europeanTimezones);\n\n // When does our team in Shanghai have to be ready?\n ZoneId shanghai = ZoneId.of(\"Asia/Shanghai\");\n ZonedDateTime shanghaiStandup = bernStandup.withZoneSameInstant(shanghai);\n System.out.println(\"\\nScrum standup meeting tomorrow in Shanghai: \" + shanghaiStandup); // 15:15\n }", "public static String currentDate() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public static String getToday(String format) {\n Date c = Calendar.getInstance().getTime();\n System.out.println(\"Current time => \" + c);\n SimpleDateFormat df = new SimpleDateFormat(format, Locale.getDefault());\n return df.format(c);\n }", "public static final String CurrentTime() {\n\t\t\n\t\tfinal SimpleDateFormat DF = new SimpleDateFormat(\"HH:mm:ss\");\n\t\treturn DF.format(new Date());\n\t}", "public static String fn_GetCurrentTimeStamp() {\n\t\tDate dte = new Date();\n\t\tDateFormat df = DateFormat.getDateTimeInstance();\n\t\tString strdte = df.format(dte);\n\t\tstrdte = strdte.replaceAll(\":\", \"_\");\n\t\treturn strdte;\n\t}", "public static void main(String[] args) {\n\t\t\t\tDate d = new Date();\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat (\"dd.mm.yyyy\");\n\t\t\t\tString s = sdf.format(d);\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tJOptionPane.showMessageDialog(null, (s));\n\n\n\t\t\t\n\t\t\t\n\t\t\t\n\n\n\t}", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public static void main(String[] args) throws Exception{\n\t\t\t Date currentTime = new Date(95,7,6);\n\t\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MMM/YYYY\");\n\t\t\t String dateString = formatter.format(currentTime);\n\t\t\t System.out.println(dateString);\n\t\t\t \n\t\t}", "@Override\n public int doStartTag() throws JspException {\n final DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM).withLocale(Locale.getDefault());\n final String currentDate = formatter.format(LocalDate.now());\n final JspWriter out = pageContext.getOut();\n try {\n out.println(currentDate);\n } catch (IOException e) {\n throw new JspException(e.getMessage());\n }\n return SKIP_BODY;\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t DateConstructorExample obj=new DateConstructorExample(6,6,2010);\n\t\t \n\t\t//System.out.println(obj.DateFormat());\n\t\t//if we dont want to write the print statement in main method to display date then we can write the print statement directly in the constructor method\n\t}", "public String getCurrentTime(String timeForm) {\n DateFormat timeFormat = new SimpleDateFormat(timeForm);\n\n //get current date time with Date()\n Date time = new Date();\n\n // Now format the date\n String time1 = timeFormat.format(time);\n\n return time1;\n }", "private String currentTime()\t{\n\t\tCalendar c = Calendar.getInstance(); \n\n\t\tString seconds;\n\t\tif(c.get(Calendar.SECOND) < 10)\t{\n\t\t\tseconds = \"0\"+Integer.toString(c.get(Calendar.SECOND));\n\t\t} else {\n\t\t\tseconds = Integer.toString(c.get(Calendar.SECOND));\n\t\t}\n\n\t\tString minutes;\n\t\tif(c.get(Calendar.MINUTE) < 10)\t{\n\t\t\tminutes = \"0\"+Integer.toString(c.get(Calendar.MINUTE));\n\t\t} else {\n\t\t\tminutes = Integer.toString(c.get(Calendar.MINUTE));\n\t\t}\n\n\t\tString hours;\n\t\tif(c.get(Calendar.HOUR_OF_DAY) < 10)\t{\n\t\t\thours = \"0\"+Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t} else {\n\t\t\thours = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t}\n\n\t\tString day;\n\t\tif(c.get(Calendar.DATE) < 10)\t{\n\t\t\tday = \"0\"+Integer.toString(c.get(Calendar.DATE));\n\t\t} else {\n\t\t\tday = Integer.toString(c.get(Calendar.DATE));\n\t\t}\n\n\t\tString month;\n\t\tif((c.get(Calendar.MONTH)+1) < 10)\t{\n\t\t\tmonth = \"0\"+Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t} else {\n\t\t\tmonth = Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t}\n\n\t\tString year;\n\t\tif(c.get(Calendar.YEAR) < 10)\t{\n\t\t\tyear = \"0\"+Integer.toString(c.get(Calendar.YEAR));\n\t\t} else {\n\t\t\tyear = Integer.toString(c.get(Calendar.YEAR));\n\t\t}\n\n\t\treturn day+\"/\"+month+\"/\"+year + \" \"+hours+\":\"+minutes+\":\"+seconds;\t\n\t}", "public void now() {\n localDate = LocalDate.now();\n localDateTime = LocalDateTime.now();\n javaUtilDate = new Date();\n auditEntry = \"NOW\";\n instant = Instant.now();\n }" ]
[ "0.72955006", "0.71322745", "0.7066887", "0.6956372", "0.69150794", "0.6856413", "0.68486917", "0.67531574", "0.6733537", "0.6706275", "0.66898257", "0.6688768", "0.66496575", "0.6592659", "0.6580763", "0.6502544", "0.64479077", "0.6442345", "0.6435405", "0.64318657", "0.6430332", "0.6395281", "0.6342006", "0.6334899", "0.63246703", "0.626814", "0.6265858", "0.626203", "0.6254796", "0.62377906", "0.62238", "0.62152755", "0.6197236", "0.61961436", "0.6188326", "0.6177452", "0.61692846", "0.6169113", "0.6164795", "0.6164752", "0.6160079", "0.61210173", "0.6119177", "0.6118438", "0.611842", "0.61158186", "0.6113876", "0.6100583", "0.60980004", "0.60828114", "0.6080855", "0.60784864", "0.6076092", "0.6069667", "0.60680366", "0.6067203", "0.60621613", "0.60485363", "0.60348696", "0.60277754", "0.60127324", "0.6009209", "0.5987347", "0.5982223", "0.5958398", "0.59538305", "0.59536266", "0.593795", "0.59072936", "0.59060913", "0.589896", "0.589896", "0.5890775", "0.58854294", "0.5882643", "0.5876372", "0.5875628", "0.58629906", "0.585304", "0.5844495", "0.5837585", "0.58281845", "0.5821653", "0.581241", "0.580977", "0.5805205", "0.5804678", "0.5801709", "0.57874876", "0.57847697", "0.5784333", "0.5778138", "0.5774794", "0.5760218", "0.5756136", "0.57544774", "0.57514143", "0.5750139", "0.57383436", "0.5735218" ]
0.6818569
7
Get the bit depth of the image
public short getBitDepth() { return getShort(ADACDictionary.PIXEL_BIT_DEPTH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte getBitDepth();", "public native int getDepth() throws MagickException;", "int getBitsPerPixel();", "int getColorDepth();", "int depth();", "int depth();", "float getDepth();", "float getDepth();", "public int getDepth() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_SIZE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D0\"));\n return ((ImageComponent3DRetained)this.retained).getDepth();\n }", "int getDepth();", "public double getDepth();", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetColorDepth();", "public int depth ();", "int imageCount();", "public int getDepth();", "public Texture2D getDepthTexture()\n\t{\n\t\treturn mDepthTexture;\n\t}", "public static int getDepth() {\n return depth;\n }", "int getImgDataCount();", "public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }", "public int depth() {\n\t\treturn depthHelp(root);\r\n\t}", "public int getColorDepth() {\n\t\treturn colorDepth;\n\t}", "public int getDepth(){\r\n return this.depth;\r\n }", "public int getDepth() {\r\n return depth;\r\n }", "public int getNColor(){\n int nColor = getBit();\n\n if (nColor==0) {\n for (int i=0; i<7; i++) {\n nColor = (nColor<<1) | getBit();\n }\n }\n\n return nColor;\n }", "public float getDepth() {\n return depth;\n }", "public int getDepth()\n {\n return depth; \n }", "public int depth() {\r\n\t\treturn this.depth;\r\n\t}", "public int getDepth() {\n return depth;\n }", "public int getDepth(){\n\t\treturn _depth;\n\t}", "public int getDepth(){\n\t\treturn depth;\n\t}", "public float getDepth() {\n return depth_;\n }", "public int getDepth()\n {\n return m_Depth;\n }", "public int getAnalysisBits();", "public float getDepth() {\n return depth_;\n }", "public abstract int getBitSize();", "public int depth ( BinTree tree){\n\t\tint x = 1; \n\t\twhile( tree.left != null){\n\t\t\ttree= tree.left;\n\t\t\tx++;\n\t\t}\n\t\treturn x;\n\t}", "int dimensionality();", "public int numberOfBits() {\n return 8 * this.data.size();\n }", "public float getDepth() {\n return depth_;\n }", "public float getDepth() {\n return depth_;\n }", "public int getNumberOfImages() {\n\n\t\tshort zdim = getZDim();\n\t\tzdim = zdim > 0 ? zdim : 1;\n\n\t\tshort slices = getNumberOfSlices();\n\t\tslices = slices > 0 ? slices : 1;\n\n\t\tshort intervals = getNumberOfGatedIntervals();\n\t\tintervals = intervals > 0 ? intervals : 1;\n\n\t\treturn zdim * slices * intervals;\n\n\t}", "public int getDepth() {\n return getDepthRecursive(root);\n\n }", "public int size() {\n return numBits;\n }", "public String getnDepth() {\n return nDepth;\n }", "public static int sizeBits_count() {\n return 16;\n }", "public static int sizeBits_counter() {\n return 32;\n }", "public int depth(){\n if(root!=null){ // มี node ใน tree\n return height(root);\n }\n else {return -1;}\n }", "public int getDepth() {\n return depth_;\n }", "public float getDepth() {\r\n\t\treturn Float.parseFloat(getProperty(\"depth\").toString());\t\r\n\t}", "long getCategoryBits();", "public int getDepth() {\n return depth_;\n }", "public int getImageHeight()\n {\n \n int retVal = getImageHeight_0(nativeObj);\n \n return retVal;\n }", "public int bits() {\n return mat.getType().getBits();\n }", "public static int sizeBits_sampleCnt() {\n return 32;\n }", "int getNumSampleDimensions();", "private Integer getDepth(BinaryNode node, int depth) {\n\n if (node == null) return depth;\n else return Math.max(getDepth(node.left, depth + 1),getDepth(node.right, depth + 1));\n }", "public static int sizeBits_reading() {\n return 16;\n }", "public int getBitsPerComponent() {\n return bitsPerComponent;\n }", "public int getSize()\n\t{\n\t\treturn bits.size();\n\t}", "public int getBufferDepth() {\n return (this.bufferDepth);\n }", "public int bitCount() {\n @SuppressWarnings(\"deprecation\") int bc = bitCount - 1;\n if (bc == -1) { // bitCount not initialized yet\n bc = 0; // offset by one to initialize\n // Count the bits in the magnitude\n for (int i=0; i < mag.length; i++)\n bc += Integer.bitCount(mag[i]);\n if (signum < 0) {\n // Count the trailing zeros in the magnitude\n int magTrailingZeroCount = 0, j;\n for (j=mag.length-1; mag[j] == 0; j--)\n magTrailingZeroCount += 32;\n magTrailingZeroCount += Integer.numberOfTrailingZeros(mag[j]);\n bc += magTrailingZeroCount - 1;\n }\n bitCount = bc + 1;\n }\n return bc;\n }", "@Override\n\tpublic String getInfo()\n\t{\n\t\tString result = \"Adjust image levels, gamma, and/or change bit depth\";\n\t\treturn result;\n\t}", "int getDepthIndex() {\n return depthIndex;\n }", "public native int getNumFrames() throws MagickException;", "public int getImageCount() {\n return imageCount;\n }", "public static int sizeBits_infos_type() {\n return 16;\n }", "public static int sizeBits_quality() {\n return 16;\n }", "int getMax_depth();", "private int getDepthRaw(TreeNode root){\n if (root == null) {\n return 0;\n }\n\n int left = getDepthRaw(root.left);\n int right = getDepthRaw(root.right);\n if (left == -1 || right == -1) {\n return -1;\n }else{\n if (Math.abs(left - right) > 1) {\n return -1;\n }else{\n return Math.max(left, right) + 1;\n }\n }\n }", "public int getImageWidth()\n {\n \n int retVal = getImageWidth_0(nativeObj);\n \n return retVal;\n }", "int getRecursionDepth();", "public static int offsetBits_count() {\n return 16;\n }", "public int sizeInBits() {\n\t\treturn this.sizeinbits;\n\t}", "public Double getWellDepth() {\n\t\treturn wellDepth;\n\t}", "public int getSizeZ() throws ImageException {\r\n\tif (!bValid){\r\n\t\tthrow new ImageException(\"image not valid\");\r\n\t}\t\r\n\treturn sizeZ;\r\n}", "public int getPaletteCount() {\n return AviDemux.str2ulong( bih, 32 );\n }", "public static int bitCount(long i) {\r\n // HD, Figure 5-14\r\n\t\ti = i - ((i >>> 1) & 0x5555555555555555L);\r\n\t\ti = (i & 0x3333333333333333L) + ((i >>> 2) & 0x3333333333333333L);\r\n\t\ti = (i + (i >>> 4)) & 0x0f0f0f0f0f0f0f0fL;\r\n\t\ti = i + (i >>> 8);\r\n\t\ti = i + (i >>> 16);\r\n\t\ti = i + (i >>> 32);\r\n\t\treturn (int)i & 0x7f;\r\n }", "public static int sizeBits_dataType() {\n return 8;\n }", "public static int getTileBitSize() {\n return TILE_BIT_SIZE;\n }", "public int getHeight(){\n\t\tint h=maxDepth(root);\n\t\treturn h;\n\t}", "int depth(Node root) {\n\t\tif (root == null) return 0;\n\t\treturn Math.max(depth(root.left), depth(root.right)) + 1 ;\n\t}", "public static int sizeBits_group() {\n return 8;\n }", "public static double takeMaximumGrayLevel(BufferedImage image) {\n int maxLevel = (new Color(image.getRGB(0, 0))).getBlue();\n\n for (int i = 0; i < image.getWidth(); i ++) {\n for (int j = 0; j < image.getHeight(); j++) {\n int temp = (new Color(image.getRGB(i, j))).getBlue();\n if (maxLevel < temp) {\n maxLevel = temp;\n }\n }\n }\n\n return maxLevel;\n }", "public int getDepthMapFBO(){\n return depthMapFBO;\n }", "public static int sizeBits_length() {\n return 8;\n }", "public int getPixelStride() {\n return 4;\n }", "public static int getDepth(FeatureNode word)\n\t{\n\t\tif (null == word) return 0;\n\t\tint maxdepth = 0;\n\t\tFeatureNode fn = word.get(\"phr-head\");\n\t\twhile (fn != null)\n\t\t{\n\t\t\tFeatureNode subf = fn.get(\"phr-head\");\n\t\t\tif (subf != null)\n\t\t\t{\n\t\t\t\tint depth = getDepth(fn);\n\t\t\t\tif (maxdepth < depth) maxdepth = depth;\n\t\t\t}\n\t\t\tfn = fn.get(\"phr-next\");\n\t\t}\n\t\treturn maxdepth+1;\n\t}", "public native int getNumberColors() throws MagickException;", "private int depth()\r\n\t{\r\n\t\t// If tree is empty then there are 0 levels\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t// Tree is not empty so use recursive depth method starting at Root level 1 to figure out depth\r\n\t\treturn depth(getRoot(), 1);\r\n\t}", "public static int sizeBits_estLength() {\n return 8;\n }", "public static int getTileBits() {\n return TILE_BITS;\n }", "int depth(BTNode node) {\n int d = 0;\n while (node != root) {\n node = node.parent;\n d++;\n }\n return d;\n }", "int getNumberOfTextureCoordinates();", "public int getPixelSize() {\n\t\treturn pixelSize;\n\t}", "public static int sizeBits_nodeid() {\n return 8;\n }", "public Texture getDepthMapTexture(){\n return depthMap;\n }", "long getCollideBits();", "boolean hasDepth();", "boolean hasDepth();", "protected int computeColourfulDepth() {\n Point2D.Double p1, p2, p3;\r\n int depth = 0;\r\n for (int i1 = 0; i1 < k - 2; i1++) { // first colour\r\n for (int j1 = 0; j1 < sizes[i1]; j1++) { // j1 = 0..n_i1\r\n for (int i2 = i1 + 1; i2 < k - 1; i2++) { // second colour\r\n for (int j2 = 0; j2 < sizes[i2]; j2++) {\r\n for (int i3 = i2 + 1; i3 < k; i3++) {\r\n for (int j3 = 0; j3 < sizes[i3]; j3++) {\r\n p1 = colourSets.get(i1)[j1];\r\n p2 = colourSets.get(i2)[j2];\r\n p3 = colourSets.get(i3)[j3];\r\n if (checkIfInside(p1, p2, p3)) {\r\n depth++;\r\n // paint.paint(p1, p2, p3);\r\n double theta1 = Math.toDegrees(Math.atan2(p1.y, p1.x));\r\n double theta2 = Math.toDegrees(Math.atan2(p2.y, p2.x));\r\n double theta3 = Math.toDegrees(Math.atan2(p3.y, p3.x));\r\n if (theta1 < 0) {\r\n theta1 += 360;\r\n }\r\n if (theta2 < 0) {\r\n theta2 += 360;\r\n }\r\n if (theta3 < 0) {\r\n theta3 += 360;\r\n }\r\n if (Math.abs(theta2 - theta1) == 180 ||\r\n Math.abs(theta3 - theta2) == 180 ||\r\n Math.abs(theta1 - theta3) == 180){\r\n System.out.println(\"HEY HO\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n System.out.println(\"Small Differences in CSD = \" + smallDiff);\r\n return depth;\r\n }" ]
[ "0.8008814", "0.76396024", "0.72180116", "0.68214214", "0.67779434", "0.67779434", "0.67509896", "0.67509896", "0.6708904", "0.66738987", "0.65979445", "0.65532154", "0.6493505", "0.64243996", "0.64075863", "0.6386512", "0.6325033", "0.62037414", "0.61856955", "0.6171228", "0.6106176", "0.6090029", "0.60853183", "0.60850954", "0.6082544", "0.607682", "0.60630584", "0.6048023", "0.60465384", "0.60433614", "0.6033465", "0.60325235", "0.60324126", "0.6030064", "0.6020131", "0.6009011", "0.60039175", "0.59827584", "0.59797853", "0.59797853", "0.5976313", "0.5970882", "0.59697795", "0.5967463", "0.5961583", "0.59563726", "0.59415424", "0.59322935", "0.59304565", "0.5928695", "0.59084743", "0.5895635", "0.5889316", "0.58378595", "0.5834757", "0.5830775", "0.5829335", "0.582083", "0.5805105", "0.5794833", "0.57938397", "0.5769803", "0.57493824", "0.57432103", "0.5709089", "0.5701238", "0.5697746", "0.5693121", "0.5692591", "0.56908506", "0.56875134", "0.56412", "0.5638134", "0.56245285", "0.56216264", "0.5618247", "0.56160736", "0.56125826", "0.560926", "0.56076175", "0.55882186", "0.55794173", "0.55760056", "0.557346", "0.55726147", "0.5570667", "0.55682904", "0.5558912", "0.55517155", "0.55392826", "0.5538846", "0.55286044", "0.5526709", "0.5524945", "0.55197114", "0.5502486", "0.5493685", "0.5487861", "0.5487861", "0.5481144" ]
0.8056437
0
Return a floating point value represented by the key argument (a neardefinitive list is given in the dictionary class).
public float getFloat(short dictionaryKey) { return floatsMap.get(dictionaryKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getFloat(String key)\n {\n return getFloat(key, 0);\n }", "public Float getFloat(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Float) extGet(key);\n\t}", "public float getFloat(String key, float defaultValue);", "public float f(String key) throws AgentBuilderRuntimeException {\n\t\treturn getFloat(key).floatValue();\n\t}", "public Float getFloat(String key, Float defaultValue);", "public Float getFloat(String key)\n\t{\n\t\tDouble d = getDouble(key);\n\t\tif(d == null)\n\t\t\treturn null;\n\t\treturn d.floatValue();\n\t}", "public Float F(String key) throws AgentBuilderRuntimeException {\n\t\treturn getFloat(key);\n\t}", "@Nullable\r\n public Float getFloat(String key) {\r\n return getFloat(key, null);\r\n }", "public float getMandatoryFloat(String key) throws ConfigNotFoundException;", "public double getVariableValue(){\n\t\tObject valueKey = getEntries().keySet().stream().findFirst().orElseGet(()->{return 0d;});\n\t\tif (valueKey instanceof Double){\n\t\t\treturn (Double) valueKey;\n\t\t}\n\t\ttry {\n\t\t\tdouble value = Double.parseDouble(valueKey+\"\");\n\t\t\treturn value;\n\t\t}\n\t\tcatch (NumberFormatException ex){\n\t\t\treturn 0d;\n\t\t}\n\t}", "public float getFloat(String key) {\n\t\tfloat defaultValue = 0;\n\t\tif (getDefault(key) != null)\n\t\t\tdefaultValue = (Float) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tfloat value;\n\t\ttry {\n\t\t\tvalue = Float.parseFloat(sp);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tsetFloat(key, defaultValue);\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}", "double getDouble(String key) throws KeyValueStoreException;", "public Float getFloatData(String key) {\n return pref.getFloat(key, 0);\n }", "public double getDouble(String key)\n {\n return getDouble(key, 0);\n }", "public static float getFloatProperty(String key) {\r\n\t\treturn getFloatProperty(key, 0);\r\n\t}", "public static double getDouble(Key key) {\n return getDouble(key, 0);\n }", "public Iterable<Float> getFloats(String key);", "public double d(String key) throws AgentBuilderRuntimeException {\n\t\treturn getDouble(key).doubleValue();\n\t}", "public double getDouble(String key) {\n\t\treturn Double.parseDouble(get(key));\n\t}", "public float getFloat(String key, float fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getFloat(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return -1;\n Object obj = data.get(key);\n try\n {\n return Float.parseFloat(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "public Double getDouble(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Double) extGet(key);\n\t}", "double getDouble(String key, double defaultValue);", "public Double D(String key) throws AgentBuilderRuntimeException {\n\t\treturn getDouble(key);\n\t}", "public static Float parseJsonTogetValue(Response response,String key) {\n\t\tJsonPath js= new JsonPath(response.asString());\n\t\treturn js.get(key);\n\t}", "@Override\n public float getFloat(String key, float defaultVal) {\n return mSharedPreferences.getFloat(key, defaultVal);\n }", "public Double getDouble(String key, Double defaultValue);", "float getValue();", "float getValue();", "float getValue();", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "public static double getDoubleProperty(String key) {\r\n\t\treturn getDoubleProperty(key, 0);\r\n\t}", "public Double getDouble(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.DOUBLE)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), Double.class);\n\t\treturn (Double)value.value;\n\t}", "public static double getDouble(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Double.parseDouble(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as a double.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}", "double getDouble(String key) {\n double value = 0.0;\n try {\n value = mConfigurations.getDouble(key);\n } catch (JSONException e) {\n sLogger.error(\"Error retrieving double from JSONObject. @ \" + key);\n }\n return value;\n }", "public void put(String key, float value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public static double getDoubleParam(String key) throws InvalidParam {\n return getCurrentConfig().getDouble(key);\n }", "public double getDouble(String key, double fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getDouble(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Double.parseDouble(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "public List<Float> getFloatList(final String key) {\n return getFloatList(key, new ArrayList<>());\n }", "public static float getFloatProperty(String key, float defaultValue) {\r\n\t\treturn CommonUtil.parseAsFloat(prop.getProperty(key), defaultValue);\r\n\t}", "private static Double getDoubleProperty(String key) {\n String value = PROPERTIES.getProperty(key);\n // if the key is not found, Properties will return null and we should return a default value\n if (value == null) {\n return 0.0;\n }\n return Double.parseDouble(value);\n }", "public void saveFloat(String key,float value)\n {\n preference.edit().putFloat(key,value).apply();\n }", "public abstract float getValue();", "void put(String key, double value) throws StorageException, ValidationException, KeyValueStoreException;", "public double getValue(String s) throws DictionaryException{\n\t\tVariable v = get(new Variable(s,0));\t\t// Try to get the dictionary entry with this identifier\n\t\tif (v != null) return v.getValue();\t\t\t// if it comes back not null, use it to access the value\n\t\tthrow new DictionaryException(\"Variable <\" + s + \"> not defined.\");\t// Else throw and exception\n\t}", "Double getValue();", "public Iterable<Double> getDoubles(String key);", "public abstract float getasFloat(int tuple, int val);", "public static double getDoubleForKey(String key, double defaultValue) {\n SharedPreferences settings = ((Activity) sContext)\n .getSharedPreferences(CELibHelper.PREFS_NAME, 0);\n return settings.getFloat(key, (float) defaultValue);\n }", "public static void setDoubleForKey(String key, double value) {\n SharedPreferences settings = ((Activity) sContext)\n .getSharedPreferences(CELibHelper.PREFS_NAME, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putFloat(key, (float) value);\n editor.commit();\n }", "double getFloatingPointField();", "public double getExp(String k) {\n\t\t\n\t\tdouble value=0;\n\t\t\n\t\tif (quantData.containsKey(k)) {\n\t\t\tvalue = quantData.get(k);\n\t\t} else {\n\t\t\tSystem.out.println(\"Key not found\");\n\t\t\tvalue = 0.0;\n\t\t}\n\t\t\n\t\treturn value;\n\t\t\t\n\t}", "public Double getDouble(String key) throws JsonException {\r\n\t\tObject object = get(key);\r\n\t\tDouble result = PrimitiveDataTypeConvertor.toDouble(object);\r\n\t\tif (result == null) {\r\n\t\t\tthrow PrimitiveDataTypeConvertor.exceptionType(key, object, \"Double\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public abstract void getFloatImpl(String str, double d, Resolver<Double> resolver);", "void setDouble(String key, double val);", "public void putFloat (JSONObject target , String key , Float value){\r\n\t\tif ( value==null){\r\n\t\t\ttarget.put(key, JSONNull.getInstance());\r\n\t\t\treturn ; \r\n\t\t}\r\n\t\ttarget.put(key, new JSONNumber(value));\r\n\t}", "public static double getDoubleParam(String key, double dfault) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return dfault;\n }\n return cur.getDouble(key, dfault);\n }", "public double getDouble(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Double.parseDouble(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for long integer configuration parameter: \" + key);\n\t\t}\n\t}", "public double getDouble(String key, double defaultValue) {\n String lowerCaseKey = validateAndGetLowerCaseKey(key);\n\n if(map.containsKey(lowerCaseKey)) {\n String value = map.get(lowerCaseKey);\n\n try {\n return Double.parseDouble(value);\n } catch (NumberFormatException exception) {\n System.err.println(\"Unable to parse double: \" + exception.getMessage());\n }\n\n }\n return defaultValue;\n }", "@Override\n\tpublic Number computeMetricValue(Map<String, Number> values) {\n\t\treturn values.values().toArray(new Number[1])[0];\n\t}", "public Double getDouble(JSONValue val , String key){\r\n\t\tif ( val==null||key==null || key.length()==0)\r\n\t\t\treturn null ; \r\n\t\tJSONObject obj=val.isObject() ; \r\n\t\tif ( obj==null )\r\n\t\t\treturn null ; \r\n\t\tif (!obj.containsKey(key))\r\n\t\t\treturn null; \r\n\t\tJSONValue actualVal = obj.get(key);\r\n\t\tif ( actualVal.isNull() !=null)\r\n\t\t\treturn null ; \r\n\t\tif ( actualVal.isNumber() !=null)\r\n\t\t\treturn actualVal.isNumber().doubleValue();\r\n\t\treturn null ; \r\n\t}", "protected abstract float getValue(Entity e,FloatTrait t);", "double getValue();", "double getValue();", "double getValue();", "public double getInput(String k) {\n\t\t\n\t\tdouble value=0;\n\t\t\n\t\tif (quantData.containsKey(k)) {\n\t\t\tvalue = quantData.get(k);\n\t\t} else {\n\t\t\tSystem.out.println(\"Key not found\");\n\t\t\tvalue = 0.0;\n\t\t}\n\t\t\n\t\treturn value;\n\t\t\t\n\t}", "float get(int idx);", "public static double getDouble(Key key, double defaultValue) {\n try {\n return Double.valueOf(mPref.getString(key.name(), String.valueOf(defaultValue)));\n } catch (NumberFormatException nfe) {\n return defaultValue;\n }\n }", "public void put(final String key, final float value) {\n put(key, Float.toString(value));\n }", "public Float getValue () {\r\n\t\treturn (Float) getStateHelper().eval(PropertyKeys.value);\r\n\t}", "@Override\n public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {\n return mFormat.format((int)value) + \" kcal\"; // e.g. append a dollar-sign\n }", "public ObjectMap put(String key, float value) throws JsonException {\r\n\t\tobjectMap.put(check_Key(key), value);\r\n\t\treturn this;\r\n\t}", "public static float getValueFloat()\n {\n return Util.valueFloat;\n }", "@Override\n public void saveFloat(String key, float value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putFloat(key, value);\n prefs.commit();\n }", "public static double getFloat(Tag tag){\n makeInstance();\n return settingsFile.getFloat(tag);\n }", "double getBasedOnValue();", "public float getFloat(String name) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return -1F;\n }", "public void putFloatData(String key, Float value) {\n editor.putFloat(key, value);\n editor.apply();\n }", "String getFloat_lit();", "Double getFieldFloat(VcfEntry vcfEntry) {\n\t\tif (name.equals(\"QUAL\")) return vcfEntry.getQuality();\n\n\t\tString value = getFieldString(vcfEntry);\n\t\tif (value == null) return (Double) fieldNotFound(vcfEntry);\n\t\treturn Gpr.parseDoubleSafe(value);\n\t}", "protected final Double getDouble(final String key) {\n try {\n if (!jo.isNull(key)) {\n return jo.getDouble(key);\n }\n } catch (JSONException e) {\n }\n return null;\n }", "public List<Float> getFloatList(final String key, final List<Float> defaultValue) {\n return getList(Float.class, key, defaultValue);\n }", "public double getValue(Hashtable positions, int[] conf) {\n\n return 0.0;\n}", "public T get(Object key, T dflt) {\n Map.Entry<String, T> e = entries.get((String) key);\n return e != null ? e.getValue() : dflt;\n }", "public void setFloat(String key, float value) {\n\t\tif (getDefault(key) != null && (Float) getDefault(key) != value)\n\t\t\tinternal.setProperty(key, Float.toString(value));\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "Double getTotalFloat();", "public Float getFloat(String attr) {\n return (Float) super.get(attr);\n }", "public float getFloat(String name, float defaultValue)\n/* */ {\n/* 984 */ String value = getString(name);\n/* 985 */ if (value == null) {\n/* 986 */ return defaultValue;\n/* */ }\n/* 988 */ return PApplet.parseFloat(value, defaultValue);\n/* */ }", "@java.lang.Override\n\n public double getSpecialSamplingProbabilityMapOrThrow(\n java.lang.String key) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n java.util.Map<java.lang.String, java.lang.Double> map =\n internalGetSpecialSamplingProbabilityMap().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "public int get(String key) {\n\n // Hold the tmpNode node\n FreqNode tmpNode;\n\n //calculate the index by hashcode mod table length \n int index = Math.abs(key.hashCode()) % (frequencyTable.length);\n\n //if mapped location is empty\n if (frequencyTable[index] == null) {\n return 0; //does not effect the cosine similarity \n } else {\n //value is at the tmpNode \n tmpNode = frequencyTable[index];\n //for each value in table \n while (true) {\n //if tmpNode is null \n if (tmpNode == null) {\n return 0;\n } //else if the key is equal to this nodes key \n else if (key.equals(tmpNode.getKey())) {\n //return the value of this key \n return tmpNode.getValue();\n } else {\n //grab the next element as a last resort \n tmpNode = tmpNode.getNext();\n }//end else \n }//end else if \n }//end else\n }", "public float getFloatValue() {\n if (getValueIndex() <= 0)\n return 0F;\n return ((FloatEntry) getPool().getEntry(getValueIndex())).getValue();\n }", "@java.lang.Override\n\n public double getSpecialSamplingProbabilityMapOrThrow(\n java.lang.String key) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n java.util.Map<java.lang.String, java.lang.Double> map =\n internalGetSpecialSamplingProbabilityMap().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "public void put(String key, double value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public double calculateValue(Map<String, Double> variables) throws InvalidVariableNameException;", "Double getStartFloat();", "float getEFloat();", "Double getFreeFloat();", "public V getValue(K key);", "public V getValue(K key);", "public float evaluateAsFloat();", "public double getValue();" ]
[ "0.74096686", "0.7308208", "0.72899824", "0.7177877", "0.71126", "0.7002785", "0.6863695", "0.6821657", "0.6754448", "0.67316103", "0.6722492", "0.6705209", "0.6635582", "0.66265863", "0.6620947", "0.65428495", "0.6496515", "0.6476977", "0.63693774", "0.63204443", "0.62807983", "0.6247151", "0.6161313", "0.6111838", "0.60729665", "0.6035062", "0.59820294", "0.59820294", "0.59820294", "0.5967479", "0.5966956", "0.58974946", "0.58903927", "0.58771074", "0.58633286", "0.57718635", "0.5720042", "0.5687002", "0.56772643", "0.56269974", "0.5616074", "0.56157583", "0.5607563", "0.558714", "0.5584647", "0.5583491", "0.5579119", "0.5564448", "0.55376816", "0.55224", "0.55167514", "0.55121374", "0.5507141", "0.54984975", "0.54926735", "0.54752964", "0.5470692", "0.54556376", "0.54440683", "0.54405147", "0.54222256", "0.5403587", "0.5403587", "0.5403587", "0.54031444", "0.53974664", "0.5393924", "0.539246", "0.537564", "0.5356931", "0.53568196", "0.5353032", "0.5347584", "0.53359526", "0.5329387", "0.53249586", "0.5324063", "0.5317993", "0.5300213", "0.52915746", "0.52882725", "0.5280379", "0.52722037", "0.52583885", "0.5245127", "0.52446955", "0.5243767", "0.52435046", "0.52433646", "0.5237686", "0.52371955", "0.52318466", "0.5224284", "0.5220484", "0.52106494", "0.5210433", "0.5199583", "0.5199583", "0.51940995", "0.51919556" ]
0.74472344
0
get a string containing all the found keyvalue pairs.
public String toString() { StringBuffer header = new StringBuffer(); Iterator<ADACKvp> it = keyList.iterator(); while (it.hasNext()) { ADACKvp ak = it.next(); header.append(ADACDictionary.descriptions[ak.getKeyNum()]); header.append(" = "); header.append(ak.getString()); header.append("\n"); } return header.toString().trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn \"{\" + Strings.join(\",\", keyValuePair) + \"}\";\n\t}", "@Override\n\tpublic String toString() {\n\t\t\n\t\tSet<KeyValueData> keyvalueset = key_value_treemap.keySet();\n\t\tIterator<KeyValueData> iterator = keyvalueset.iterator();\n\t\tStringBuilder builder = new StringBuilder(\"*\");\n\t\twhile(iterator.hasNext()){\n\t\t\tKeyValueData data = iterator.next();\n\t\t\tbuilder.append(data.key);\n\t\t\tbuilder.append(\" \");\n\t\t\tbuilder.append(data.value);\n\t\t\tbuilder.append(\" \");\n\t\t}\n\t\treturn builder.toString();\n\t}", "public String toString()\r\n\t\t{\r\n\t\t\treturn \"|Key: \" + key + \", Value: \" + value + \"|\";\r\n\t\t}", "public String toString() {\r\n\t\treturn \"(\" + key + \",\" + value + \")\";\r\n\t}", "public String getAllResults() {\n StringBuilder sb = new StringBuilder();\n for (Map.Entry<String, String> results : resultMap.entrySet()) {\n sb.append(results.getKey().toString() + \" : \" + results.getValue().toString() + \"\\n\");\n }\n return sb.toString();\n }", "public String toString() {\n return key + \"=\" + value;\n }", "@Override\n\tpublic String toString(){\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < numObjects && key[i] != null; i++){\n\t\t\tresult += key[i].toString() + \" \";\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder buffer = new StringBuilder(128);\n\t\tIterator<Map.Entry<String, AbstractNode>> it = pairs.entrySet().iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tMap.Entry<String, AbstractNode> pair = it.next();\n\t\t\tbuffer.append(keyToString(pair.getKey()));\n\t\t\tbuffer.append(KEY_VALUE_SEPARATOR_CHAR);\n\t\t\tbuffer.append(' ');\n\t\t\tbuffer.append(pair.getValue());\n\t\t\tif (it.hasNext())\n\t\t\t{\n\t\t\t\tbuffer.append(PAIR_SEPARATOR_CHAR);\n\t\t\t\tbuffer.append(' ');\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tfinal AppendingStringBuffer buffer = new AppendingStringBuffer();\n\t\tboolean first = true;\n\t\tfor (Map.Entry<String, Object> entry : entrySet())\n\t\t{\n\t\t\tif (first == false)\n\t\t\t{\n\t\t\t\tbuffer.append(' ');\n\t\t\t}\n\t\t\tfirst = false;\n\n\t\t\tbuffer.append(entry.getKey());\n\t\t\tbuffer.append(\" = \\\"\");\n\t\t\tfinal Object value = entry.getValue();\n\t\t\tif (value == null)\n\t\t\t{\n\t\t\t\tbuffer.append(\"null\");\n\t\t\t}\n\t\t\telse if (value.getClass().isArray())\n\t\t\t{\n\t\t\t\tbuffer.append(Arrays.asList((Object[])value));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbuffer.append(value);\n\t\t\t}\n\n\t\t\tbuffer.append('\\\"');\n\t\t}\n\t\treturn buffer.toString();\n\t}", "@Override\n public String toString() {\n return new StringBuilder().append(\"key = \\\"\").append(key).append(\"\\\", values[] = \").append(valuesToStringBuilder()).append(\", message = \\\"\").append(message).append(\"\\\"\").toString();\n }", "public final String getKeys() {\n StringBuilder sb = new StringBuilder();\n boolean append = false;\n for (Key key : this.parameters.keySet()) {\n if (append)\n sb.append(\",\");\n sb.append(key);\n append = true;\n }\n return sb.toString();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn key + \"\";\r\n\t}", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\treturn key.toString() + \"=\" + value.toString();\r\n\t\t}", "public String getString(String key);", "public String[] fetchAllKeys();", "@Override\r\n public String toString() {\r\n return key.toString() + \"=\" + value.toString();\r\n }", "public String toString() {\r\n \treturn key;\r\n }", "public static String string() {\n\t\t\tString s = \"\";\n\t\t\ts += \"Locaux :\\n\";\n\t\t\tfor(String key : locaux.keySet()) {\n\t\t\t\tIdent i = locaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\t\t\ts += \"Globaux :\\n\";\n\t\t\tfor(String key : globaux.keySet()) {\n\t\t\t\tIdent i = globaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn keyConverter.apply(key) + KEY_VALUE_SEPARATOR_CHAR + ' ' + value;\n\t\t}", "String getString(String key);", "private String createCustomInfoString() {\r\n String CustomInfo = \"\";\r\n Iterator<String> iterator = mCustomParameters.keySet().iterator();\r\n while (iterator.hasNext()) {\r\n String CurrentKey = iterator.next();\r\n String CurrentVal = mCustomParameters.get(CurrentKey);\r\n CustomInfo += CurrentKey + \" = \" + CurrentVal + \"\\n\";\r\n }\r\n return CustomInfo;\r\n }", "public List<String> keysAsString() {\n\t\treturn iter.getItems().stream().map(e -> new String(e)).collect(toList());\n\t}", "public abstract List<String> getAllKeys();", "@Override\r\n public String toString() {\n \r\n StringBuilder sb = new StringBuilder(\"{\");\r\n for (int i = 0, size = size(); i < size; ++i) {\r\n if (i > 0) {\r\n sb.append(\", \");\r\n }\r\n \r\n sb.append(getNthKey(i)).append(\"=\").append(getNthValue(i)); \r\n }\r\n sb.append(\"}\");\r\n \r\n return sb.toString();\r\n }", "public String valuesFromMap() {\n\t\thashMap = createSimpleMap(\"Breakfast\", \"Eggs\");\n\t\treturn hashMap.get(\"Breakfast\");\n\t}", "public String toString () {\n String r = \"[ \";\n for (Env env = this; env != null; env = env.next) { \n r += env.key + \" \";\n }\n r += \"]\";\n return r;\n }", "public String toString() {\n\t\t\tif (this.getKey() == null) {\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn \"Key:\" + this.getKey() + \" Value:\" + this.getValue();\n\t\t\t}\n\t\t}", "public String toString()\n\t{\n\t\tString line=\"\";\n\t\tIterator<Integer> keySetIterator = recordMap.keySet().iterator(); \n\t\tInteger key;\n\t\twhile(keySetIterator.hasNext())\n\t\t{ \n\t\t\tkey = keySetIterator.next(); \n\t\t\tif (key == 0) line+=recordMap.get(key);\n\t\t\telse line+=DELIMITER+recordMap.get(key); \n\t\t}\n\t\treturn line;\n\t}", "public String toString(){\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < key; i++) {\n sb.append(getArtikel(i));\n }\n return sb.toString();\n }", "@Override\n\t\tpublic String toString() {\n\t\t\treturn \"<\"+key.toString()+\",\"+value.toString()+\">\";\n\t\t}", "@Override\n public String toString() {\n return key + \"=\" + value;\n }", "public String allValue2String() {\r\n\t\tStringBuffer allValue = new StringBuffer();\r\n\t\tfor (Object o : oredCriteria) {\r\n\t\t\tCriteria cr = (Criteria) o;\r\n\t\t\tif (cr.criteriaWithoutValue.size() > 0) {\r\n\t\t\t\tfor (Object o2 : cr.criteriaWithoutValue) {\r\n\t\t\t\t\tallValue.append(o2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cr.criteriaWithSingleValue.size() > 0) {\r\n\t\t\t\tfor (Object o2 : cr.criteriaWithSingleValue) {\r\n\t\t\t\t\tallValue.append(o2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cr.criteriaWithBetweenValue.size() > 0) {\r\n\t\t\t\tfor (Object o2 : cr.criteriaWithBetweenValue) {\r\n\t\t\t\t\tMap map = (Map) o2;\r\n\t\t\t\t\tString map_key = map.get(\"condition\") + \"\";\r\n\t\t\t\t\tallValue.append(map_key + \"\".trim());\r\n\t\t\t\t\tfor (Object o3 : (List) map.get(\"values\")) {\r\n\t\t\t\t\t\tallValue.append(o3 + \"\".trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cr.criteriaWithListValue.size() > 0) {\r\n\t\t\t\tfor (Object o2 : cr.criteriaWithListValue) {\r\n\t\t\t\t\tMap map = (Map) o2;\r\n\t\t\t\t\tString map_key = map.get(\"condition\") + \"\";\r\n\t\t\t\t\tallValue.append(map_key + \"\".trim());\r\n\t\t\t\t\tfor (Object o3 : (List) map.get(\"values\")) {\r\n\t\t\t\t\t\tallValue.append(o3 + \"\".trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn allValue.toString();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuffer buf = new StringBuffer(\"Dictionary contents:\\n\");\n\t\tfor (Iterator iter = entrySet().iterator(); iter.hasNext();) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tbuf.append(\" \").append(entry.getKey()).append(\" = \").append(\n\t\t\t\t\tentry.getValue()).append(\"\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuilder s = new StringBuilder();\n\t\tjava.util.Iterator<java.util.Map.Entry<String, Object>> iterator = entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tjava.util.Map.Entry<String, Object> entry = iterator.next();\n\n\t\t\ts.append('\\n');\n\t\t\ts.append(\"\\t\");\n\t\t\ts.append(entry.getKey());\n\t\t\ts.append(':');\n\t\t\ts.append(' ');\n\t\t\ts.append(entry.getValue().toString());\n\t\t}\n\t\treturn s.toString();\n\t}", "public String toString() {\n return \"{...(\" + this.size() + \" key(s) mapped to value(s))...}\";\n }", "List<String> getLookupValues();", "@Override\n\tpublic String toString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\t\n\t\tCIntMap termsFrequencies = null;\n\t\tfor( String tag : keySet()) {\n\t\t\tbuf.append(tag);\n\t\t\tbuf.append(\"\\n\");\n\t\t\ttermsFrequencies = get(tag);\n\t\t\tbuf.append(termsFrequencies);\n\t\t}\n\t\t\n\t\treturn buf.toString();\n\t}", "public String toString()\n {\n return key.toString() + \" => \" + item.toString();\n }", "private String getUsersToString()\n {\n ArrayList<String> list = new ArrayList<>();\n Iterator iterator = userList.entrySet().iterator();\n while (iterator.hasNext())\n {\n Map.Entry mapEntry = (Map.Entry) iterator.next();\n list.add(\"\" + mapEntry.getKey());\n }\n \n String returnString = \"\";\n if(list.size() > 0)\n {\n returnString = list.get(0);\n for(int i = 1; i < list.size(); i++)\n {\n returnString = returnString + \",\" + list.get(i);\n }\n }\n return returnString;\n }", "String getRetrieveKeysQuery();", "@Override\r\n\tpublic String toString() {\r\n\r\n\t\tStringBuilder b = new StringBuilder();\r\n\t\tint count = 0;\r\n\t\tfor (PGPSecretKeyRing key : keys) {\r\n\t\t\tif (count++ > 0)\r\n\t\t\t\tb.append(\"\\n\\n\");\r\n\t\t\tb.append(key.toString());\r\n\t\t}\r\n\t\treturn b.toString();\r\n\t}", "public String toString(){\n StringBuffer szBuf = new StringBuffer();\n Iterator<String> iter;\n String key;\n ChoiceEntry entry;\n \n iter = getEntriesName().iterator();\n while(iter.hasNext()){\n key = iter.next().toString();\n entry = getEntry(key);\n szBuf.append(entry.getStringRepr());\n if (entry.getKey().equals(_default)){\n szBuf.append(\" (Default)\");\n }\n if (iter.hasNext())\n szBuf.append(\"\\n\");\n }\n return szBuf.toString();\n }", "public String getString(Keys key) {\n\t\treturn getString(key, null);\n\t}", "public String toString(){\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < this.contains; i++){\n\t\t\tif (this.table[i] != null){\n\t\t\t\toutput = output + this.table[i].getKey() + \" \" + this.table[i].getValue() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}", "public String toString() {\n\treturn \"Key: \" + key.toString() + \"\\tData: \" + data;\n }", "public String getAsString(String key) {\n return entries.getProperty(key);\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\tfor (Entry<Object, Object> entry : this.entrySet())\n\t\t\tset.add(String.format(\"%s = %s%n\",\n\t\t\t\t\tentry.getKey(), entry.getValue()));\n\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (String s : set)\n\t\t\tbuf.append(s);\n\t\treturn buf.toString();\n\t}", "@Override\n public String toString() {\n return String.valueOf(key);\n }", "public String getCSVString() {\n StringBuilder builder = new StringBuilder();\n\n // key / value header\n builder.append(\"key,\\tvalue\");\n builder.append(System.getProperty(\"line.separator\").toString());\n\n // key / value pairs\n for (Entry<String, String> entry : results.entrySet()) {\n builder.append(entry.getKey());\n builder.append(\",\");\n builder.append(entry.getValue());\n builder.append(System.getProperty(\"line.separator\").toString());\n }\n\n builder.deleteCharAt(builder.length() - 1);\n return builder.toString();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn this.key;\r\n\t}", "public String toString() {\n String str = new String();\n Iterator keys;\n Object key;\n\n keys = cache.keySet().iterator();\n while (keys.hasNext()) {\n key = keys.next();\n\n // Key is instance of AttributeSet (ALWAYS TRUE), print it\n str += key.toString() + \"\\n\";\n }\n\n return str;\n }", "@Override\n public String toString(){\n return key;\n }", "@Override\n public String toString() {\n return key;\n }", "@Override\n\tpublic String toTransformerOutput() {\n\t\tString keyValueBlock = \"\";\n\t\tfor (KeyValuePair keyValuePairItem: keyValuePair) {\n\t\t\tkeyValueBlock = outputAddToBlock( keyValueBlock, keyValuePairItem.toTransformerOutput() );\n\t\t}\n\t\treturn OUTPUT_KEY_VALUE_BLOCK + outputBracedBlock( outputBracedList( keyValueBlock ) );\n\t}", "public String toString() { \n StringBuffer sb = new StringBuffer(); \n sb.append(\"[\"); \n sb.append(key);\n sb.append(\"]:\"); \n sb.append(apsPinKey);\n sb.append(\"|\");\n sb.append(apsSkillKey);\n sb.append(\"|\");\n sb.append(apsOthers);\n sb.append(\"|\");\n sb.append(apsCityKey);\n sb.append(\"|\");\n sb.append(apsRemarks);\n sb.append(\"|\");\n sb.append(activeStatus);\n sb.append(\"|\");\n sb.append(profileKey);\n sb.append(\"|\");\n sb.append(lockKey);\n sb.append(\"|\");\n sb.append(createdOn);\n return sb.toString(); \n }", "public void logAllPossibleKeysWithValue() {\n log.info(\"Log all possible keys with value:\");\n log.info(mapToString(context));\n }", "public static String showAll(){\n return resultsMap.toString();\n }", "@JsonIgnore\r\n\tpublic String getParameterValuesAsString() {\r\n\t\tif (parameterValues == null || parameterValues.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\tIterator it = parameterValues.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tString aValue = (String) it.next();\r\n\t\t\tbuffer.append(aValue);\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tbuffer.append(\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}", "public String toString(){\r\n\t\t\r\n\t\tString x =\"\";\r\n\t\t\r\n\t\tfor(int i=0; i < param.size() ; i++ ){\r\n\t\t\t\r\n\t\t\tx += param.get(i) + \"\\n\" ; \r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn x;\r\n\t}", "@Override\n public String toString() {\n String output;\n if (hasKeyIndex()) {\n output = key + \"(\" + index + \")\";\n } else if (hasArrayIndex()) {\n output = key + \"[\" + index + \"]\";\n } else {\n output = key;\n }\n return output;\n }", "public String getFoundKey(){\n return _key + \"Found?\";\n }", "public String getString(String key) {\r\n String value = (String) keyvaluepairs.get(key.toLowerCase());\r\n return value == null ? \"\" : value;\r\n }", "String getString( String key, String def);", "public String CheckedTagsToString ()\r\n\t{\n\t\tUpdateTagsList();\r\n\t\t\r\n\t\t// Preparing the tags string only the ones that checked\r\n\t\twhile (hmTags.values().remove(false));\r\n\r\n\t\t// Stringing tags\r\n\t\tString sReturned = hmTags.keySet().toString();\r\n\t\t\r\n\t\t// cutting the edges of the tags string [ ] \r\n\t\tsReturned = sReturned.substring(1, sReturned.length()-1);\r\n\t\t\r\n\t\treturn (sReturned);\r\n\t}", "@Override\n public String toString() {\n Gson gson = new Gson();\n String s = gson.toJson(this);\n return s;\n\n// return \"Pair: (\" + key + \",\" + value + \")\";\n }", "@Override\n public String toString() {\n return allRecords.stream()\n .flatMap(m -> m.entrySet().stream())\n .sorted(Comparator.comparing(Map.Entry::getKey))\n .map(Map.Entry::getValue)\n .collect(Collectors.joining());\n }", "public String getOptionsAsString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (!runtimeKeys.get(i))\n buf.append(key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (runtimeKeys.get(i))\n buf.append(\"* \" + key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "public String toString()\n {\n String ret = \"\";\n String s = adjMaps.toString();\n String[] parts = s.split(\"},\");\n for(int i=0; i< parts.length; i++){\n ret += parts[i] + \"}\\n\";\n }\n return ret;\n }", "String toStringStartValues();", "private String collect() {\n final Map<String, String> encoded = new HashMap<>();\n\n synchronized (parameters) {\n parameters.forEach((key, value) -> {\n try {\n for (String v : value) {\n encoded.put(CodecUtils.urlEncode(key), CodecUtils.urlEncode(v));\n }\n } catch (UnsupportedEncodingException e) {\n /* ignore unsupported encoded parameters. */\n logger.error(\"Failed to encode request, parameters: {}\", parameters);\n }\n });\n }\n\n return encoded.entrySet().stream().sorted(this::compareParameter)\n .map(entry -> entry.getKey() + \"=\" + entry.getValue())\n .collect(Collectors.joining(\"&\"));\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getOptional() != null)\n sb.append(\"Optional: \").append(getOptional()).append(\",\");\n if (getKey() != null)\n sb.append(\"Key: \").append(getKey()).append(\",\");\n if (getNoEcho() != null)\n sb.append(\"NoEcho: \").append(getNoEcho()).append(\",\");\n if (getQueryable() != null)\n sb.append(\"Queryable: \").append(getQueryable()).append(\",\");\n if (getDescription() != null)\n sb.append(\"Description: \").append(getDescription());\n sb.append(\"}\");\n return sb.toString();\n }", "private String toStringMap( Map<String, String[]> m ) {\n StringBuilder builder = new StringBuilder();\n m.keySet().forEach( ( k ) -> {\n builder.append( \"Key=\" ).append( k )\n .append( \", \" )\n .append( \"Value/s=\" ).append( Arrays.toString( m.get( k ) ) )\n .append( System.lineSeparator() );\n } );\n return builder.toString();\n }", "public String toString() {\r\n String result = \"\";\r\n //Check for empty list\r\n if(names.getFirst() == null) {\r\n return \"The Gift List is empty\";\r\n }\r\n //Iterates through each type of key in the list\r\n for(int i = 0; i < names.size(); i++) {\r\n String item = names.get(i);\r\n //Retrieve item\r\n Gift toFind = this.getGift(item);\r\n //Format output line by pulling values from above gift\r\n result += item + \"@ \" + toFind.getStore() + \" Price: \" + toFind.getCost() + \"\\n\";\r\n }\r\n //Final line, concluding the String output\r\n result += \"Total: $\" + totalCost +\" for \" + totalGifts + \" gifts!\";\r\n return result;\r\n }", "public String print() {\n\n String returnString = \"\";\n\n if (kv1 != null) {\n returnString += kv1.toString();\n }\n\n if (kv2 != null) {\n returnString += \" \" + kv2.toString();\n }\n\n return returnString;\n }", "public Iterable<String> getStrings(String key);", "public String getValues() {\n\t\tString[] valStrArr = values.toArray(new String[values.size()]);\n\t\tlogInfo(String.join(\", \", valStrArr));\n\t\treturn \"\"+String.join(\", \", valStrArr);\n\t}", "StringList keys();", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < mySize; i++) {\n\t\t\tfor (int j = 0; j < myBuckets.get(i).size(); j++) {\n\t\t\t\tsb.append(\"(\" + myBuckets.get(i).get(j).myKey + \", \" + myBuckets.get(i).get(j).myValue + \"), \");\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public void printValues(){\r\n\r\n for(String key : values.keySet()){\r\n String value = values.get(key).toString();\r\n System.out.println(key + \" = \" + value);\r\n }\r\n\r\n }", "public static String getValues(Calendar calendar) {\n\t\tString toReturn = \"\";\n\t\tTreeSet<Event> values = calendarToEvent.get(calendar);\n\t\tif (values == null) {\n\t\t\treturn toReturn;\n\t\t}\n\t\tfor (Event e : values) {\n\t\t\ttoReturn += e.toString() + \"\\n\";\n\t\t}\n\t\treturn toReturn;\n\t}", "public String showAllPersons() {\n String string = \"\";\n for(Person person: getPersons().values()){\n string += person.toString();\n }\n return string;\n }", "public String getQueryParamsAsString() {\n\t\tStringBuffer params = new StringBuffer(30);\n\t\tString key, value;\n\t\tfor (Iterator it = validQueryParams.keySet().iterator(); it.hasNext();) {\n\t\t\tkey = (String) it.next();\n\t\t\tvalue = (String) validQueryParams.get(key);\n\t\t\tparams.append(key).append(\"=\").append(value);\n//\t\t\tif (it.hasNext()) {\n\t\t\t\tparams.append(\"&\");\n//\t\t\t}\n\t\t}\n\t\t// add extral value(used in web page)\n\t\tparams.append(\"hasQueried=true\");\n\t\treturn params.toString();\n\t}", "public CharSequence toCharSequence()\r\n\t{\r\n\t\tfinal AppendingStringBuffer buffer = new AppendingStringBuffer();\r\n\r\n\t\tfor (String key : keySet())\r\n\t\t{\r\n\t\t\tif (key != null) {\r\n\t\t\t\tbuffer.append(' ');\r\n\t\t\t\tbuffer.append(Strings.escapeMarkup(key));\r\n\t\t\t\t\r\n\t\t\t\tCharSequence value = getCharSequence(key);\r\n\t\t\t\tif (value != null) {\r\n\t\t\t\t\tbuffer.append(\"=\\\"\");\r\n\t\t\t\t\tbuffer.append(Strings.escapeMarkup(value));\r\n\t\t\t\t\tbuffer.append('\"');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn buffer;\r\n\t}", "public String getValueString() {\n int len=0;\n for (String value : values)\n len += value.length();\n return Util.join(values, len>30 ?\"\\n\":\" \");\n }", "String toStringEndValues();", "public String toString() {\n if (this.size() <= 0) {\n return \"{}\";\n }\n StringBuilder stringBuilder = new StringBuilder(this.mSize * 28);\n stringBuilder.append('{');\n int n2 = 0;\n do {\n if (n2 >= this.mSize) {\n stringBuilder.append('}');\n return stringBuilder.toString();\n }\n if (n2 > 0) {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(this.keyAt(n2));\n stringBuilder.append('=');\n E e2 = this.valueAt(n2);\n if (e2 != this) {\n stringBuilder.append(e2);\n } else {\n stringBuilder.append(\"(this Map)\");\n }\n ++n2;\n } while (true);\n }", "@Override\n\tpublic String getSearchkeys() {\n\t\treturn matricule+\",\"+nom;\n\t}", "public String toOutputString()\n\t{\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (Entry<Object, Object> entry : this.entrySet())\n\t\t\tbuf.append(String.format(\"%s=%s%c\",\n\t\t\t\t\tentry.getKey(), entry.getValue(), 12));\n\t\treturn buf.toString();\n\t}", "@Override\r\n\t\tpublic String toString() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.toString();\r\n\t\t\t}\r\n\t\t}", "@Override\n public String toString() {\n return \"MultiKey\" + Arrays.toString(keys);\n }", "public String toString() {\n\t\tboolean first = true;\n\t\tStringWriter buf = new StringWriter();\n\t\tbuf.append('[');\n\t\tfor(String value : values) {\n\t\t\tif(first) { first = false; } else { buf.append(\",\"); }\n\t\t\tbuf.append(value);\n\t\t}\n\t\tbuf.append(']');\n\t\treturn buf.toString();\t\t\n\t}", "public synchronized String toString() {\n// int max = size() - 1;\n StringBuffer buf = new StringBuffer();\n\n buf.append(\"(\").append(super.toString());\n// \tfor (int i = 0; i <= max; i++) {\n// \t Map.Entry e = (Map.Entry) (it.next());\n// Object key = e.getKey();\n// Object value = e.getValue();\n// buf.append((key == this ? \"(this Map)\" : key) + \"=\" + \n// (value == this ? \"(this Map)\" : value));\n\n// \t if (i < max)\n// \t\tbuf.append(\", \");\n// \t}\n buf.append(\")\");\n return buf.toString();\n }", "public String[ ] toStrings() {\n\t\tString[ ] theStrings = new String[1 + 3 * motifhitinfo.length];\n\t\tString[ ] mStrings;\n\t\ttheStrings[0] = PAD1 + SUBGENENAME + PAD2 + SUBGENEGENUS + PAD3 + HITSCORE + PAD4 + THETRANSLATOR.externalize(HITHOTSPOT);\n\t\tfor (int m=0; m<motifhitinfo.length; m++) {\n\t\t\tmStrings = motifhitinfo[m].toStrings();\n\t\t\ttheStrings[3 * m + 1] = mStrings[0];\n\t\t\ttheStrings[3 * m + 2] = mStrings[1];\n\t\t\ttheStrings[3 * m + 3] = mStrings[2];\n\t\t}\n\t\treturn theStrings;\n\t}", "@Override\n public String toString() {\n if (this.map.getMap().isEmpty()) return \"\";\n final StringBuilder param = new StringBuilder(this.map.getMap().size() * 40);\n for (final Map.Entry<String, String> entry: entrySet()) {\n param.append(MultiProtocolURL.escape(entry.getKey()))\n .append('=')\n .append(MultiProtocolURL.escape(entry.getValue()))\n .append('&');\n }\n param.setLength(param.length() - 1);\n return param.toString();\n }", "public String[] getStrings(String mkey) {\n\t\tString last;\n\t\tint i = 0;\n\t\tArrayList<String> v = new ArrayList<>();\n\t\twhile (true) {\n\t\t\tlast = getString(mkey + i);\n\t\t\ti++;\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tv.add(last);\n\t\t}\n\t\tif (v.size() != 0) {\n\t\t\tString[] str = new String[v.size()];\n\t\t\treturn v.toArray(str);\n\t\t} else {\n\t\t\treturn (String[]) getDefault(mkey);\n\t\t}\n\t}", "public String getString(String key)\n {\n return getString(key, null);\n }", "private String displayPkValues(Map<String,Object> pkValues) {\n StringBuilder display = new StringBuilder();\n for(String key : pkValues.keySet()) {\n display.append(key + \"=\" + pkValues.get(key) + \" \");\n }\n return display.toString();\n }", "public String listFinance() {\n Set<String> keySet = finance.keySet();\n StringBuilder returnString = new StringBuilder();\n for(String k : keySet) {\n returnString.append(k + \", \");\n }\n int length = returnString.length();\n returnString.delete(length-2, length);\n returnString.append(\"\\n\");\n return returnString.toString();\n }", "List<String> getKeys();", "@Override\n\tpublic String toString()\n\t{\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\tfinal Iterator< Entry< Double, V > > iterator = iterator();\n\t\twhile( iterator.hasNext() )\n\t\t{\n\t\t\tfinal Entry< Double, V > entry = iterator.next();\n\t\t\tbuffer.append( entry.getKey().toString() + \", \" );\n\t\t\tbuffer.append( entry.getElement().toString() + \"\\n\" );\n\t\t}\n\t\t\n\t\treturn buffer.toString();\n\t}" ]
[ "0.6573723", "0.6425489", "0.6373128", "0.63598293", "0.6246452", "0.61535126", "0.61495584", "0.6122624", "0.6098025", "0.5982725", "0.59557", "0.59459275", "0.5916084", "0.5886055", "0.5870736", "0.58651537", "0.58543867", "0.5851366", "0.58502245", "0.58398116", "0.5837182", "0.5803919", "0.5787866", "0.5774148", "0.5765968", "0.57657707", "0.5760117", "0.57567453", "0.57557523", "0.5731206", "0.5730426", "0.57212925", "0.5686847", "0.56841296", "0.5682067", "0.56815046", "0.5677259", "0.56678265", "0.566141", "0.565098", "0.56506974", "0.56426144", "0.56195605", "0.56170297", "0.5606705", "0.5601986", "0.5595619", "0.5590491", "0.5589632", "0.55687594", "0.55591124", "0.55524385", "0.55377746", "0.5525764", "0.5522517", "0.5510437", "0.5498692", "0.54947966", "0.54915935", "0.5470519", "0.5470412", "0.5468477", "0.54658985", "0.54617286", "0.5460493", "0.5452213", "0.54456997", "0.5443704", "0.5440299", "0.5434232", "0.54341376", "0.5426345", "0.54166317", "0.54063535", "0.53930384", "0.5391511", "0.5387936", "0.5386723", "0.535978", "0.535366", "0.53439575", "0.5343736", "0.53132963", "0.5288119", "0.52849185", "0.5282312", "0.5278094", "0.5262249", "0.5254039", "0.52481914", "0.52173984", "0.52147883", "0.5210979", "0.5208857", "0.52087814", "0.5207411", "0.52073514", "0.5206151", "0.5204934", "0.5202351" ]
0.5562015
50
Get the length of time of the acquisition of each frame.
public double getFrameTime() { // Convert from milliseconds to seconds return getInteger(ADACDictionary.FRAME_TIME) / 1000; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getFrameDuration();", "public int getTimeLength() {\r\n return timeLength;\r\n }", "public static int getTimeSeconds() {\n return Atlantis.getBwapi().getFrameCount() / 30;\n }", "public static int getTimeFrames() {\n return Atlantis.getBwapi().getFrameCount();\n }", "float getDecodedAudioTimeoutMs();", "float getDecodedAudioTimeoutMs();", "@Override\n\tpublic float getTimePerFrame() {\n\t\treturn tpf;\n\t}", "public int getFrameLength() {\n return frameLength;\n }", "long getDuration() {\n if (debugFlag)\n debugPrintln(\"JSChannel:getDuration\");\n\n if (ais == null || audioFormat == null ) {\n if (debugFlag)\n debugPrintln(\"JSChannel: Internal Error getDuration\");\n return (long)Sample.DURATION_UNKNOWN;\n }\n // Otherwise we'll assume that we can calculate this duration\n\n // get \"duration\" of audio stream (wave file)\n // TODO: For True STREAMing audio the size is unknown...\n long numFrames = ais.getFrameLength();\n if (debugFlag)\n debugPrintln(\" frame length = \" + numFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n\n float rateInFrames = audioFormat.getFrameRate();\n rateInHz = audioFormat.getSampleRate();\n if (debugFlag)\n debugPrintln(\" rate in Frames = \" + rateInFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n long duration = (long)((float)numFrames/rateInFrames);\n if (debugFlag)\n debugPrintln(\" duration(based on ais) = \" + duration);\n return duration;\n }", "public Double getTime() {\n\t\treturn new Double((double) length * 36) / ((((double) speed) * 100));\n\t}", "public long getSampleFrameLength() {\n\t\treturn ais.getFrameLength();\n\t}", "public double getTime() { return duration; }", "int getNumberFrames();", "@Override\n public long getMicrosecondLength() {\n return clip.getMicrosecondLength();\n }", "private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }", "long duration();", "int getFramesCount();", "public float getFramesPerSecond() {\n return 1 / frametime;\n }", "public int getTotalFrames() {\n int frame = 0;\n for (MOFPartPolyAnimEntry entry : getEntryList().getEntries())\n frame += entry.getDuration();\n return frame;\n }", "protected int getLength() {\n int length = super.getLength(); //see if it is defined in the ncml\n if (length < 0) {\n double[] t = getTimes();\n if (t != null) length = t.length;\n else length = 0;\n }\n return length;\n }", "public double Time() {\n return OCCwrapJavaJNI.Units_Dimensions_Time(swigCPtr, this);\n }", "public double readClock()\n {\n\tif (frameByFrameClock) {\n\t return frameNumber * (1/30.0f);\n\t} else {\n\t long elapsed;\n\t \n\t if (drawAnimation.value) {\n\t\t// Time during animation\n\t\telapsed = System.currentTimeMillis() - startTime;\n\t } else {\n\t\t// Time during pause\n\t\telapsed = pauseTime - startTime;\n\t }\n\t \n\t return elapsed / 1000.0f;\n\t}\n }", "public long getTimeTaken();", "public long duration() {\n\t\treturn end - start;\n\t}", "public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}", "Double getActualDuration();", "long getDuration();", "public long getSessionDuration(){\n return (currentTime-startTime)/1000;\n }", "public int getLength() { \r\n return audioLength; \r\n }", "int getSampleMs();", "public int getMillisecondLength() {\n\t\treturn meta.length();\n\t}", "@Override\n public int getFrameLength() {\n return clip.getFrameLength();\n }", "public int length()\n\t{\n\t\tif ( properties != null && properties.containsKey(\"ogg.length.bytes\") )\n\t\t{\n\t\t\tlengthInMillis = VobisBytes2Millis((Integer)properties.get(\"ogg.length.bytes\"));\n\t\t\tSystem.out.println(\"GOT LENGTH: \"+lengthInMillis);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlengthInMillis = -1;\n\t\t}\n\t\treturn (int)lengthInMillis;\n\t}", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public float getFullDuration()\n\t{\n\t\tif (repeatCnt < 0) return -1;\n\t\treturn delay + duration + (repeatDelay + duration) * repeatCnt;\n\t}", "public int getPlayLength()\n\t{\n\t\treturn playbackLength;\n\t}", "private int getFramePerSecond(Rectangle rect){\n final long recordTime=1000;\n int countFrame=0;\n try {\n Robot bot=new Robot();\n final long startTime=System.currentTimeMillis();\n while((System.currentTimeMillis()-startTime)<=recordTime){\n bot.createScreenCapture(rect);\n countFrame++;\n }\n System.out.println(\"FramePerSecond is : \"+countFrame);\n return countFrame;\n } catch (AWTException e) {\n e.printStackTrace();\n }\n return 0;\n }", "public long getLoopTime();", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "@java.lang.Override\n public float getDecodedAudioTimeoutMs() {\n return decodedAudioTimeoutMs_;\n }", "@java.lang.Override\n public float getDecodedAudioTimeoutMs() {\n return decodedAudioTimeoutMs_;\n }", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "public int getDuration() {\n\t\treturn (int) ((endTime.getTime()-startTime.getTime())/1000) + 1;\n\t}", "int getDuration();", "int getDuration();", "public double getDuration() {\n if (null == firstTime) {\n return 0.0;\n }\n return lastTime.timeDiff_ns(firstTime);\n }", "float getPostEndOfAudioTimeoutMs();", "public int getDuration();", "public int totalTime(){\n\t\t\n\t\tint time=0;\n\t\t\n\t\n\t\tfor(int i=0; (i<songList.length);i++){\n\t\t\t\n\t\t\tif(songList[i]!=null){\n\t\t\t\n\t\t\ttime+= songList[i].getDuration();\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn time;\n\t\t\n\t}", "@java.lang.Override\n public float getDecodedAudioTimeoutMs() {\n return decodedAudioTimeoutMs_;\n }", "@java.lang.Override\n public float getDecodedAudioTimeoutMs() {\n return decodedAudioTimeoutMs_;\n }", "protected int getFramesPased() {\r\n\t\treturn framesPassed;\r\n\t}", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "public long getTimeLength() {\n return itemsets.get(itemsets.size() - 1).getTimestamp() - itemsets.get(0).getTimestamp();\n }", "long getDurationNanos();", "public double getElapsedTime(){\n double CurrentTime = System.currentTimeMillis();\n double ElapseTime = (CurrentTime - startTime)/1000;\n return ElapseTime;\n }", "long getElapsedTime();", "private long calculateFrameTimestamp(int totalBits) {\n int samples = totalBits >> 4;\n long frameUs = mFramesUsCache.get(samples, -1);\n if (frameUs == -1) {\n frameUs = samples * 1000_000 / mChannelsSampleRate;\n mFramesUsCache.put(samples, frameUs);\n }\n long timeUs = SystemClock.elapsedRealtimeNanos() / 1000;\n // accounts the delay of polling the audio sample data\n timeUs -= frameUs;\n long currentUs;\n long lastFrameUs = mFramesUsCache.get(LAST_FRAME_ID, -1);\n if (lastFrameUs == -1) { // it's the first frame\n currentUs = timeUs;\n } else {\n currentUs = lastFrameUs;\n }\n if (DEBUG)\n Log.i(TAG, \"count samples pts: \" + currentUs + \", time pts: \" + timeUs + \", samples: \" +\n \"\" + samples);\n // maybe too late to acquire sample data\n if (timeUs - currentUs >= (frameUs << 1)) {\n // reset\n currentUs = timeUs;\n }\n mFramesUsCache.put(LAST_FRAME_ID, currentUs + frameUs);\n return currentUs;\n }", "float getDurationBuffered() throws InterruptedException, ConnectionLostException;", "private long m18341d(long frameCount) {\n return (1000000 * frameCount) / ((long) this.f16625s);\n }", "long elapsedTime();", "private static int getDuration() {\n\t\tStack<Object> stack = b.getCurrentWorkFrame();\n\t\tObject obj = stack.peek();\n\t\tif (Simulator.DEBUG)\n\t\t\tSystem.out.println(b.printStack() + \"...\");\n\t\tif (obj instanceof WorkFrame)\n\t\t\tthrow new RuntimeException(\"***ERROR: the next obj on stack should\"\n\t\t\t\t\t+ \"be an activity! WF_Sim.getDuration\" + obj.toString());\n\t\tActivityInstance ai = (ActivityInstance) stack.peek();\n\t\tif (ai.getActivity() instanceof CompositeActivity) {\n\t\t\tCompositeActivity comp = (CompositeActivity) ai.getActivity();\n\t\t\tif (frameInImpassed(comp))\n\t\t\t\treturn -1;\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"***ERROR: push shouldn't have ended \" +\n\t\t\t\t\t\"with a composite on top\");\n\t\t}\n\t\treturn ai.getDuration();\n\t}", "private long getGameDuration() {\n return ((System.currentTimeMillis() - startGameTime) / 1000);\n }", "@Override\r\n\tpublic float getChannelTime() {\n\t\treturn 4;\r\n\t}", "public double getSpeedPerFrame(){\r\n\t\treturn speed;\r\n\t}", "public int getTimeToComplete() {\n // one level is ten minutes long\n int totalTime = numberOfLevels * 10;\n if (is3D) {\n // if it's 3d then it take twice as long because its harder\n totalTime = totalTime * 2;\n }\n \n return totalTime;\n }", "Integer getFrameRate() {\n return frameRate;\n }", "public int getduration() {\n\t\tDuration duration = Duration.between(initial_time, current_time);\n\t\treturn (int)duration.getSeconds();\n\t}", "public double getVideoLength(){\n\t\treturn videoLength;\n\t}", "public int getFrames() {\r\n return frames;\r\n }", "public int duration(){\n int maxLength=voices.get(0).duration();\n for(Bar bar:voices){\n if (bar.duration()>=maxLength){\n maxLength=bar.duration();\n }\n }\n checkRep();\n return maxLength;\n }", "@Override\n\tpublic int getDuration() {\n\t\tlog(\"getDuration()\");\n\t\tif (getState() > PREPARING && getState() < ERROR \n\t\t\t\t&& mCurrentMediaPlayer != null) {\n\t\t\treturn mCurrentMediaPlayer.getDuration();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public long getDuration()\n {\n return duration;\n }", "public float getRemainingTime () {\n\t\treturn duration - timer < 0 ? 0 : duration - timer;\n\t}", "private long getTotalDuration() {\n if(mMarkers.size() == 0) {\n return 0;\n }\n long first = mMarkers.get(0).time;\n long last = mMarkers.get(mMarkers.size() - 1).time;\n return last - first;\n }", "Posn getDuration();", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "protected static double getFPGATime() {\n return (System.currentTimeMillis() - startTime) / 1000.0;\n }", "public int getIntronLength() { \n\t\tfinal int start = getLast5SSPos(); \n\t\tfinal int end = getLast3SSPos();\n\t\treturn( Math.abs( end - start ) ); \n\t}", "int getMaxRecordingMillis();", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "int getRaceTime() {\r\n\t\tint pace = getPaceSeconds();\r\n\t\tRace selectedRace = (Race)raceBox.getSelectedItem();\r\n\t\tdouble raceLength = selectedRace.getLength();\r\n\t\t\r\n\t\tint totalTime = (int)(raceLength * pace);\r\n\t\treturn totalTime;\r\n\t}", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }", "public float getFrameRate() { return 1000f/_interval; }", "public float getDuration()\n\t{\n\t\treturn duration;\n\t}", "public double getTime() { return time; }", "public long getDuration() {\n return duration;\n }", "public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }", "public int calcAcknowledgeTime()\n {\n return( TIMEOUT );\n }", "public int calcAcknowledgeTime()\n {\n return( TIMEOUT );\n }", "Double getRemainingTime();", "public long getRemainingTime() {\n if (isPaused()) {\n return pausedPoint;\n }\n long res = (long) ((spedEndTime - SystemClock.elapsedRealtime()) * speed);\n return res > 0 ? res : 0;\n }", "@Generated\n @Selector(\"duration\")\n public native double duration();", "public double getSetupTime() {\n //SCT: 219 If LGS is in use, the setup is 10 minutes more than when the NGS is in use.\n //The setup overhead is instrument specific, so we just return the extra overhead for\n //using LGS here. Instrument code should call this method to take into account the cost\n //of using Altair\n if (getGuideStarType() == GuideStarType.LGS) {\n return 10.0 * 60;\n }\n return 0.0;\n }", "public int getTotalTime();", "public long getDuration() {\n return duration;\n }", "public int getFrameDelay() {\n\t\treturn frameDelay;\n\t}", "public int getDuration() {\n return duration;\n }", "public int getDuration() {\n return duration;\n }" ]
[ "0.7549564", "0.72203034", "0.69927377", "0.6941405", "0.6836379", "0.6836379", "0.67317396", "0.67009073", "0.66779095", "0.6668236", "0.66527605", "0.66384715", "0.6439894", "0.6431565", "0.64187133", "0.64113677", "0.6405453", "0.6392314", "0.6378199", "0.6353881", "0.63122076", "0.6292182", "0.62653834", "0.62597835", "0.62596", "0.6247765", "0.62127674", "0.620804", "0.6204516", "0.6199245", "0.61969125", "0.6188911", "0.6168458", "0.6164622", "0.61303514", "0.61257446", "0.6115798", "0.6115405", "0.61104095", "0.61100817", "0.61100817", "0.6107787", "0.6105", "0.6098434", "0.6098434", "0.60949284", "0.6089948", "0.608946", "0.6088073", "0.6077588", "0.6077588", "0.6069112", "0.60670817", "0.6062644", "0.6059445", "0.6045751", "0.602604", "0.6025251", "0.6023407", "0.6010166", "0.60085595", "0.6005083", "0.6003884", "0.5994133", "0.59838533", "0.5982927", "0.5975941", "0.5964369", "0.59607863", "0.5957034", "0.59524024", "0.5951553", "0.59509194", "0.594721", "0.5945153", "0.5923777", "0.59136504", "0.5913261", "0.5909485", "0.5896201", "0.58945125", "0.58941853", "0.5884951", "0.587762", "0.58769524", "0.5875348", "0.58744174", "0.5866507", "0.5866385", "0.58616245", "0.58616245", "0.58575976", "0.5855837", "0.5851238", "0.5848985", "0.58444905", "0.5837353", "0.58331656", "0.5828876", "0.5828876" ]
0.7501287
1
Get the image height in pixel units
public short getHeight() { return getShort(ADACDictionary.Y_DIMENSIONS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getImageHeight()\n {\n \n int retVal = getImageHeight_0(nativeObj);\n \n return retVal;\n }", "public int getImageHeight()\n\t{\n\t\treturn imgHeight;\n\t}", "public int getImageHeight() {\n\t\treturn imgHeight;\n\t}", "public int getImageHeight() {\n\treturn height;\n }", "public int height() {\n return picture.height();\n }", "public int height() {\n return picture().height();\n }", "public int imHeight() {\n\t\treturn image.getHeight(this);\n\t}", "public native int getHeight() throws MagickException;", "public int height() \n {\n return this.picture.height();\n }", "long getHeight();", "public int getHeight() {\n return fullPhoto.getHeight();\n }", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public double getHeight();", "public double getHeight();", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public float getHeight();", "double getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "@VisibleForTesting\n public int getMaxImageHeight() {\n return this.mContext.getResources().getDimensionPixelSize(isLowRam() ? 17105365 : 17105364);\n }", "public int getHeight() {\n return (int) Math.round(height);\n }", "public Number getHeight() {\n\t\treturn getAttribute(HEIGHT_TAG);\n\t}", "public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public double getHeight()\r\n {\r\n return height;\r\n }", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight()\n\t{\n\t\treturn height;\n\t}", "public int getHeight() \n\t{\n\t\treturn height;\n\t}", "public double getHeight () {\n return height;\n }", "public double getHeight()\r\n {\r\n return height;\r\n }", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight()\r\n\t{\r\n\t\treturn HEIGHT;\r\n\t}", "public int getHeight() {\r\n\t\t\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n ImageView imageView;\n int height = super.getHeight();\n return (height > 0 || imageView == null) ? height : getImageViewFieldValue(imageView, \"mMaxHeight\");\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public double getHeight() {\r\n return height;\r\n }", "public final int getHeight() {\r\n return height;\r\n }", "public int getHeight()\n {\n return height;\n }", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight()\n {\n \treturn height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "private double getHeight() {\n\t\treturn height;\n\t}", "int getheight();", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\treturn height;\n\t}", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public int getHeight() { return height; }", "public int getHeight()\n {\n return height;\n }", "public final int getHeight() {\r\n return (int) size.y();\r\n }", "public int getHeight() {\n return height_;\n }", "public int getHeight() {\n\t\treturn (int) (Math.log(size) / Math.log(2));\n\t}", "public int getHeight() {\r\n return Height;\r\n }" ]
[ "0.86137205", "0.84318715", "0.8370736", "0.83146816", "0.8187343", "0.8171565", "0.8031027", "0.7990733", "0.79565716", "0.78845006", "0.78504634", "0.78378266", "0.78378266", "0.78378266", "0.78378266", "0.78378266", "0.78378266", "0.78289264", "0.78289264", "0.77966297", "0.77955955", "0.7781511", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.77269614", "0.7717329", "0.7645952", "0.76137614", "0.7613704", "0.7574187", "0.7573653", "0.7573653", "0.75705546", "0.7551963", "0.75500447", "0.7544377", "0.7544377", "0.75426954", "0.7542437", "0.7541139", "0.753033", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.7528603", "0.75283414", "0.75218344", "0.75187135", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.7510167", "0.74963766", "0.7495791", "0.74846166", "0.74846166", "0.74846166", "0.7482662", "0.7482181", "0.7480958", "0.7480958", "0.7475736", "0.7475736", "0.7475736", "0.7475736", "0.7475736", "0.7475736", "0.7472679", "0.74667567", "0.74642855", "0.74638784", "0.74524087", "0.7442699", "0.7441728" ]
0.0
-1
Get the offset, in bytes, to the image data within the file
public int getImageOffset() { if (isGated()) { if (isReconstruction()) { // Must have a gated reconstruction. For each gated interval // there is an extra 128 byte header (beginning "adac01") block // starting at the normal image offset location. Add this to the // offset: return ADACDictionary.IM_OFFSET + getNumberOfGatedIntervals() * 128; } else { // Gated SPECT data set. For each azimuth there is an additional // 1664 byte header (beginning "adac01") at the normal image // offset location. Add this to the image offset. return ADACDictionary.IM_OFFSET + getNumberOfGatedIntervals() * 1664; } } else { // Non gated data - simplest case return ADACDictionary.IM_OFFSET; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFileOffset();", "long getFileOffset();", "int getRawOffset();", "@Override\n public long getFilePointer() {\n return this.fileOffset + this.bufferPointer.bufferOffset;\n }", "public abstract int getRawOffset();", "public abstract int getRawOffset();", "public long getOffset() throws IOException {\n\t\treturn offset;\n\t}", "int getOffset();", "int getOffset();", "int getOffset();", "public static int offset_reading() {\n return (32 / 8);\n }", "@Override\n public long position() throws IOException {\n return _backing.getFilePointer() - _head.offset;\n }", "public int getBaseOfData()\n throws IOException, EndOfStreamException\n {\n if (imageState_ != ImageStateType.PE32)\n {\n return 0;\n }\n\n return peFile_.readInt32(relpos(Offsets.BASE_OF_DATA.position));\n }", "public static int offset_infos_size_data() {\n return (80 / 8);\n }", "public int getOffset() {\n\t\treturn OFFSET_MASK & dataOffset;\n\t}", "public long getImageBase()\n throws IOException, EndOfStreamException\n {\n if (imageState_ == ImageStateType.PE64)\n {\n return peFile_.readInt64(relpos(Offsets.IMAGE_BASE_64.position));\n }\n\n return peFile_.readInt32(relpos(Offsets.IMAGE_BASE_32.position));\n }", "public long getSizeOfImage()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt32(relpos(Offsets.SIZE_OF_IMAGE.position));\n }", "protected final int getFilePointer() {\r\n return bPtr;\r\n }", "public final long getFilePointer() throws IOException {\r\n\t\treturn f.getFilePointer();\r\n\t}", "public static int offsetBits_infos_size_data() {\n return 80;\n }", "public Integer getOffset();", "public int getOffset() {\r\n return offset;\r\n }", "com.google.protobuf.ByteString getImgData(int index);", "public int getOffset() \n {\n return offset;\n }", "public long getFilePointer() throws IOException {\n return raos.getFilePointer();\n }", "double getOffset();", "public int getOffset() {\r\n\t\treturn offset;\r\n\t}", "public int getBytePosition() {\n return bytePosition;\n }", "public int getOffset() {\r\n return this.offset;\r\n }", "@Override\n public long getFilePosition(int tileIndex) {\n int row = tileIndex / nColsOfTiles;\n int col = tileIndex - row * nColsOfTiles;\n if (nCols == 0 || row < row0 || col < col0 || row > row1 || col > col1) {\n return 0;\n }\n\n // for files larger than 16 GB, the offset value may be negative.\n // so a mask is applied to convert it to a positive value.\n return offsets[row - row0][col - col0];\n }", "public int getOffset() {\r\n\t\treturn this.offset;\r\n\t}", "public int getOffset() {\n return offset;\n }", "public int getOffset() {\n return offset;\n }", "public int getOffset() {\n return offset_;\n }", "public long offset() {\n return offset;\n }", "public static int offset_source() {\n return (256 / 8);\n }", "public long getCurrentOffset() {\n return (long)current_chunk * (long)chunksize;\n }", "public int getOffset() {\n return this.offset;\n }", "public int getFileAlignment()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt32(relpos(Offsets.FILE_ALIGNMENT.position));\n }", "public int getOffset() {\n return offset;\n }", "public int getOffset() {\n return offset_;\n }", "public int getOffset() {\n\t\treturn this.offset;\n\t}", "public java.lang.Integer getOffset() {\n return offset;\n }", "public native GSize getPixelOffset(GInfoWindow self)/*-{\r\n\t\treturn self.getPixelOffset();\r\n\t}-*/;", "public double getOffset() {\r\n\t\treturn offset;\r\n\t}", "@Override\n public long getOffset() {\n return offset;\n }", "public long getOffset () {\n\treturn offset;\n }", "public final double getOffset() {\n\t\treturn offset;\n\t}", "@Override\n\t\tpublic long getPos() throws IOException {\n\t\t\treturn 0;\n\t\t}", "public int getOffset()\n {\n if (m_bufferOffset_ != -1) {\n if (m_isForwards_) {\n return m_FCDLimit_;\n }\n return m_FCDStart_;\n }\n return m_source_.getIndex();\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public Integer getOffset() {\n return offset;\n }", "public Integer getOffset() {\n return this.offset;\n }", "public Integer getOffset() {\n return this.offset;\n }", "public long getOffset() {\n return offset;\n }", "public long getFilePointer() {\n/* 141 */ return this.pointer;\n/* */ }", "public double getOffset() {\n return offset;\n }", "@Override\r\n public byte[] getCustomImageInBytes() {\r\n\r\n return imageInByte;\r\n }", "public int rva2offset(Address address) {\n\t\tint offset = -1;\n\t\tfor(IMAGE_SECTION_HEADER section:peFileSections) {\n\t\t\tif(address.getAddr32() >= section.getVirtualAddress()\n\t\t\t&& address.getAddr32() < section.getVirtualAddress() + section.getVirtualSize()) {\n\t\t\t\toffset = address.getAddr32() - section.getVirtualAddress() + section.getPointerToRawData();\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t}\n\t\tif(address.getAddr32() < peOptionalHeader.getSizeOfHeaders())\n\t\t\treturn address.getAddr32();\n\t\treturn offset;\n\t}", "public long getOffset() {\n return this.offset;\n }", "public static int offsetBits_reading() {\n return 32;\n }", "@Nonnegative\n @CheckReturnValue\n public int getOffset() {\n return offset;\n }", "protected final int readBytesAt(int offset)\n throws IOException\n {\n // shouldn't modify mBytePtr, assumed to be 'offset'\n if (_inputSource != null) {\n int count = _inputSource.read(_inputBuffer, offset, _inputBuffer.length - offset);\n if (count > 0) {\n _inputEnd += count;\n }\n return count;\n }\n return -1;\n }", "public long getInBytes() {\n return inBytes.get();\n }", "org.apache.xmlbeans.XmlInt xgetRawOffset();", "public ByteBuffer getFileData() {\n\t\treturn fileData;\n\t}", "public static long getOffset(SolrDocument doc) {\n return (Long) doc.get(\"source_file_offset\");\n }", "public int getProcessedDataOffset() { return 0; }", "public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }", "Double getOffset();", "public int getOffset() {\r\n\t\treturn offSet;\r\n\t}", "protected final int getBMPOffset(char paramChar) {\n/* 277 */ return (paramChar >= '?' && paramChar <= '?') ? \n/* */ \n/* 279 */ getRawOffset(320, paramChar) : \n/* 280 */ getRawOffset(0, paramChar);\n/* */ }", "@Override\r\n \tpublic final int getOffset() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getStartPos();\r\n \t}", "public static int offset_dest() {\n return (0 / 8);\n }", "public static int offset_addr() {\n return (0 / 8);\n }", "public static int offset_dataType() {\n return (0 / 8);\n }", "public int offendingHeaderOffset()\n {\n return offset() + OFFENDING_HDR_OFFSET;\n }", "int getBytesRead() {\n \treturn _read + _o;\n }", "public Position getOffset() {\r\n return offset;\r\n }", "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "public long getOffset() {\n return cGetOffset(this.cObject);\n }", "public int getSubElementOffsetBytes(int index) { throw new RuntimeException(\"Stub!\"); }", "public Integer getXOffset() {\n\t\tdouble frameWidth = this.pixy.getFrameWidth() / 2;\n\t\tdouble blockX = this.getX();\n\n\t\treturn (int) (blockX + frameWidth / 2);\n\t}", "public Location getOffset() {\n\t\treturn pos;\n\t}", "public int pos() {\r\n return cbyte;\r\n }", "public float getTextureYOffset() {\n\t\tint row = index / texture.getNumberOfRows();\n\t\treturn (float) row / (float) texture.getNumberOfRows();\n\t}", "public static int offset_infos_log_src() {\n return (16 / 8);\n }", "public Location getOffset() {\n\t\treturn gfPos;\n\t}", "public int getOffset() {\r\n\t\t\t\tint offset = pageCount * (currentPage - 1);\r\n\t\t\t\treturn offset < 0 ? 0 : offset;\r\n\t\t\t}", "public int arrayOffset()\r\n/* 133: */ {\r\n/* 134:162 */ return 0;\r\n/* 135: */ }", "public static int offset_length() {\n return (32 / 8);\n }", "public java.lang.Long getOffset() {\n return offset;\n }", "public long getFileIndex(){\n \tString fileName=file.getName();\n// \tSystem.out.println(\"fileName:\"+fileName);\n \tfinal long start = Long.parseLong(fileName.substring(0,\n\t\t\t\tfileName.length() - FILE_SUFFIX.length()));\n// \tSystem.out.println(\"start:\"+start);\n \treturn start;\n }", "public String getSrcLong(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\tString[] array = dataBase.readLine().split(\"\\\\|\");\n\t\treturn array[11];\n\t}", "private int getCurrentOffset(){\n\t\treturn this.OFFSET;\n\t}", "public float getTextureXOffset() {\n\t\tint column = index % texture.getNumberOfRows();\n\t\treturn (float) column / (float) texture.getNumberOfRows();\n\t}", "public long getIFDOffset() {\n return ifdOffset;\n }", "public Point2D getOffset() {\n\t\treturn offset;\n\t}", "private static final byte[] xfsim_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, 0, 0,\n\t\t\t\t0, -128, -128, -128, -64, -64, -64, 28, 28, 28, -1, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 72, 88, -70,\n\t\t\t\t-36, 30, 48, -58, 39, -86, -83, 1, -80, 64, -70, -17, -112,\n\t\t\t\t-74, 112, 64, 105, 18, -31, 70, 0, 67, -37, -94, -103, -54,\n\t\t\t\t-70, 3, 44, 42, 36, 93, -89, -29, -9, 101, -112, -111, 105, 88,\n\t\t\t\t10, 8, 68, 28, -97, -57, 24, 43, -124, -128, 0, 104, -54, 8,\n\t\t\t\t56, 90, -85, 88, 77, 82, -23, 57, 42, -120, -32, -110, 99, -20,\n\t\t\t\t72, 0, 0, 59 };\n\t\treturn data;\n\t}", "public static int offset_crc() {\n return (272 / 8);\n }" ]
[ "0.7475677", "0.7368826", "0.6748512", "0.6733837", "0.65217435", "0.65217435", "0.64431816", "0.64316547", "0.64316547", "0.64316547", "0.64204186", "0.63694936", "0.63633686", "0.6358243", "0.6346386", "0.6340491", "0.633352", "0.6217053", "0.61525124", "0.6123868", "0.6100079", "0.60972756", "0.60856605", "0.6064323", "0.60642296", "0.60615045", "0.6060022", "0.6057215", "0.60396016", "0.60297465", "0.60286784", "0.60279685", "0.60279685", "0.60177666", "0.60107267", "0.60083634", "0.59863526", "0.59858686", "0.5984047", "0.59655213", "0.59654", "0.5959451", "0.5925355", "0.5883635", "0.5869889", "0.58643657", "0.5859647", "0.58547086", "0.5851046", "0.58504504", "0.58490896", "0.5844503", "0.5838123", "0.5838123", "0.58339113", "0.5823673", "0.5808898", "0.5806679", "0.5804946", "0.5803497", "0.57565707", "0.57188547", "0.57117885", "0.5706731", "0.5696124", "0.56958", "0.5694255", "0.5682029", "0.5658304", "0.5640462", "0.5635017", "0.56099236", "0.55936337", "0.5591549", "0.5587197", "0.5586604", "0.55823845", "0.5576188", "0.557332", "0.5571281", "0.5570226", "0.5549605", "0.55422926", "0.55360425", "0.55280423", "0.5525869", "0.552183", "0.5509073", "0.55040956", "0.550339", "0.5497008", "0.54964364", "0.549111", "0.54891986", "0.5483716", "0.54750097", "0.5463818", "0.54602283", "0.54489", "0.54434735" ]
0.69374055
2
Return an integer value represented by the key argument (a neardefinitive list is given in the dictionary class).
public int getInteger(short dictionaryKey) { return intsMap.get(dictionaryKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getInt(String key);", "int getInt( String key, int def);", "public int getInt(String key) {\n return Integer.parseInt(mMap.get(key));\n }", "public Integer getInt(K key) throws ClassCastException;", "public int getInt(String key)\n {\n return getInt(key, 0);\n }", "public int getInteger(String key) {\r\n try {\r\n return Integer.decode(getString(key)).intValue();\r\n }\r\n catch (Exception e) {\r\n return 0;\r\n }\r\n }", "public int get(int key) {\n return 1;\n }", "public Integer getInt(String key)\n\t{\n\t\tLong l = getLong(key);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.intValue();\n\t}", "public int getInt(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? ((Long)value).intValue() : 0);\n }", "public Integer getInteger(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Integer) extGet(key);\n\t}", "private int getValue(final String name, final String key) {\n\t\treturn Integer.parseInt(bundleConstants.getString(name + SEPERATOR + key));\n\t}", "int getInt(String key) throws KeyValueStoreException;", "public int getInt(String key) throws AgentBuilderRuntimeException {\n\t\treturn getInteger(key).intValue();\n\t}", "public int getIntValue(String keyName)\n {\n return Integer.parseInt(getValue(keyName));\n }", "public int getAsInt(String key) {\n return getAsInt(key, 0);\n }", "public int get(int key) {\n int index = key % n;\n MapNode node = keys[index];\n for (int i =0; i < node.list.size(); ++i) {\n if (node.list.get(i) == key) {\n return vals[index].list.get(i);\n }\n }\n\n return -1;\n }", "@Override\n public int getInt(String key) {\n return random.nextInt(RANDOM_INT_BOUND);\n }", "public int get(int key) {\n int index = keys.indexOf(key);\n return index < 0? -1 : values.get(index);\n }", "String get(Integer key);", "public int getInteger(String key) {\n\t\tint defaultValue = 0;\n\t\tif (getDefault(key) != null)\n\t\t\tdefaultValue = (Integer) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(sp);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}", "public static int getInt(String key, int i) {\n\t\tString token = getSystemString(key);\n\t\tif (token == null) {\n\t\t\treturn i;\n\t\t}\n\t\treturn Integer.parseInt(token);\n\t}", "public Integer getIntegerData(String key) {\n return pref.getInt(key, 0);\n }", "public static int getInt(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as an integer.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}", "public int i(String key) throws AgentBuilderRuntimeException {\n\t\treturn getInt(key);\n\t}", "public int getInt(String key, int defaultValue);", "public int get(int key) {\n if(!map.containsKey(key)) return -1;\n return map.get(key);\n }", "int getKey();", "int getKey();", "public Integer getInteger(String key, Integer defaultValue);", "int getInt(String key, int defaultValue);", "public int getIntegerProperty(String key) {\n\t\treturn Integer.parseInt(this.getProperty(key));\n\t}", "public int getPropertyInt(String key);", "public static final int getIntegerParam(Map<String,String> params, String key, int def) {\n\t\ttry {\n\t\t\treturn Integer.parseInt(params.get(key));\n\t\t} catch (Exception e) {\n\t\t\treturn def;\n\t\t}\n\t}", "public\n int getProperty_int(String key)\n {\n if (key == null)\n return 0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0;\n\n int ret_int = 0;\n try\n {\n Integer workint = new Integer(val);\n ret_int = workint.intValue();\n }\n catch(NumberFormatException e)\n {\n ret_int = 0;\n }\n\n return ret_int;\n }", "public int get(String key) {\r\n int hash = new BigInteger(toAscii(key)).mod(new BigInteger(((Integer)TABLE_SIZE).toString())).intValue();\r\n while (table[hash] != null && table[hash].getKey() != key)\r\n hash = (hash + 1) % TABLE_SIZE;\r\n if (table[hash] == null)\r\n return -1;\r\n else\r\n return table[hash].getValue();\r\n }", "public int s2i(String key) throws AgentBuilderRuntimeException {\n\t\tint result = 0;\n\t\ttry {\n\t\t\tresult = Integer.parseInt(str(key));\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new AgentBuilderRuntimeException(e);\n\t\t} catch (AgentBuilderRuntimeException e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn result;\n\t}", "int getKey(int i);", "public int get(int key) {\n if(arr[key] == -1)\n return 0;\n else if(arr[key] == 0)\n return -1;\n else return arr[key];\n }", "public int getIntegerProperty(String key) {\n String val = getProperty(key);\n return (null == val ? 1 : Integer.parseInt(val));\n }", "public int get(int key) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1)\n return -1;\n else if (entry.key == key)\n return entry.value;\n else if (entry.next != null){\n while(entry.next!=null && entry.key != key){\n entry = entry.next;\n }\n if (entry.key == key)\n return entry.value;\n else\n return -1;\n }else\n return -1;\n }", "public int get(int key) {\n return hashMap.stream()\n .filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1])\n .orElse(-1);\n }", "public static int getIntProperty(String key) {\r\n\t\treturn getIntProperty(key, 0);\r\n\t}", "public int getInt(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for integer configuration parameter: \" + key);\n\t\t}\n\t}", "public int get(int key) {\n return store[key]; // get the value for the key\n }", "public static int getIntForKey(String key)\n\t{\n\t\treturn PreferencesModel.instance().getUserIntPref(key, -1);\n\t}", "public int get(int key) {\n return data[key % KEY];\n }", "private int get(Map<T, Integer> state, T key) {\n return state.getOrDefault(key, 0);\n }", "public Integer getKey()\r\n {\r\n return key;\r\n }", "private int getIndex(int key) {\n\t\treturn key % MAX_LEN;\n\t}", "private static int getIntegerProperty(String key) {\n String value = PROPERTIES.getProperty(key);\n // if the key is not found, Properties will return null and we should return a default value\n if (value == null) {\n return 0;\n }\n return Integer.parseInt(value);\n }", "public int getInt(String key, int defaultValue) {\n String lowerCaseKey = validateAndGetLowerCaseKey(key);\n\n if(map.containsKey(lowerCaseKey)) {\n String value = map.get(lowerCaseKey);\n\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException ex) {\n System.err.println(\"Unable to parse number: \" + ex.getMessage());\n }\n }\n return defaultValue;\n }", "protected static int getFieldIndex(String key) {\n String pattern = \"\\\\d{3}\";\n Pattern r = Pattern.compile(pattern);\n Matcher m = r.matcher(key);\n if (m.find()) {\n return Integer.parseInt(m.group(0));\n } else {\n return 0;\n }\n }", "public Integer getInt(String key,int defautl){\n\t\treturn this.getParam(key,defautl);\n\t}", "private int map(String key) throws Exception\n {\n if (key == null)\n {\n throw new Exception(\"Invalid value passed to map\");\n }\n\n return 0 % hashMapSize;\n }", "public static int get(int key) {\n\t\t// your code here\n\t\tif (map.containsKey(key)) {\n\t\t\tint value = map.get(key);\n\t\t\tmap.remove(key);\n\t\t\tmap.put(key,value);\n\t\t\treturn map.get(key);\n\t\t} else\n\t\t\treturn -1;\n\t}", "private int getIntegerValueByBitMap(LinkedHashMap<String, Integer> bitMap) {\r\n\t\r\n\tint identityInfoValue = 0;\r\n if(bitMap != null && bitMap.size() > 0) {\r\n \tStringBuilder sb = new StringBuilder();\r\n \t\r\n \tsb.append(bitMap.get(ProjectConstants.Asia)).append(bitMap.get(ProjectConstants.Korea)).append(bitMap.get(ProjectConstants.Europe))\r\n \t.append(bitMap.get(ProjectConstants.Japan)).append(bitMap.get(ProjectConstants.America));\r\n \r\n \tif(sb != null) {\r\n \t\t int num = Integer.parseInt(sb.toString().replaceFirst(\"^0+(?!$)\", \"\"));\r\n \t\t identityInfoValue = convertBinaryToDecimal(num);\r\n \t}\r\n }\r\n return identityInfoValue;\r\n}", "public int getIdAsInt(String key) {\n Object obj = ids.get(key);\n if (obj == null) {\n return 0;\n }\n if (obj instanceof Integer) {\n return (Integer) obj;\n }\n\n if (obj instanceof String) {\n try {\n return Integer.parseInt((String) obj);\n }\n catch (Exception e) {\n LOGGER.trace(\"could not parse int: {}\", e.getMessage());\n }\n }\n\n return 0;\n }", "public Integer getInteger(String key) {\n if (!jsonData.has(key))\n return null;\n try {\n return jsonData.getInt(key);\n } catch (Exception ex) {\n return null;\n }\n }", "public int getInt(String key) {\n int value = 0;\n try {\n value = mConfigurations.getInt(key);\n } catch (JSONException e) {\n sLogger.error(\"Error retrieving integer from JSONObject.\");\n }\n return value;\n }", "short getKeyIx();", "public int get(int key) {\n int hash_key = key % this.key_space;\n return this.hash_table.get(hash_key).get(key);\n }", "public Integer I(String key) throws AgentBuilderRuntimeException {\n\t\treturn getInteger(key);\n\t}", "public int indexOf(String key) {\r\n Integer i = keys.get(key);\r\n return (i == null ? -1 : i);\r\n }", "public final Integer getId(final String key){\r\n\t\treturn keyIdMap.get(key);\r\n\t}", "public int getAsInt(String key, int defaultVal) {\n String val = entries.getProperty(key);\n return val == null ? defaultVal : Integer.parseInt(val);\n }", "public Integer getInt(String key) throws JsonException {\r\n\t\tObject object = get(key);\r\n\t\tInteger result = PrimitiveDataTypeConvertor.toInteger(object);\r\n\t\tif (result == null) {\r\n\t\t\tthrow PrimitiveDataTypeConvertor.exceptionType(key, object, \"Integer\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int getIndexOf(K key);", "public String get(int key){\n\t\treturn(hashMap[key]);\t\t\n\t}", "public int getInt(String key, int fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getInt(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Integer.parseInt(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "public int getMandatoryInt(String key) throws ConfigNotFoundException;", "public int getKey() {\n\t\treturn 0;\n\t}", "public int get(int key) {\n\t\tDLLNode curr = map.get(key);\n\n\t\tif (curr != null) {\n\t\t\tupdateUsage(curr);\n\t\t\treturn curr.val;\n\t\t}\n\n\t\treturn -1;\n\t}", "public int get(int key) {\n newkey = hashfunc(key);\n return arr[newkey];\n \n }", "public int intValue(Map<Prop, Object> map) {\n assert type == Integer.class;\n Object o = map.get(this);\n return this.<Integer>typeValue(o);\n }", "public static int getIndex(String key) {\r\n return KEYS.indexOf(key);\r\n }", "int getIndex(int key_hash) {\n int capacity = hash_map.length;\n int index = key_hash % capacity;\n return index;\n }", "public int getKeyNumber()\r\n {\r\n return number_of_key;\r\n }", "public int getHashCode(int key){\n return key;\n }", "protected static int getKey( int[] arr, IntArrayList idxList ) {\n\t\tint key = 0;\n\t\tint j = 0;\n\t\tint idx = idxList.size() > 0 ? idxList.getInt(j) : -1;\n\t\tfor ( int i=0; i<arr.length; ++i ) {\n\t\t\tif ( idx == i ) {\n\t\t\t\tif ( j < idxList.size()-1 ) idx = idxList.getInt(++j);\n\t\t\t\telse idx = -1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tkey = ( key << 3 ) + arr[i];\n\t\t\t\tkey %= Util.bigprime;\n\t\t\t}\n\t\t}\n//\t\tkey %= Integer.MAX_VALUE; // is this line necessary?\n\t\treturn key;\n\t}", "protected Object getMapKeyForTradingProperty(TradingProperty tradingProperty)\n {\n return new Integer(((SimpleIntegerTradingProperty)tradingProperty).getIntegerValue());\n }", "protected final Integer getInt(final String key) {\n try {\n if (!jo.isNull(key)) {\n return jo.getInt(key);\n }\n } catch (JSONException e) {\n }\n return null;\n }", "public int getKey() {\r\n return key;\r\n }", "public int get(String key, int def)\n {\n try\n {\n String val = get(key);\n return Integer.parseInt(val);\n }\n catch(Exception e)\n {\n return def;\n }\n }", "private int getPos(int key, int index) {\n\t\t// Each bucket contains a list.\n\t\tList<Integer> temp = set[index];\n\t\tif (temp == null) {\n\t\t\treturn -1;\n\t\t}\n\t\t// Iterate all the elements in the bucket to find the target key.\n\t\tfor (int i = 0; i < temp.size(); i++) {\n\t\t\tif (temp.get(i) == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int getKey(){\n return key;\n }", "public int getInt(String key, int defValue) {\r\n\t\treturn getInt(Global.getContext(), key, defValue);\r\n\t}", "final int getKeyPosition(final Object key) {\r\n return Math.abs(key.hashCode()) % buckets.length;\r\n }", "public static int getIntParam(String key) throws InvalidParam {\n return getCurrentConfig().getInt(key);\n }", "public int lookupIndex (T entry)\n {\n if (entry == null)\n \tthrow new IllegalArgumentException (\"Can't lookup \\\"null\\\" in an Alphabet.\");\n\n int value = map.get(entry);\n if (value != 0) return value;\n else if (growing)\n {\n entries.add(entry);\n value = entries.size();\n map.put(entry, value);\n return value;\n } else {\n return -1;\n }\n }", "Integer countForKey(String key);", "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 }", "void setInt(String key, int val);", "public int get(int key) {\n if (!map.containsKey(key)) return -1;\n Node n = map.get(key);\n \n if (n.next != tail) {\n putToTail(n); \n }\n \n return n.val;\n }", "@Override\n public int getKey() {\n return this.key;\n }", "public int getInfoOrThrow(\n int key) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n if (!map.containsKey(key)) {\n throw new java.lang.IllegalArgumentException();\n }\n return map.get(key);\n }", "private static int hashCode(byte key) {\n return (int) key;\n }", "Integer getValue();", "Integer getValue();", "public static int search(int[] dict, int key) {\n for (int index = 0; index < dict.length; index++) {\n if (dict[index] == key) {\n return index;\n }\n }\n return -1;\n }", "public int get(int key) {\n int hashCode = key%nodes.length;\n if (nodes[hashCode]==null) return -1;\n ListNode pre = findPrev(key);\n return pre.next==null?-1:pre.next.val;\n }" ]
[ "0.75517964", "0.7195633", "0.7101311", "0.7093313", "0.7037487", "0.6943689", "0.69306755", "0.68307245", "0.682586", "0.67502147", "0.6733157", "0.6723149", "0.66162795", "0.6582287", "0.6572853", "0.65665996", "0.6558151", "0.65503967", "0.65447724", "0.65331864", "0.6528319", "0.6507601", "0.64965653", "0.6488594", "0.6482274", "0.6464703", "0.6464003", "0.6464003", "0.6439919", "0.64036846", "0.63983774", "0.6389452", "0.63794124", "0.62949085", "0.6289", "0.62795764", "0.6275282", "0.6264919", "0.6259402", "0.62422174", "0.62381196", "0.6215092", "0.62107193", "0.6208687", "0.6186905", "0.6177082", "0.6164049", "0.61601925", "0.6144561", "0.6139984", "0.61194575", "0.61169857", "0.6081928", "0.6075924", "0.60624427", "0.6062115", "0.6045661", "0.6034262", "0.60291356", "0.5989526", "0.5982213", "0.597993", "0.5969022", "0.59569716", "0.5954373", "0.5945496", "0.5934085", "0.5919895", "0.59055436", "0.5904775", "0.58934367", "0.58597577", "0.5834676", "0.58182347", "0.58066547", "0.58034796", "0.5797429", "0.5792376", "0.57642007", "0.5763661", "0.5762696", "0.57594806", "0.5759122", "0.57585335", "0.5753056", "0.5744914", "0.5744667", "0.5732917", "0.5707122", "0.5704169", "0.57005167", "0.5695974", "0.5694671", "0.5689692", "0.5688179", "0.5678104", "0.5673191", "0.5673191", "0.5663506", "0.5656829" ]
0.71914726
2
Get the number of intervals in a gated image set
public short getNumberOfGatedIntervals() { return getShort(ADACDictionary.NUMBER_OF_IMAGE_SETS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberOfImages() {\n\n\t\tshort zdim = getZDim();\n\t\tzdim = zdim > 0 ? zdim : 1;\n\n\t\tshort slices = getNumberOfSlices();\n\t\tslices = slices > 0 ? slices : 1;\n\n\t\tshort intervals = getNumberOfGatedIntervals();\n\t\tintervals = intervals > 0 ? intervals : 1;\n\n\t\treturn zdim * slices * intervals;\n\n\t}", "int imageCount();", "public int size() {\n return intervals.size();\n }", "int getImgDataCount();", "int getBurstNImages();", "int getScaleCount();", "public int getNumberOfIntervals(int field) {\r\n\t\tint n = 0;\r\n\t\tif (field >= 1 && field <= 8)\r\n\t\t\tn = _numberOfIntervals[field];\r\n\t\treturn n;\r\n\t}", "int getNumberOfCurveSegments();", "public native int getIterations() throws MagickException;", "private int RangeCount()\n\t{\n\t\treturn _rangelist.size();\n\t}", "public int getNumberOfBlocks(ImagePlus img, int m, int n);", "public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }", "int getNumSampleDimensions();", "int getCellsCount();", "int getDimensionsCount();", "public int getInterdigitInterval();", "int yBins();", "int xBins();", "int countPowertypeRanges();", "int getAreaCount();", "int getAreaCount();", "int getAreaCount();", "int getFigureListCount();", "int getPointsCount();", "public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }", "int getNumSegments();", "int getMetricValuesCount();", "int getMetricsCount();", "public int getRangeWidth();", "int getImagesByTransformCount();", "public long getIntervals(){\n return this.interval;\n }", "int getNumberOfInfantry();", "int numberOfDimensions();", "int getInterleavedAxisCount();", "int numOfBlocks() {\n return ni * nj * nk;\n }", "public int geomDim();", "public int rectangleCount() {\n return this.root.rectangleCount();\n }", "public int getNumEdges();", "int numOfPillars() {\n // there are one more coordinate line than blocks in each direction\n // since each block must be hinged on a coordinate line on each side\n return (ni+1) * (nj+1);\n }", "int getXYPairCount();", "public int numEdges();", "public static long getIntervalNumber() {\n return getSecondsSinceEpoch() / SECS_TO_10MINS;\n }", "public int getNumEdges()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numEdges;\n\t}", "public static int numSlices(int width,int height) // calculate the number of slices based on the skewimage.java class\r\n\t{\r\n\t\tint slice=0;\r\n\t\tif((height%40<2|| height%40>38) && (width%33<2 || width%33>31)){ // if height is 40 or a a near divisior of 40 and if width is 33 or near divisor of 33 \r\n\t\t\tslice=(int) (width/33); // slices =width/33\r\n\t\t}\r\n\t\treturn (int)slice;\r\n\t}", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "int getAndSequenceGroupsCount();", "public int get_nr_of_points() {\n return points_per_segment;\n }", "public int countRange(double low, double high) {\n\t\tif (low < 0 || high < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Input out of bounds\");\n\t\t}\n\t\tint range = 0;\n\t\tfor (int c = 0; c < height; c++) {\n\t\t\tfor (int v = 0; v < width; v++) {\n\t\t\t\tif (source.getPixel(v, c).getIntensity() >= low && source.getPixel(v, c).getIntensity() <= high) {\n\t\t\t\t\trange += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn range;\n\t}", "private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}", "int getMaxRawImages();", "public int getRangeHeight();", "public int getInterval() {\r\n return interval;\r\n }", "protected int length() { return FormatTools.getRasterLength(lengths); }", "public int getFigureCount() {\n if (figureBuilder_ == null) {\n return figure_.size();\n } else {\n return figureBuilder_.getCount();\n }\n }", "public int getIntervalLength() {\r\n\t\treturn Integer.parseInt(properties.getProperty(KEY_INTERVAL_LENGTH)) * 1000;\r\n \t}", "int getNumberOfEdges();", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public int rangeSize() {\n return Math.abs(max - min);\n }", "public int getNumEdges() {\n\t\treturn this.actualTotalEdges;\n\t}", "int getPartitionLagsCount();", "int getBlockNumbersCount();", "public int numberOfSegments() {\n return nOfSegs;\n }", "int getEdgeCount();", "Integer getTotalStepCount();", "int intervalSize(T v1, T v2) {\n int c = 0;\n Node x = successor(v1);\n while (x != null && x.value.compareTo(v2) < 0) {\n c++;\n x = successor(x);\n }\n return c;\n }", "int getFeatureCount();", "public abstract double getRangeSize();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "public int interval() {\n return 30;\n }", "public int numPoints() {\n\t\treturn divided ? -1 : points.size();\n\t}", "public int getImageCount() {\n return imageCount;\n }", "int nbLignes();", "public Integer getInterval() {\n\t\treturn interval;\n\t}", "int getRange();", "public double interval() {\n return interval;\n }", "int getBlockNumsCount();", "int getBlockNumsCount();", "@java.lang.Override\n public int getFigureCount() {\n return figure_.size();\n }", "int getMergedCellCount();", "public static int size_group() {\n return (8 / 8);\n }", "public abstract int getCntGrnd();", "int getImagesByHandlerCount();", "public native int getNumFrames() throws MagickException;", "public int getNoOfImages() {\n return noOfImages;\n }", "int getNumberFrames();", "int sizeOfClassificationArray();", "private long countPanPixels(int maxRes) {\n\t\tlong numPixels = 0;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry panEntry = panImageList[n];\n\t\t\tif (panEntry.imageListEntry.enabled) {\n\t\t\t\tint width = panEntry.imageListEntry.getImageMetadataEntry().n_line_samples;\n\t\t\t\tint height = panEntry.imageListEntry.getImageMetadataEntry().n_lines;\n\t\t\t\twidth = PanImageLoader.fixDimension(width);\n\t\t\t\theight = PanImageLoader.fixDimension(height);\n\t\t while ((width > maxRes) || (height > maxRes)) {\n\t\t \twidth = width >> 1;\n\t\t \theight = height >> 1;\n\t\t }\n\t\t\t\tnumPixels = numPixels + width * height;\n\t\t\t}\n\t\t}\n\t\treturn numPixels;\t\t\n\t}", "public int getNumEdges(){\n return numEdges;\n }", "protected static double getMaxBarWidth(List<Interval<Double>> intervals) {\n\t\tdouble max_x = 0;\n\t\tfor (int j = 0; j < intervals.size(); j++) {\n\t\t\tif (intervals.get(j).isInfinite())\n\t\t\t\tcontinue;\n\t\t\tif (max_x < intervals.get(j).getEnd()) {\n\t\t\t\tmax_x = intervals.get(j).getEnd();\n\t\t\t}\n\t\t}\n\t\tif (max_x == 0) { // all intervals are 'infinite'\n\t\t\tmax_x = 1;\n\t\t}\n\t\t// Multiplier to scale the barcodes to fit the image width\n\t\treturn max_x;\n\t}", "private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}", "public int get_nr_of_segments() {\n return nr_of_segments;\n }", "public int getNumberOfEdges();", "int getShotAnnotationsCount();", "int getShotAnnotationsCount();", "int getInCount();", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "private int NumInRangeAxis(int min, int max, Boolean axis){\n\t\tint counter = 0;\n\t\tboolean stop = false;\n\t\tif (this.size==0) return 0;\n\t\tif (axis){ //axis x\n\t\t\tif (min>this.maxx.getData().getX() || max<this.minx.getData().getX()) stop=true;\n\t\t\tthis.current=this.minx;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getX() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}}\n\t\telse { //axis y\n\t\t\tif (min>this.maxy.getData().getY() || max<this.miny.getData().getY()) stop=true;\n\t\t\tthis.current=this.miny;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getY() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}}\n\t\treturn counter;\n\t}" ]
[ "0.68266594", "0.66076756", "0.65575653", "0.65089405", "0.6443204", "0.62923175", "0.62894726", "0.61455256", "0.6144114", "0.6142258", "0.6141641", "0.610691", "0.610379", "0.60707545", "0.60544485", "0.60516137", "0.6039659", "0.6032952", "0.6017815", "0.6014765", "0.6014765", "0.6014765", "0.5982619", "0.5970078", "0.5950044", "0.5935678", "0.5927936", "0.58723474", "0.58623934", "0.5846496", "0.58422637", "0.5840708", "0.5823219", "0.5804971", "0.57868284", "0.5785754", "0.5784631", "0.57751703", "0.5769868", "0.57693976", "0.57687014", "0.5735459", "0.5729532", "0.5702567", "0.56974345", "0.5692597", "0.5691484", "0.5683129", "0.567321", "0.56613714", "0.56596917", "0.56586194", "0.5653796", "0.56419015", "0.564154", "0.56397843", "0.5609807", "0.56061625", "0.5602616", "0.55920714", "0.5583485", "0.5566516", "0.5560656", "0.55550945", "0.554638", "0.5536443", "0.55338347", "0.5528453", "0.5528453", "0.5528453", "0.5528453", "0.5516603", "0.5510729", "0.55030584", "0.54898345", "0.54871434", "0.54812604", "0.5480294", "0.54739326", "0.54739326", "0.54692924", "0.54581225", "0.545608", "0.54487306", "0.5444475", "0.5442829", "0.54413295", "0.5438695", "0.5438019", "0.5425461", "0.542341", "0.5418992", "0.54188806", "0.54144055", "0.54016286", "0.54006934", "0.54006934", "0.53991145", "0.5390981", "0.53848594" ]
0.76309645
0
Get the total number of images in the file.
public int getNumberOfImages() { short zdim = getZDim(); zdim = zdim > 0 ? zdim : 1; short slices = getNumberOfSlices(); slices = slices > 0 ? slices : 1; short intervals = getNumberOfGatedIntervals(); intervals = intervals > 0 ? intervals : 1; return zdim * slices * intervals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberOfPhotos(){\n\t\tint num = 0;\n\t\ttry {\n\t\t\tFileInputStream in = new FileInputStream(\"images\");\n\t\t\t//Skipping magic number\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tin.read();\n\t\t\t}\n\t\t\tbyte[] tmpVar = new byte[4];\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\ttmpVar[i] = (byte) in.read();\n\t\t\t}\n\t\t\tnum = ByteBuffer.wrap(tmpVar).getInt();\n\t\t\tin.close();\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn num;\n\t\t\n\t}", "public int getNoOfImages() {\n return noOfImages;\n }", "public int getTotalPics()\n {\n\t\t/*System.out.println(\"photo\"+photo.size());\n\t\tif(photo.size() == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tSystem.out.println(totalPics);*/\n return this.totalPics;\n }", "public int getImageCount() {\n return imageCount;\n }", "int getFileCount();", "int imageCount();", "public int getNumberOfImages() { return this.images.size(); }", "public Number getFileCount() {\r\n\t\treturn (this.fileCount);\r\n\t}", "int getFilesCount();", "int getFilesCount();", "int getImgDataCount();", "int getFileInfoCount();", "public int getNumberOfPictures()\r\n {\r\n return pictures.size();\r\n }", "public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }", "public long getSizeOfImage()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt32(relpos(Offsets.SIZE_OF_IMAGE.position));\n }", "public int getCount() {\r\n\t\t\treturn ((HerdinatorApplication) getApplication()).imageIDs.length;\r\n\t\t}", "public int getLengthImages() {\r\n\t\treturn imageList.size();\r\n\t}", "public double getNumFiles(){\n\t\treturn (this.num_files);\n\t}", "public int getFileCount() {\n waitPainted(-1);\n Component list = getFileList();\n if(list instanceof JList)\n return ((JList)list).getModel().getSize();\n else if(list instanceof JTable)\n return ((JTable)list).getModel().getRowCount();\n else\n throw new IllegalStateException(\"Wrong component type\");\n }", "public int getCount() {\n\t\t\treturn this.myImageIds.length;\n\t\t}", "public int getImageCount() {\n return this.imageViews.length;\n }", "public int getCoffeeShopImageCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.CoffeeShopImageTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }", "public int getnumFiles() {\r\n\t\t//initialize the variable numFiles \r\n\t\tthis.numFiles=0;\r\n\r\n\t\t/*An enhanced for loop is used to iterate through the arraylist.\r\n\t\t * An if statement checks in the object at the \"item\" index is of type file\r\n\t\t * If it is the numFiles variable is incremented by 1.\r\n\t\t * Otherwise, it is a directory, and the the getnumFiles is called recursively to search\r\n\t\t * for files in the folder.\r\n\t\t */\r\n\t\tfor (DirectoryComponent item : DirectoryList){\r\n\t\t\tif(item instanceof File){\r\n\t\t\t\tthis.numFiles ++;\r\n\t\t\t} else {\r\n\t\t\t\tthis.numFiles += item.getnumFiles();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn numFiles;\r\n\t}", "public int size() {\n return files.size();\n }", "public int getNumPhotos() {\n\t\treturn photos.size();\n\t}", "public int numPages() {\n \t//numOfPages = (int)(this.fileName.length()/BufferPool.PAGE_SIZE);\n return numOfPages;\n }", "int countFile(File file) {\n return readFile(file).length;\n }", "@Override\n\tpublic int getNumberOfFiles() {\n\t\tIterator<FileSystemItem> it = this.content.iterator();\n\t\tint numberOfFiles = 0;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\tif(it.next().isDirectory() == false) {\n\t\t\t\tnumberOfFiles++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn numberOfFiles;\n\t}", "public int getDrinkImageCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.DrinkImageTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }", "public int numPages() {\n // some code goes here\n //System.out.println(\"File length :\" + f.length());\n\n return (int) Math.ceil(f.length() * 1.0 / BufferPool.PAGE_SIZE * 1.0);\n }", "public int getFileInfoCount() {\n if (fileInfoBuilder_ == null) {\n return fileInfo_.size();\n } else {\n return fileInfoBuilder_.getCount();\n }\n }", "public String getNumFiles() {\n\t\ttry {\n\t\t\tFile dir = new File(getLocationOfFiles());\n\t\t\treturn Long.toString(dir.listFiles(new XMLFileFilter()).length);\n\t\t} catch (Throwable e) {\n\t\t\treturn \"0\";\n\t\t}\n\t}", "public int getFilesCount() throws YAPI_Exception\n {\n return get_filesCount();\n }", "public int getFilesCount() {\n if (filesBuilder_ == null) {\n return files_.size();\n } else {\n return filesBuilder_.getCount();\n }\n }", "public int getPicCount(){\n return picCount;\n }", "int getImagesByHandlerCount();", "public int getSumOfImagesWidth() {\n int sum = 0;\n for (RichContentImage image : this.images) {\n sum += image.getWidth();\n }\n return sum;\n }", "public int getSize() {\n\t\treturn smilFiles.size();\n\t}", "public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }", "public int getCount() {\n return imageIDs.length;\n }", "int getHotelImageURLsCount();", "public int getCount() {\n return mImages.length;\n }", "public int get_filesCount() throws YAPI_Exception\n {\n int res;\n synchronized (this) {\n if (_cacheExpiration <= YAPIContext.GetTickCount()) {\n if (load(_yapi._defaultCacheValidity) != YAPI.SUCCESS) {\n return FILESCOUNT_INVALID;\n }\n }\n res = _filesCount;\n }\n return res;\n }", "public int getimagecounter() {\n\t\treturn imagecounter;\r\n\t}", "@java.lang.Override\n public int getFilesCount() {\n return files_.size();\n }", "int countFile(String path) {\n return readFile(path).length;\n }", "int getFileNamesCount();", "int getFileNamesCount();", "@java.lang.Override\n public int getFileInfoCount() {\n return fileInfo_.size();\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return this.filePage.getSizeInfile();\n }", "private int calculateImagesNotFound() {\n int imagesNotFound = 0;\n for (int count : countImagesNotFound) {\n imagesNotFound += count;\n }\n\n return imagesNotFound;\n }", "public int getImageCount(String id) throws FormatException, IOException {\n if (!id.equals(currentId)) initFile(id);\n return numBlocks;\n }", "public long countEntries() {\n\t\tlong entries=0;\n\t\ttry {\n\t\t\tentries=Files.lines(new File(PAYROLL_FILE_NAME).toPath()).count();\n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn entries;\n\t}", "@Transactional\n\tpublic Integer countProductImagess() {\n\t\treturn ((Long) productImagesDAO.createQuerySingleResult(\"select count(o) from ProductImages o\").getSingleResult()).intValue();\n\t}", "private int getSize(File f) {\n int lines = 0;\n try {\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n s.nextLine();\n lines++;\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return lines;\n }", "public int getImagesByHandlerCount() {\n if (imagesByHandlerBuilder_ == null) {\n return imagesByHandler_.size();\n } else {\n return imagesByHandlerBuilder_.getCount();\n }\n }", "int getImagesByTransformCount();", "int getBurstNImages();", "public int getNumberOfAvailableFiles() {\n return numberOfAvailableFiles;\n }", "public static int getNumberOfFiles(File file) {\n return getNumberOfFiles(file, 0); // Call auxiliary method\n }", "public int numPages() {\n // some code goes here\n return (int) Math.ceil(m_f.length() / BufferPool.PAGE_SIZE);\n }", "public native int getNumFrames() throws MagickException;", "public int getSize()\r\n {\r\n return pile.size();\r\n }", "public int getTotalSize();", "public long size() {\n return file.length();\n }", "public int getFileNamesCount() {\n return fileNames_.size();\n }", "public int numPages() {\n // some code goes here\n return (int)Math.ceil(f.length()/BufferPool.PAGE_SIZE);\n \n }", "public int getFileRecordCount() {\n\t\treturn fileRecordCount;\n\t}", "public int getFileNamesCount() {\n return fileNames_.size();\n }", "int getSourceFileCount();", "public int getPhotosListSize() {\n\t\treturn images.size();\n\t}", "public int getImagesByHandlerCount() {\n return imagesByHandler_.size();\n }", "public static int filesWithSizes (File f)\n\t{\n\t\tif (f.isFile())\n\t\t{\n\t\t\tif (f.length()>= 10000 && f.length() <= 25000)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint count = 0;\n\t\t\tfor (File file: f.listFiles())\n\t\t\t{\n\t\t\t\tcount += filesWithSizes(file);\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}", "public int getResourceCount() {\n \t\tint sum = 0;\n \t\tfor (int i = 0; i < resources.length; i++)\n \t\t\tsum += resources[i];\n \t\treturn sum;\n \t}", "public int getImageWidth()\n {\n \n int retVal = getImageWidth_0(nativeObj);\n \n return retVal;\n }", "public int getTotalCount() {\n return totalCount;\n }", "public int getNumResources() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < resources.length; i++)\n \t\t\tcount += resources[i];\n \n \t\treturn count;\n \t}", "public double getNumuploads(){\n\t\treturn (this.num_upload);\n\t}", "public int idNum(String fullFilePath){\n\n int lines = 0;\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(fullFilePath));\n while (reader.readLine() != null) {\n lines++;\n }\n reader.close();\n }\n catch(IOException ioe) {\n ioe.printStackTrace();\n }\n return lines;\n }", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "public Vector<file> count()\n {\n Vector<Model.file> files = new Vector<>();\n try\n {\n pw.println(11);\n\n files = (Vector<Model.file>) ois.readObject();\n\n }\n catch (ClassNotFoundException | IOException e)\n {\n System.out.println(e.getMessage());\n }\n return files ;\n }", "public int countFile(String path){\r\n int count=0;\r\n String filename;\r\n File dir = new File(path);\r\n\r\n String[] children = dir.list();\r\n if (children == null) {\r\n count = 0;\r\n }else {\r\n count = children.length;\r\n }\r\n return count;\r\n }", "int getCityImageURLsCount();", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public int getNumberOfInProcessFiles() {\n return numberOfInProcessFiles;\n }", "public int getNumberOfFailedFiles() {\n return numberOfFailedFiles;\n }", "@Override\n\t\t\tpublic int getCount() {\n\t\t\t\treturn imageId.length;\n\t\t\t}", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getNumberOfFilesInDirectory() {\n ClassLoader classLoader = getClass().getClassLoader();\n File directoryFile = new File(classLoader.getResource(directoryString).getFile());\n\n return directoryFile.listFiles().length;\n }", "public int getTotalSize() {\n return totalSize_;\n }", "int getTotalSize();", "public int getGallerySize(){\r\n int size = 0;\r\n if(recipe != null){\r\n size = recipe.getImageGallery().size();\r\n }\r\n return size;\r\n }", "public long getTotalAmountUploaded();", "public static int getSize(){\n Scanner input;\n \n \n File f = new File(fName);\n \n \n int size = 0;\n \n try{\n input = new Scanner(f);\n input.nextLine();\n \n while(input.hasNextLine()){\n input.nextLine();\n size++;\n \n }\n input.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n return size;\n}", "public long getSize() {\r\n return mFile.getSize();\r\n }", "private int lineCount() throws IOException\n {\n //This integer will hold the amount of lines\n int lines = 0;\n\n //Create a temporary scanner to iterate through the map file\n Scanner lineCounter = new Scanner(new File(mapFile));\n\n //Iterate through the map file and increment the counter per each line\n while(lineCounter.hasNextLine())\n {\n lineCounter.nextLine();\n lines++;\n //System.out.println(\"I am at line\" + lines);\n }\n \n //Close lineCounter\n lineCounter.close();\n\n //Spit out the amount of lines\n return lines;\n }", "int getStatMetadataCount();", "public static int getNumberOfFiles() {\n\t\treturn EXTENSIONS.length;\n\t}", "public int numBlocks() throws IOException {\r\n int len = (int)((file.length()) / (blockSizeBytes));\r\n return len;\r\n }" ]
[ "0.8314842", "0.7793645", "0.7751664", "0.7684363", "0.7578019", "0.75466585", "0.7514005", "0.73658955", "0.73069584", "0.73069584", "0.72876304", "0.7278761", "0.72617805", "0.7166955", "0.70769376", "0.70620596", "0.70411575", "0.6998797", "0.69879574", "0.6980463", "0.6969626", "0.6894432", "0.68762267", "0.6832857", "0.68262386", "0.6810554", "0.6797411", "0.6785261", "0.67673486", "0.67148554", "0.6693665", "0.6687096", "0.6677976", "0.6660184", "0.66576", "0.665136", "0.66429687", "0.6632583", "0.6624142", "0.6616027", "0.6603622", "0.6559698", "0.6546169", "0.65059376", "0.6498611", "0.6498207", "0.6491582", "0.6491582", "0.6491476", "0.64412224", "0.64408845", "0.6438966", "0.64288586", "0.6428102", "0.64235353", "0.63863117", "0.63786536", "0.63744354", "0.63496673", "0.63406456", "0.633557", "0.63353175", "0.63214326", "0.63048595", "0.63028437", "0.63000244", "0.6283128", "0.6277049", "0.62547934", "0.62460715", "0.624063", "0.6231501", "0.62278944", "0.6224729", "0.6223892", "0.6210914", "0.6201757", "0.6192336", "0.61628294", "0.61587816", "0.61420965", "0.6139381", "0.6127998", "0.6116554", "0.6109872", "0.610217", "0.608946", "0.60892135", "0.6088551", "0.6087049", "0.6086894", "0.6086487", "0.608338", "0.60757744", "0.6075074", "0.6071331", "0.60676414", "0.6064911", "0.604863", "0.60478914" ]
0.7311188
8
Get the number of slices in a reconstructed data set.
public short getNumberOfSlices() { return getShort(ADACDictionary.RECONSTRUCTED_SLICES); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int slices() {\n\treturn slices;\n}", "public int size() {\n\treturn slices*rows*columns;\n}", "int getDimensionsCount();", "int numberOfDimensions();", "public int getNumRows() {\n\t\treturn this.subset.length;\n\t}", "public static int numSlices(int width,int height) // calculate the number of slices based on the skewimage.java class\r\n\t{\r\n\t\tint slice=0;\r\n\t\tif((height%40<2|| height%40>38) && (width%33<2 || width%33>31)){ // if height is 40 or a a near divisior of 40 and if width is 33 or near divisor of 33 \r\n\t\t\tslice=(int) (width/33); // slices =width/33\r\n\t\t}\r\n\t\treturn (int)slice;\r\n\t}", "public int getNumberOfSets();", "int getNumSampleDimensions();", "int getNumOfChunks();", "public int dimensionCount() {\n\t\treturn point.length;\n\t}", "int getNumSegments();", "public int getNumberOfImages() {\n\n\t\tshort zdim = getZDim();\n\t\tzdim = zdim > 0 ? zdim : 1;\n\n\t\tshort slices = getNumberOfSlices();\n\t\tslices = slices > 0 ? slices : 1;\n\n\t\tshort intervals = getNumberOfGatedIntervals();\n\t\tintervals = intervals > 0 ? intervals : 1;\n\n\t\treturn zdim * slices * intervals;\n\n\t}", "int getChunksCount();", "int getChunksCount();", "public int numPartitions() {\n\t\treturn vertex_sets.size();\n\t}", "public int dimensions() {\n return this.data[0].length;\n }", "public int getNumPartitions() {\n\t\treturn (new HashSet<PartitionType>(partitionMap.values())).size(); \n\t}", "public int numberOfIcosahedrons() {\n return icosList.size();\n }", "int getPartsCount();", "int getPartsCount();", "public int numSets()\n {\n return numSets;\n }", "int getNumberOfCurveSegments();", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public int getNumberOfComponents();", "public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }", "public int sizeOfSubArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SUB$2);\n }\n }", "int[] getSliceShape() throws InvalidRangeException;", "public final int dimension() { return _N; }", "public abstract Integer getNumberOfElements();", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "int sizeOfClassificationArray();", "public int get_nr_of_points() {\n return points_per_segment;\n }", "public int get_nr_of_segments() {\n return nr_of_segments;\n }", "int getImgDataCount();", "public int getNumDataPointsInChrom(int chromosome);", "public int numberOfSegments() {\n return nOfSegs;\n }", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public int getNumberOfElements();", "protected int length() { return FormatTools.getRasterLength(lengths); }", "@Override\n\tpublic int size() {\n\t\treturn this.nDims;\n\t}", "public int dimensions() {\n\t\treturn dim;\n\t}", "public int getSliceMemberCount(int edge, int slice) throws EdgeOutOfRangeException, SliceOutOfRangeException {\n if (edge==DataDirector.PAGE_EDGE)\n return 0;\n else\n return 1;\n }", "public short getNumberOfGatedIntervals() {\n\t\treturn getShort(ADACDictionary.NUMBER_OF_IMAGE_SETS);\n\t}", "public int arraySize();", "int getNumberOfFold();", "int getArrayLength();", "int getArrayLength();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int sizeOfReferenceRangeArray();", "int getBlockNumbersCount();", "public int getNrOfElements() {\n return this.nrOfElements;\n }", "int getPointsCount();", "int getPivotDimensionHeadersCount();", "int getPartitionLagsCount();", "int getInterleavedAxisCount();", "public int getNumVertices();", "int sizeOfTrafficVolumeArray();", "int sizeOfFeatureArray();", "int sizeOfFeatureArray();", "int getIndicesCount();", "public int getCount() {\n if(data.size()<=0) return 1;\n return data.size();\n }", "public int getNumChromosomes();", "public int numberOfSegments() {\n\t\treturn count;\n\t}", "public int sizeOfCornerArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(CORNER$12);\r\n }\r\n }", "int getCellsCount();", "int sizeOfPlanFeatureArray();", "public int numberOfSegments() {\n return segments.size();\n }", "int getBlockNumsCount();", "int getBlockNumsCount();", "public int sizeOfDataChckArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATACHCK$14);\n }\n }", "public int size() {\n \n return point2DSET.size();\n }", "@Kroll.getProperty\n\tpublic int getSectionCount()\n\t{\n\t\treturn getSections().length;\n\t}", "public IntegerDt getNumberOfSeries() { \n\t\tif (myNumberOfSeries == null) {\n\t\t\tmyNumberOfSeries = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfSeries;\n\t}", "public int size() {\n return intervals.size();\n }", "public int size() {\n return this.wellsets.size();\n }", "public int getChunkCount () {\n return (this.getTagCount()>>BITS_TO_SHIFT_FOR_CHUNK) + 1;\n }", "public static int numDimensions_data() {\n return 1;\n }", "public int size()\n {\n return observations.length;\n }", "public int numberOfArithmeticSlices(int[] A) {\n int res = 0;\n int[] dp = new int[A.length];\n for (int i = 2; i < A.length; i++) {\n if (A[i] + A[i - 2] == 2 * A[i - 1]) {\n dp[i] = 1 + dp[i - 1];\n }\n res += dp[i];\n }\n return res;\n }", "public int numberOfSegments() {\n return p;\n }", "int sizeOfControlPersonsArray();", "public int getNumBitsSet()\n \t{\n \t\tint count = 0;\n \n \t\tfor (int index = getLength() - 1; index >= 0; index--)\n \t\t{\n \t\t\tif (isSet(index))\n \t\t\t{\n \t\t\t\tcount++;\n \t\t\t}\n \t\t}\n \n \t\treturn count;\n \t}", "public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }", "int getDataScansCount();", "public int num_sets() {\n int count = 0;\n for (int i = 0; i < _parent.length; ++i) {\n if (_parent[i] == i)\n count++;\n }\n return count;\n }", "public static int numElements_data(int dimension) {\n int array_dims[] = { 60, };\n if (dimension < 0 || dimension >= 1) throw new ArrayIndexOutOfBoundsException();\n if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n return array_dims[dimension];\n }", "int getAndSequenceGroupsCount();", "public int getCount() {\n \t\tint total = 0;\n \t\tfor(Adapter adapter : this.sections.values())\n \t\t\ttotal += adapter.getCount() + 1;\n \t\treturn total;\n \t}", "public int size() {\n return pointSet.size();\n }", "public int sizeOfSegmentArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SEGMENT$2);\n }\n }", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public int seriesCount() {\n return this.dataset.seriesCount();\n }", "@Override\n public int getSeriesCount() {\n return datasets.size();\n }", "int cardinality();", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "int getChunksLocationCount();" ]
[ "0.7295645", "0.7226203", "0.6561079", "0.6462249", "0.64528203", "0.63612777", "0.6324338", "0.6273267", "0.6249475", "0.6237357", "0.6189289", "0.6134426", "0.610562", "0.610562", "0.60407454", "0.60072494", "0.59961534", "0.5979388", "0.59692967", "0.59692967", "0.59322745", "0.5913026", "0.58907104", "0.58880347", "0.5883492", "0.5878486", "0.5872046", "0.586038", "0.58600134", "0.5852012", "0.58484894", "0.5844927", "0.583061", "0.5816108", "0.5815333", "0.58152246", "0.5789904", "0.5774556", "0.57631856", "0.574882", "0.5741139", "0.57382077", "0.57354766", "0.57267785", "0.57240546", "0.5722421", "0.5722421", "0.57130104", "0.57130104", "0.57130104", "0.57130104", "0.57130104", "0.5711423", "0.5685034", "0.56811696", "0.5671075", "0.5669473", "0.5668474", "0.56487006", "0.5626033", "0.5624734", "0.5622889", "0.5622889", "0.5618478", "0.5618123", "0.5614394", "0.5610863", "0.56093735", "0.5604701", "0.56041074", "0.56024057", "0.5602078", "0.5602078", "0.55992645", "0.5598517", "0.5590234", "0.5586745", "0.5581656", "0.55808425", "0.55804783", "0.55751795", "0.5570917", "0.5568653", "0.556853", "0.5567285", "0.5565391", "0.5562563", "0.5561349", "0.5558579", "0.5553324", "0.5549081", "0.5544848", "0.55439943", "0.5540878", "0.5535119", "0.5535097", "0.5535006", "0.55334574", "0.55307335", "0.5523524" ]
0.7460472
0
Get the pixel size in mm. The pixel pixel dimensions are calculated from the calibration factor. Calibration factor is the pixel size of a 1024x1024 pixel image acquired with the full field of view. Pixel size is calculated with the following equation: (1024 CALB)/(dim zoom) mm/pixel
public float getPixelSize() { float pixelSize = 0; float zoom = getFloat(ADACDictionary.ZOOM); // Get calibration factor (CALB) String calString = extrasMap.get(ExtrasKvp.CALIB_KEY); // Some wholebody images have height > width. Typically 1024x512. // Crocodile eats the biggest. short height = getHeight(); short width = getWidth(); short dim = height > width ? height : width; if (dim > 0 && calString != null) { try { float cal = Float.parseFloat(calString); // Now calculate the pixel size pixelSize = (1024 * cal) / (dim * zoom); } catch (NumberFormatException e) { logger.log("Unable to parse calibration factor"); pixelSize = getRoughPixelSize(); } } else { pixelSize = getRoughPixelSize(); } return pixelSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float getRoughPixelSize() {\n\n\t\tfloat size = 380; // mm\n\t\tfloat pixels = getHeight();\n\t\treturn pixels > 0 ? size / pixels : 0;\n\n\t}", "public int getPixelSize() {\n\t\treturn pixelSize;\n\t}", "public double dimensionsToMeters() {\n\t\tdouble heightMeters = heightInInches / 39.370;\n\t\tdouble widthMeters = widthInInches / 39.370;\n\n\t\treturn areaInMeters = heightMeters * widthMeters;\n\t}", "public double getWidthInMillimeters()\n {\n return MILLIMETERS * width;\n }", "public double getPixelSize() {\n\t\treturn 0;\n\t}", "public static double getDeviceInchSize(Context mContext){\n\n double size = 0;\n try {\n\n // Compute screen size\n\n DisplayMetrics dm = mContext.getResources().getDisplayMetrics();\n\n float screenWidth = dm.widthPixels / dm.xdpi;\n\n float screenHeight = dm.heightPixels / dm.ydpi;\n\n size = Math.sqrt(Math.pow(screenWidth, 2) +\n\n Math.pow(screenHeight, 2));\n\n } catch(Throwable t) {\n\n }\n\n return size;\n }", "private double getCellSize() {\n double wr = canvas.getWidth() / board.getWidth();\n double hr = canvas.getHeight() / board.getHeight();\n\n return Math.min(wr, hr);\n }", "public float getMeasuredSizeCorrectedByPerspective() {\n float scale = getPerspectiveScaleFactor(location);\n if (scale <= 0) {\n return averageEventDistance;\n }\n return averageEventDistance / scale;\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 }", "public Dimension getSize()\n\t{\n\t\treturn new Dimension(image.getWidth(),image.getHeight());\n\t}", "public Dimension2D getCanvasSize(\n )\n {\n return renderSize == null\n ? Dimension.get(getContentContext().getBox()) // Device-independent (user-space) area.\n : renderSize; // Device-dependent (device-space) area.\n }", "public Point2D.Float getSize() {\r\n\t\treturn size;\r\n\t}", "public double sizeMeters() {\n return this.size_meters;\n }", "private int getScale(){\n Display display = ((WindowManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();\n\n int width = display.getWidth();\n Double val = (double) width / 360d;\n val = val * 100d;\n return val.intValue();\n }", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "public float getEqualizationScale() {\n return Gdx.graphics.getWidth() / WE.getCurrentConfig().getRenderResolutionWidth();\n }", "public Vector2i getActualSizeInTiles() {\n return new Vector2i(getActualWidthInTiles(), getActualHeightInTiles());\n }", "public int getImageFileSize(int resolution)\n {\n if (resolution == 1000)\n return 35000;\n else\n return 120000;\n }", "public float getDiameter() {\n /* 425 */\n RectF content = this.mViewPortHandler.getContentRect();\n /* 426 */\n content.left += getExtraLeftOffset();\n /* 427 */\n content.top += getExtraTopOffset();\n /* 428 */\n content.right -= getExtraRightOffset();\n /* 429 */\n content.bottom -= getExtraBottomOffset();\n /* 430 */\n return Math.min(content.width(), content.height());\n /* */\n }", "@TargetApi(12)\n public static int getBitmapSize(Bitmap bitmap) {\n if (ConfigUtil.hasV12()) {\n return bitmap.getByteCount();\n }\n // Pre HC-MR1\n return bitmap.getRowBytes() * bitmap.getHeight();\n }", "public static int getBitmapSize(Bitmap bitmap) {\n\t\t// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n\t\t// return bitmap.getByteCount();\n\t\t// }\n\t\t// Pre HC-MR1\n\t\treturn bitmap.getRowBytes() * bitmap.getHeight();\n\t}", "public final double megabytes()\n\t{\n\t\treturn kilobytes() / 1024.0;\n\t}", "public float getCacheSizeKB() {\n return ((float) cacheHandler.getCurrentCacheSizeBytes() / 1000);\n }", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "public float getDCMb();", "public static double calculatePixelToPhysicalRatio(String calibrationImagePath) {\n OpenCVLoader.initDebug();\n\n Mat frame1 = Imgcodecs.imread(calibrationImagePath);\n Imgproc.cvtColor(frame1, frame1, Imgproc.COLOR_BGR2GRAY);\n\n double pixelCMRatio = findTriangle(frame1);\n\n //cleanup mats\n frame1.release();\n\n return pixelCMRatio;\n }", "public double getWidthInInches()\n {\n return width;\n }", "public double getScaleToFitWidth() throws FOPException {\n final Dimension extents = this.previewArea.getViewport()\n .getExtentSize();\n return getScaleToFit(extents.getWidth() - 2 * BORDER_SPACING,\n Double.MAX_VALUE);\n }", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "public static int getBitmapSize(Bitmap bitmap){\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n return bitmap.getByteCount();\n }\n // Pre HC-MR1\n return bitmap.getRowBytes() * bitmap.getHeight();\n\n }", "@VisibleForTesting\n public int getMaxImageWidth() {\n return this.mContext.getResources().getDimensionPixelSize(isLowRam() ? 17105367 : 17105366);\n }", "public Point getSize() {\n\t\treturn p_screenSize;\n\t}", "public double getVelocitySize() {\r\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\r\n }", "public native float kbGetMapXSize();", "public Size getPictureSize() {\n String pair = get(\"picture-size\");\n if (pair == null)\n return null;\n String[] dims = pair.split(\"x\");\n if (dims.length != 2)\n return null;\n\n return new Size(Integer.parseInt(dims[0]),\n Integer.parseInt(dims[1]));\n\n }", "public Vector2i getSizeInChunks() {\n return new Vector2i(getWidthInChunks(), getHeightInChunks());\n }", "public static int size_quality() {\n return (16 / 8);\n }", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public float getZoomToFit() {\n setContentWorkDimensions();\n \n double zoomToFitWidth = 1.0 * getWidth() / (flippedDimensions() ? contentWorkHeight : contentWorkWidth);\n double zoomToFitHeight = 1.0 * getHeight() / (flippedDimensions() ? contentWorkWidth : contentWorkHeight);\n \n float zoomToFit = (float) Math.min(zoomToFitWidth, zoomToFitHeight);\n if (debug) Log.d(TAG, \"getZoomToFit() zoomToFit: \" + zoomToFit + \", \" + contentWorkWidth + \"x\" + contentWorkHeight);\n return zoomToFit;\n }", "protected int dpToPx() {\n Resources r = getResources();\n return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, r.getDisplayMetrics()));\n }", "public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}", "double getSize();", "public Dimension getCanvasSize() {\n return transformManager.getCanvasSize();\n }", "default int getSquareSize() {\n return java.awt.Toolkit.getDefaultToolkit().getScreenSize().width / 20;\n }", "public long getSize() {\n\t\treturn Math.abs(getXSize() * getYSize() * getZSize());\n\t}", "public static double calcResolution( double scaleDenominator, ICRS crs ) {\n IUnit units = crs.getAxis()[0].getUnits();\n return calcResolution( scaleDenominator, units );\n }", "public int getWidthInChunks() {\n return (int)Math.ceil((double)getWidth() / (double)getChunkWidth());\n }", "public double getHeightInMillimeters()\n {\n return MILLIMETERS * height;\n }", "private int measureWidth(int measureSpec) {\n\t\tint result = 0;\n\t\tint specMode = MeasureSpec.getMode(measureSpec);\n\t\tint specSize = MeasureSpec.getSize(measureSpec);\n\n\t\tif (specMode == MeasureSpec.EXACTLY) {\n\t\t\tresult = specSize;\n\t\t} else {\n\t\t\tresult = getSuggestedMinimumWidth();\n\t\t\tif (specMode == MeasureSpec.AT_MOST) {\n\t\t\t\tresult = Math.min(result, specSize);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public static int getTileSize(){\n\t\treturn tileDim;\n\t}", "public int getScreenSize() {\n screensize = getResources().getConfiguration().screenLayout &\n Configuration.SCREENLAYOUT_SIZE_MASK;\n return screensize;\n }", "private int measureWidth(int measureSpec) {\n\n int result = 0;\n int specMode = MeasureSpec.getMode(measureSpec);\n int specSize = MeasureSpec.getSize(measureSpec);\n\n if (specMode == MeasureSpec.EXACTLY) {\n // We were told how big to be\n result = specSize;\n } else {\n // Measure the text\n result = viewWidth;\n\n }\n\n return result;\n }", "public Vector2i getTileSize() {\n return new Vector2i(getTileWidth(), getTileHeight());\n }", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "private Point getScreenDim() {\n \t\tDisplay display = this.getWindowManager().getDefaultDisplay();\n \n \t\t@SuppressWarnings( \"deprecation\" )\n \t\tPoint size = new Point( display.getWidth(), display.getHeight() );\n \t\treturn size;\n \t}", "public int calcKernelSize() {\n\t\treturn 1+(int)Math.round(getStd()*3)*2;\n\t}", "private void getImgSize(){\n imgSizeX = 1080; //mAttacher.getDisplayRect().right - mAttacher.getDisplayRect().left;\n imgSizeY = 888.783f; //mAttacher.getDisplayRect().bottom - mAttacher.getDisplayRect().top;\n }", "public static int resHeight() {\n\t\t\n\t\treturn (int)resolution.getHeight();\n\t}", "public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }", "public int zoom() {\n double sizex = scale * getWidth();\n double sizey = scale * getHeight();\n for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)\n if (sizex > world.east() || sizey > world.north())\n return zoom;\n return 32;\n }", "public static int totalSize_data() {\n return (480 / 8);\n }", "public Vector2i getSize() {\n return new Vector2i(getWidth(), getHeight());\n }", "protected float getLayerSize(int y) {\n\t\tif (y < this.heightLimit * 0.3f) {\n\t\t\treturn -1.0f;\n\t\t} else {\n\t\t\tfloat f = (float) this.heightLimit / 2.0F;\n\t\t\tfloat f1 = f - (float) y;\n\t\t\tfloat f2 = MathHelper.sqrt(f * f - f1 * f1);\n\n\t\t\tif (f1 == 0.0F) {\n\t\t\t\tf2 = f;\n\t\t\t} else if (Math.abs(f1) >= f) {\n\t\t\t\treturn 0.0F;\n\t\t\t}\n\n\t\t\treturn f2 * 0.5F;\n\t\t}\n\t}", "public double getScaleToFitWindow() throws FOPException {\n final Dimension extents = this.previewArea.getViewport()\n .getExtentSize();\n return getScaleToFit(extents.getWidth() - 2 * BORDER_SPACING,\n extents.getHeight() - 2 * BORDER_SPACING);\n }", "protected double pixelOneSampleF() {\r\n\t\treturn ((double) getGraphWidth()) / section.getLength();\r\n\t}", "protected int measureWidth(int measureSpec) {\n int specMode = MeasureSpec.getMode(measureSpec);\n int specSize = MeasureSpec.getSize(measureSpec);\n int result;\n if (specMode == MeasureSpec.EXACTLY) {\n result = specSize;\n } else {\n result = (int) (2 * radius) + getPaddingLeft() + getPaddingRight() + (int) (2 * strokeWidth);\n if (specMode == MeasureSpec.AT_MOST) {\n result = Math.min(result, specSize);\n }\n }\n return result;\n }", "public int getRealSegmentSizeInBytes(int bitrate) {\n return (int) (bitrate * REAL_SEGMENT_DURATION / 8);\n }", "public static int resWidth() {\n\t\t\n\t\treturn (int)resolution.getWidth();\n\t\t\n\t}", "public Point getScreenSize(Activity activity) {\n Display display = activity.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n\n return size;\n }", "public float getSize() {\n\t\treturn size;\n\t}", "public int getViewportHeight() {\n return scalableImage.getViewportHeight();\n }", "public Vector2i getSizeInTiles() {\n return new Vector2i(getWidthInTiles(), getHeightInTiles());\n }", "public static int calculateInSampleSize(BitmapFactory.Options options, \n \t\t\tint reqWidth, int reqHeight) {\n \t\t// Raw height and width of image\n \t\tfinal int height = options.outHeight;\n \t\tfinal int width = options.outWidth;\n \t\tint inSampleSize = 1;\n \n \t\tif (height > reqHeight || width > reqWidth) {\n \t\t\tif (width > height) {\n \t\t\t\tinSampleSize = Math.round((float)height / (float)reqHeight); \n \t\t\t} else {\n \t\t\t\tinSampleSize = Math.round((float)width / (float)reqWidth); \n \t\t\t} \n \t\t}\n \n \t\treturn inSampleSize; \n \t}", "public int getLargeur() {\n return getWidth();\n }", "public static double squareInchesToSquareMilliMeters(double num){ return squareCentimetersToSquareMillimeters(squareInchesToSquareCentiMeters(num)); }", "public double getAsDpi() {\n\t\tif (units != 1 || pixelsxUnitX != pixelsxUnitY)\n\t\t\treturn -1;\n\t\treturn ((double) pixelsxUnitX) * 0.0254;\n\t}", "public int getViewportWidth() {\n return scalableImage.getViewportWidth();\n }", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "public double getWxInc() { return extents.getWidth() /getMyWidth(); }", "public int getLayoutMeasure(){\n\t\treturn this.getWaypointsMeasures(edges) + this.getShapesMeasures(shapes); \n\t}", "public XYPoint getMapSize();", "public static int calculateInSampleSize(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 // don't scale if we don't have a size yet\n if (reqWidth == 0 || reqHeight == 0)\n return inSampleSize;\n\n if (height > reqHeight || width > reqWidth) {\n if (width > height) {\n inSampleSize = Math.round((float) height / (float) reqHeight);\n } else {\n inSampleSize = Math.round((float) width / (float) reqWidth);\n }\n }\n return Math.min(MAX_SAMPLE_SIZE, inSampleSize);\n }", "public float getSize() {\n return size;\n }", "public long totalRAM( long fusedSizeMB, final int bytePerPixel )\n\t\t{\n\t\t\tlong inputImagesMB = 0;\n\n\t\t\tlong maxNumPixelsInput = FusionGUI.maxNumInputPixelsPerInputGroup( data, viewIds, 2 );\n\n\t\t\t// assume he have to load 50% higher resolved data\n\t\t\tdouble inputDownSampling = FusionGUI.isMultiResolution( data ) ? downsampling / 1.5 : 1.0;\n\n\t\t\tfinal int inputBytePerPixel = FusionGUI.inputBytePerPixel( viewIds.get( 0 ), data );\n\n\t\t\tif ( FusionGUI.isImgLoaderVirtual( data ) )\n\t\t\t{\n\t\t\t\t// either 50% of the RAM or 5% of the downsampled input\n\t\t\t\tinputImagesMB = Math.min(\n\t\t\t\t\t\tRuntime.getRuntime().maxMemory() / ( 1024*1024*2 ),\n\t\t\t\t\t\t( ( ( maxNumPixelsInput / Math.round( inputDownSampling * 1024*1024 ) ) * inputBytePerPixel ) / 20 ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinputImagesMB = Math.round( maxNumPixelsInput / ( inputDownSampling * 1024*1024 ) ) * inputBytePerPixel;\n\t\t\t}\n\n\t\t\tlong processingMB = 0;\n\n\t\t\tfusedSizeMB /= Math.max( 1, Math.round( Math.pow( fusedSizeMB, 0.3 ) ) );\n\n\t\t\treturn inputImagesMB + processingMB + fusedSizeMB;\n\t\t}", "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 float getSize2D() {\n\treturn pointSize;\n }", "public RMSize getSize() { return new RMSize(getWidth(), getHeight()); }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "@VisibleForTesting\n public int getMaxImageHeight() {\n return this.mContext.getResources().getDimensionPixelSize(isLowRam() ? 17105365 : 17105364);\n }", "public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }", "public float getSize()\n {\n return size;\n }", "public double getDensity() {\n\t\tdouble widthX = this.maxx.getData().getX()-this.minx.getData().getX();\n\t\tdouble widthY = this.maxy.getData().getY()-this.miny.getData().getY();\n\t\treturn (this.size)/(widthX * widthY);\n\t}", "public native float kbGetMapZSize();", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "public int calculateInSampleSize(\r\n\r\n BitmapFactory.Options options, int reqWidth, int reqHeight) {\n final int height = options.outHeight;\r\n final int width = options.outWidth;\r\n int inSampleSize = 1;\r\n\r\n if (height > reqHeight || width > reqWidth) {\r\n if (width > height) {\r\n inSampleSize = Math.round((float)height / (float)reqHeight);\r\n } else {\r\n inSampleSize = Math.round((float)width / (float)reqWidth);\r\n }\r\n }\r\n\r\n return inSampleSize;\r\n }", "int getTileSize();", "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 BigInteger getDocumentWidth() {\r\n\t\tCTPageSz pageSize = this.getDocument().getDocument().getBody()\r\n\t\t\t\t.getSectPr().getPgSz();\r\n\t\tBigInteger documentWidth = pageSize.getW();\r\n\t\treturn documentWidth;\r\n\t}", "public int calculateInSampleSize(BitmapFactory.Options options,\n 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 if (width > height) {\n inSampleSize = Math.round((float) height / (float) reqHeight);\n } else {\n inSampleSize = Math.round((float) width / (float) reqWidth);\n }\n\n final float totalPixels = width * height;\n \n final float totalReqPixelsCap = reqWidth * reqHeight * 2;\n\n while (totalPixels / (inSampleSize * inSampleSize) > totalReqPixelsCap) {\n inSampleSize++;\n }\n }\n return inSampleSize;\n }", "private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}" ]
[ "0.71365196", "0.6613454", "0.6342041", "0.6309561", "0.61591303", "0.61079174", "0.6081306", "0.6045607", "0.60296094", "0.5976115", "0.5962716", "0.5918531", "0.59162736", "0.5912471", "0.59120834", "0.59119034", "0.58924085", "0.5856122", "0.58438784", "0.58180976", "0.5816508", "0.57923836", "0.57884765", "0.5749523", "0.574793", "0.57377887", "0.5729989", "0.5713963", "0.57117933", "0.56819075", "0.56808084", "0.5671389", "0.5665725", "0.56441075", "0.56324613", "0.56110287", "0.55976754", "0.5591993", "0.5578907", "0.5557321", "0.5557311", "0.5557292", "0.55518544", "0.5546022", "0.5545528", "0.55329853", "0.55279756", "0.5527701", "0.55254024", "0.5519279", "0.55158", "0.551477", "0.5507855", "0.55050236", "0.5500185", "0.54965323", "0.5490122", "0.5489242", "0.54825175", "0.5481696", "0.54802763", "0.5473991", "0.54717755", "0.54697084", "0.546753", "0.546625", "0.54652834", "0.54622835", "0.5462148", "0.54615426", "0.5455709", "0.54523826", "0.544903", "0.5444088", "0.5441993", "0.5434301", "0.54278743", "0.54233915", "0.5421492", "0.5419868", "0.5411243", "0.5408142", "0.5402843", "0.5401493", "0.5393157", "0.5389821", "0.5388089", "0.53844446", "0.5379281", "0.53785396", "0.537819", "0.53755563", "0.53651124", "0.5364931", "0.5360858", "0.53569025", "0.53553295", "0.5355082", "0.5350335", "0.53464144" ]
0.8519852
0
Fall back on apriori knowledge of useful field of view size (520mm x 380mm), which gives a rough approximation.
private float getRoughPixelSize() { float size = 380; // mm float pixels = getHeight(); return pixels > 0 ? size / pixels : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "public static int size_quality() {\n return (16 / 8);\n }", "public static int offset_quality() {\n return (48 / 8);\n }", "public double getBestWidth() { return getBestWidth(-1); }", "public int getApproximateSize() {\r\n return approximateSize;\r\n }", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "short getPaperSize();", "public float getMeasuredSizeCorrectedByPerspective() {\n float scale = getPerspectiveScaleFactor(location);\n if (scale <= 0) {\n return averageEventDistance;\n }\n return averageEventDistance / scale;\n }", "public final int mo39474m() {\n return getMeasuredWidth();\n }", "short getFitWidth();", "private static void getRealSize(Display Pdisplay,Point Ppoint) //~vam6I~//~1am3I~//~va54I~\r\n { //~vam6I~//~1am3I~//~va54I~\r\n\t\tif (Dump.Y) Dump.println(\"Utils.getRealSize apiLevel=\"+Build.VERSION.SDK_INT);//~vam6I~//~1am3I~//~va54I~//~va56R~\r\n\t\tif (Build.VERSION.SDK_INT>=31) //Navigationbar can be hidden//~vam6I~//~1am3I~//~va54I~\r\n\t\t getRealSize_from31(Pdisplay,Ppoint); //~vam6I~//~1am3I~//~va54I~\r\n else //~vam6I~//~1am3I~//~va54I~\r\n\t\t getRealSize_19To30(Pdisplay,Ppoint); //~vam6I~//~1am3I~//~va54I~\r\n\t\tif (Dump.Y) Dump.println(\"Utils.getRealSize exit point=\"+Ppoint);//~vam6I~//~1am3I~//~va54I~//~va56R~\r\n }", "public float mo520d() {\n return (Math.max(this.f410k, this.f407h + ((float) this.f402b) + (this.f410k / 2.0f)) * 2.0f) + ((this.f410k + ((float) this.f402b)) * 2.0f);\n }", "public int getLargeur() {\n return getWidth();\n }", "public abstract long estimateMemorySize();", "double getSize();", "public native float kbGetMapXSize();", "private int m23822a() {\n int min = Math.min(this.f25314a.getMemoryClass() * 1048576, Integer.MAX_VALUE);\n if (min < 33554432) {\n return 4194304;\n }\n if (min < 67108864) {\n return 6291456;\n }\n if (VERSION.SDK_INT < 11) {\n return 8388608;\n }\n return min / 4;\n }", "int getWrongScale();", "public static double getOrigWidth() {\n\t\treturn 0.7450000047683716;\n\t}", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "public int getArmySize() {\n \t\treturn soldiers;\n \t}", "public abstract double getBaseWidth();", "public double getWidth() {\n return this.size * 2.0; \n }", "@Override\n public long estimateSize() { return Long.MAX_VALUE; }", "public static double getOrigWidth() {\n\t\treturn 0.7380000352859497;\n\t}", "@Override\n public long estimateSize() {\n return Long.MAX_VALUE;\n }", "public double getBaseStepSize() {\n \t\treturn 0.105;\n \t}", "public abstract int getMaxIntermediateSize();", "public final int mo81946a(MediaModel mediaModel) {\n int i;\n if (this.f82196d < 0) {\n RecyclerView recyclerView = this.f82188b;\n if (recyclerView != null) {\n i = recyclerView.getMeasuredHeight();\n } else {\n i = -1;\n }\n this.f82196d = i;\n }\n if (this.f82196d < 0) {\n this.f82196d = f82195h;\n }\n if (this.f82196d <= 0 || mediaModel.getWidth() <= 0 || mediaModel.getHeight() <= 0) {\n return f82194g;\n }\n float width = ((float) mediaModel.getWidth()) / ((float) mediaModel.getHeight());\n double d = (double) width;\n if (d < 0.5625d) {\n double d2 = (double) this.f82196d;\n Double.isNaN(d2);\n return (int) (d2 * 0.5625d);\n } else if (d <= 1.7777777777777777d) {\n return (int) (((float) this.f82196d) * width);\n } else {\n double d3 = (double) this.f82196d;\n Double.isNaN(d3);\n return (int) (d3 * 1.7777777777777777d);\n }\n }", "public short getUnitsPerEm() throws PDFNetException {\n/* 843 */ return GetUnitsPerEm(this.a);\n/* */ }", "private static float m590o(Context context) {\r\n DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\r\n Point point = new Point(displayMetrics.widthPixels, displayMetrics.heightPixels);\r\n return ((float) point.y) / ((float) point.x);\r\n }", "long getPlaneSize();", "private void calculateMapSize() {\n calculateMapSize(true);\n }", "public Integer getFocalLengthIn35mmFilm()\n\t{\n\t\treturn null;\n\t}", "public static int totalSize_infos_noise() {\n return (48 / 8);\n }", "public static double getOrigWidth() {\n\t\treturn 0.7400000095367432;\n\t}", "public static double getOrigWidth() {\n\t\treturn 0.7400000095367432;\n\t}", "private int m80089a() {\n ViewConfiguration mViewConfiguration = this.f64331a.getMViewConfiguration();\n C7573i.m23582a((Object) mViewConfiguration, \"mViewConfiguration\");\n return mViewConfiguration.getScaledTouchSlop();\n }", "public abstract double getRangeSize();", "public int getLayoutMeasure(){\n\t\treturn this.getWaypointsMeasures(edges) + this.getShapesMeasures(shapes); \n\t}", "protected double computePrefWidth(double aHeight) { return getWidth(); }", "private int m15059a(RecyclerView recyclerView) {\n if (this.f13703a == -1) {\n this.f13703a = recyclerView.getResources().getDimensionPixelSize(R.dimen.item_touch_helper_max_drag_scroll_per_frame);\n }\n return this.f13703a;\n }", "public static int size_amtype() {\n return (8 / 8);\n }", "public int linearEstimateForSize()\n {\n int ret = 1;\n if (parameterisedDimensions != null)\n for (int i = 0; i < parameterisedDimensions.length; i++)\n ret *= linearEstimateForSize(parameterisedDimensions[i]);\n if (simpleDimensions != null)\n for (int i = 0; i < simpleDimensions.length; i++)\n ret *= linearEstimateForSize(simpleDimensions[i]);\n return ret;\n }", "public static double getOptimalInflation() {\n\t\treturn Constants.OPTIMAL_INFLATION;\n\t}", "public static double getOrigWidth() {\n\t\treturn 0.7792094349861145;\n\t}", "public void setApproximateSize(int approximateSize) {\r\n this.approximateSize = approximateSize;\r\n }", "public abstract float getSquareSize();", "public static int sizeBits_quality() {\n return 16;\n }", "public int sizePresentation()\n // -end- 362409A9000A size_head327A646F00E6 \"ModelElement::sizePresentation\"\n ;", "public float sizeMultiplier();", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "public final long mo20953WW() {\n AppMethodBeat.m2504i(60318);\n if (fXT <= 0) {\n fXT = ((ActivityManager) C4996ah.getContext().getSystemService(\"activity\")).getLargeMemoryClass();\n }\n if (fXT >= 512) {\n AppMethodBeat.m2505o(60318);\n return 41943040;\n }\n AppMethodBeat.m2505o(60318);\n return 20971520;\n }", "@Override\r\n\tprotected Point getInitialSize() {\r\n\t\treturn new Point(706, 307);\r\n\t}", "int getTribeSize();", "private int m26064a(View view, C17487am c17487am) {\n AppMethodBeat.m2504i(2019);\n int bf = c17487am.mo31893bf(view) - this.sDo.cGd();\n AppMethodBeat.m2505o(2019);\n return bf;\n }", "private float m80086a() {\n ViewConfiguration mViewConfiguration = this.f64326a.getMViewConfiguration();\n C7573i.m23582a((Object) mViewConfiguration, \"mViewConfiguration\");\n return (float) mViewConfiguration.getScaledMinimumFlingVelocity();\n }", "public double getMaxWidth() throws PDFNetException {\n/* 657 */ return GetMaxWidth(this.a);\n/* */ }", "public static int offsetBits_quality() {\n return 48;\n }", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetHorizontalResolution();", "private float m80085a() {\n ViewConfiguration mViewConfiguration = this.f64325a.getMViewConfiguration();\n C7573i.m23582a((Object) mViewConfiguration, \"mViewConfiguration\");\n return (float) mViewConfiguration.getScaledMaximumFlingVelocity();\n }", "private int calcSize(int size)\n {\n return (((size - 1) / 9) + 1) * 9;\n }", "private double getUnitWidth(int index)\n {\n return _weights.get(index) / _totalWeight;\n }", "public float getPixelSize() {\n\n\t\tfloat pixelSize = 0;\n\t\tfloat zoom = getFloat(ADACDictionary.ZOOM);\n\n\t\t// Get calibration factor (CALB)\n\t\tString calString = extrasMap.get(ExtrasKvp.CALIB_KEY);\n\n\t\t// Some wholebody images have height > width. Typically 1024x512.\n\t\t// Crocodile eats the biggest.\n\t\tshort height = getHeight();\n\t\tshort width = getWidth();\n\t\tshort dim = height > width ? height : width;\n\n\t\tif (dim > 0 && calString != null) {\n\n\t\t\ttry {\n\n\t\t\t\tfloat cal = Float.parseFloat(calString);\n\n\t\t\t\t// Now calculate the pixel size\n\t\t\t\tpixelSize = (1024 * cal) / (dim * zoom);\n\n\t\t\t} catch (NumberFormatException e) {\n\n\t\t\t\tlogger.log(\"Unable to parse calibration factor\");\n\t\t\t\tpixelSize = getRoughPixelSize();\n\n\t\t\t}\n\t\t} else {\n\t\t\tpixelSize = getRoughPixelSize();\n\t\t}\n\n\t\treturn pixelSize;\n\n\t}", "@Override\n protected float getDownScaleFactor() {\n return (float) 5.0;\n }", "public float getUtilityMeasure() {\n return utilityMeasure;\n }", "public abstract double getMeasure();", "public float getEqualizationScale() {\n return Gdx.graphics.getWidth() / WE.getCurrentConfig().getRenderResolutionWidth();\n }", "private double normaliseViewingTime() {\n return this.averageViewingTime / (double) this.content.getViewLength();\n }", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "short getFitHeight();", "public void setDimensionRatio(java.lang.String r9) {\n /*\n r8 = this;\n r0 = 0;\n if (r9 == 0) goto L_0x008e;\n L_0x0003:\n r1 = r9.length();\n if (r1 != 0) goto L_0x000b;\n L_0x0009:\n goto L_0x008e;\n L_0x000b:\n r1 = -1;\n r2 = r9.length();\n r3 = 44;\n r3 = r9.indexOf(r3);\n r4 = 0;\n r5 = 1;\n if (r3 <= 0) goto L_0x0037;\n L_0x001a:\n r6 = r2 + -1;\n if (r3 >= r6) goto L_0x0037;\n L_0x001e:\n r6 = r9.substring(r4, r3);\n r7 = \"W\";\n r7 = r6.equalsIgnoreCase(r7);\n if (r7 == 0) goto L_0x002c;\n L_0x002a:\n r1 = 0;\n goto L_0x0035;\n L_0x002c:\n r4 = \"H\";\n r4 = r6.equalsIgnoreCase(r4);\n if (r4 == 0) goto L_0x0035;\n L_0x0034:\n r1 = 1;\n L_0x0035:\n r4 = r3 + 1;\n L_0x0037:\n r3 = 58;\n r3 = r9.indexOf(r3);\n if (r3 < 0) goto L_0x0075;\n L_0x003f:\n r2 = r2 - r5;\n if (r3 >= r2) goto L_0x0075;\n L_0x0042:\n r2 = r9.substring(r4, r3);\n r3 = r3 + r5;\n r9 = r9.substring(r3);\n r3 = r2.length();\n if (r3 <= 0) goto L_0x0084;\n L_0x0051:\n r3 = r9.length();\n if (r3 <= 0) goto L_0x0084;\n L_0x0057:\n r2 = java.lang.Float.parseFloat(r2);\t Catch:{ NumberFormatException -> 0x0084 }\n r9 = java.lang.Float.parseFloat(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n r3 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1));\n if (r3 <= 0) goto L_0x0084;\n L_0x0063:\n r3 = (r9 > r0 ? 1 : (r9 == r0 ? 0 : -1));\n if (r3 <= 0) goto L_0x0084;\n L_0x0067:\n if (r1 != r5) goto L_0x006f;\n L_0x0069:\n r9 = r9 / r2;\n r9 = java.lang.Math.abs(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x006f:\n r2 = r2 / r9;\n r9 = java.lang.Math.abs(r2);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x0075:\n r9 = r9.substring(r4);\n r2 = r9.length();\n if (r2 <= 0) goto L_0x0084;\n L_0x007f:\n r9 = java.lang.Float.parseFloat(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x0084:\n r9 = 0;\n L_0x0085:\n r0 = (r9 > r0 ? 1 : (r9 == r0 ? 0 : -1));\n if (r0 <= 0) goto L_0x008d;\n L_0x0089:\n r8.mDimensionRatio = r9;\n r8.mDimensionRatioSide = r1;\n L_0x008d:\n return;\n L_0x008e:\n r8.mDimensionRatio = r0;\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.solver.widgets.ConstraintWidget.setDimensionRatio(java.lang.String):void\");\n }", "protected double pixelOneSampleF() {\r\n\t\treturn ((double) getGraphWidth()) / section.getLength();\r\n\t}", "public int getLocalSize();", "private void m91741a(View view) {\n ViewGroup.LayoutParams layoutParams = view.getLayoutParams();\n if (layoutParams != null && layoutParams.width > 0 && layoutParams.height > 0) {\n this.f73957q = layoutParams.width;\n this.f73958r = layoutParams.height;\n } else if (view.getMeasuredWidth() <= 0 || view.getMeasuredHeight() <= 0) {\n view.post(new C28183k(this));\n } else {\n this.f73957q = view.getMeasuredWidth();\n this.f73958r = view.getMeasuredHeight();\n }\n }", "public static int elementSize_infos_noise() {\n return (16 / 8);\n }", "abstract public int getMinWidth();", "int fixedSize();", "private double generateEngineSize(String model) {\n\t\tif (model.equals(\"compact\")) {\n\t\t\treturn (double) Math.round((90 + (150 - 90) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t} else if (model.equals(\"intermediate\")) {\n\t\t\treturn (double) Math.round((150 + (250 - 150) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t} else {\n\t\t\treturn (double) Math.round((250 + (400 - 250) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t}\n\t}", "int getLocalSize();", "static void logViewTooSmall(boolean isViewTooSmall) {\n RecordHistogram.recordBooleanHistogram(\n \"Search.ContextualSearch.SuppressedViewTooSmall\", isViewTooSmall);\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "int getAreaSize();", "public static double getOrigWidth() {\n\t\treturn 0.7430000305175781;\n\t}", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetVerticalResolution();", "public static int size_estLength() {\n return (8 / 8);\n }", "int getGameFieldSize();", "public int getAdViewWidth() {\n return (tozAdViewWidth);\n }", "@Override\r\n\tpublic int unitsToWagger() {\n\t\treturn 0;\r\n\t}", "public double angularSize() {\n return celestialAngularSize;\n }", "private void calculateBasicRatio() {\n if (mLastZoomRatio == DEFAULT_VALUE) {\n if(isAngleCamera()){\n mBasicZoomRatio = 1.6f;\n }else{\n mBasicZoomRatio = ZOOM_UNSUPPORTED_DEFAULT_VALUE;\n }\n } else {\n mBasicZoomRatio = mLastZoomRatio;\n }\n //modify by bv liangchangwei for fixbug 3518\n }", "public native float kbGetMapZSize();", "BigInteger getResolution();", "@Override\n public long estimateSize(){\n return ((long)upTo)-from+last;\n }", "float getFixedHotwordGain();", "public abstract int getExtraWidth(int specifiedWidth);", "private final Tuples<Integer, Integer> m137836a() {\n int i;\n int measuredWidth = getMeasuredWidth() / getChildCount();\n if (getChildCount() == 1 || LPFit.f99531a.mo120373a()) {\n i = getMeasuredHeight();\n } else {\n i = (int) (((float) measuredWidth) / VideoParams.f96577a.mo116006l());\n }\n return new Tuples<>(Integer.valueOf(measuredWidth), Integer.valueOf(i));\n }" ]
[ "0.6416813", "0.6400795", "0.63243973", "0.626658", "0.6165132", "0.6021496", "0.59842974", "0.59447414", "0.5915194", "0.5887245", "0.58352846", "0.5761608", "0.57067263", "0.5704741", "0.5690647", "0.5655533", "0.5631706", "0.5618015", "0.5599737", "0.55877364", "0.5570205", "0.5541092", "0.553619", "0.5527816", "0.5526845", "0.5520106", "0.551797", "0.5516908", "0.5514379", "0.5472258", "0.54652095", "0.5464492", "0.5458581", "0.54249907", "0.5414937", "0.5413326", "0.5408702", "0.5405321", "0.539716", "0.539716", "0.53935623", "0.53790534", "0.5370901", "0.53705806", "0.53654516", "0.5360965", "0.5359548", "0.53469294", "0.5337257", "0.5333125", "0.5324518", "0.5319513", "0.53169066", "0.53112286", "0.5311126", "0.52958137", "0.52952254", "0.52910155", "0.5287488", "0.5286119", "0.5285574", "0.52851725", "0.5283283", "0.52822965", "0.5276278", "0.52717954", "0.5270719", "0.52633667", "0.52522254", "0.5248446", "0.52471787", "0.5240188", "0.52374613", "0.5234301", "0.52331805", "0.5230125", "0.5223477", "0.52232665", "0.5217203", "0.52146465", "0.52106917", "0.5203078", "0.5196578", "0.5196096", "0.51932985", "0.51822835", "0.51813257", "0.5176501", "0.516252", "0.5161881", "0.51613533", "0.5156088", "0.5149653", "0.51491606", "0.5148491", "0.5147701", "0.5144226", "0.51403046", "0.5126151", "0.51251316" ]
0.6068933
5
Return a short integer value represented by the key argument (a neardefinitive list is given in the dictionary class).
public short getShort(short dictionaryKey) { return shortsMap.get(dictionaryKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short getShort(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (short)((Long)value).intValue() : 0);\n }", "public short getShort(String key)\n {\n return getShort(key, (short) 0);\n }", "public short s(String key) throws AgentBuilderRuntimeException {\n\t\treturn getShort(key).shortValue();\n\t}", "public Short getShort(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Short) extGet(key);\n\t}", "public Short S(String key) throws AgentBuilderRuntimeException {\n\t\treturn getShort(key);\n\t}", "int processFirstShort(int index) {\n\t\t// process the first Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index);\n\t}", "public int getInteger(short dictionaryKey) {\n\t\treturn intsMap.get(dictionaryKey);\n\t}", "public short getShort(String key, short fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getShort(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Short.parseShort(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "int processFourthShortForShort(int index, int keyLength) {\n\t\t// process the fourth Short integer in the Key Entry Set\n\t\tif(keyLength == 1) {\n\t\t\t// SET KeyValueOffset = GeoKeyDirectory + GeoKeyOffset + 6\n\t\t\treturn (int) keyEntrySet.get(index+3);\n\t\t} else {\n\t\t\t// SET KeyValueOffset = GeoKeyDirectory + (KeyValueOffset * 2)\n\t\t\treturn (int) keyEntrySet.get(keyLength);\n\t\t}\n\t}", "public int get(int key) {\n return 1;\n }", "int getInt(String key);", "Short getValue();", "int getInt( String key, int def);", "public short key();", "private String getShortType(String aKey) {\n if (iConnection == null){\n return ModificationConversion.getShortType(aKey);\n } else {\n return ModificationConversion.getShortType(aKey,iConnection);\n }\n }", "int processSecondShort(int index) {\n\t\t// process the second Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index + 1);\n\t}", "short getKeyIx();", "String get(Integer key);", "int getKey();", "int getKey();", "String getShortNameKey();", "public static byte getA(final short key)\n {\n return (byte) ((key >> SHIFT) & BITS);\n }", "int processThirdShort(int index) {\n\t\t// process the third Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index + 2);\n\t}", "public static int encodeAsInt(short high, short low) {\n\n // Store the first short value in the highest 16 bits of the int\n int key = high | 0x00000000;\n key <<= 16;\n\n // Store the second short value in the lowest 16 bits of the int\n int lowInt = low & 0x0000FFFF;\n key |= lowInt;\n\n return key;\n\n }", "public short get_short() {\n return local_short;\n }", "public short getShort(int pos) {\n return Tuples.toShort(getObject(pos));\n }", "public Integer getInt(K key) throws ClassCastException;", "public short getShortA() {\n\t\tint i = (payload.get() & 0xFF) << 8 | payload.get() - 128 & 0xFF;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public short getShort(int index)\r\n/* 328: */ {\r\n/* 329:342 */ ensureAccessible();\r\n/* 330:343 */ return _getShort(index);\r\n/* 331: */ }", "public short getShort(String name) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).shortValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Short.parseShort((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but found: \" + val);\n\t\t}\n\t}", "public Short _parseShort(JsonParser jVar, DeserializationContext gVar) throws IOException {\n JsonToken l = jVar.mo29328l();\n if (l == JsonToken.VALUE_NUMBER_INT) {\n return Short.valueOf(jVar.mo29336B());\n }\n if (l == JsonToken.VALUE_STRING) {\n String trim = jVar.mo29334t().trim();\n if (trim.length() == 0) {\n return (Short) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Short) _coerceTextualNull(gVar, this._primitive);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n int a = NumberInput.m23779a(trim);\n if (_shortOverflow(a)) {\n return (Short) gVar.mo31517b(this._valueClass, trim, \"overflow, value cannot be represented as 16-bit value\", new Object[0]);\n }\n return Short.valueOf((short) a);\n } catch (IllegalArgumentException unused) {\n return (Short) gVar.mo31517b(this._valueClass, trim, \"not a valid Short value\", new Object[0]);\n }\n } else if (l == JsonToken.VALUE_NUMBER_FLOAT) {\n if (!gVar.mo31509a(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) {\n _failDoubleToIntCoercion(jVar, gVar, \"Short\");\n }\n return Short.valueOf(jVar.mo29336B());\n } else if (l == JsonToken.VALUE_NULL) {\n return (Short) _coerceNullToken(gVar, this._primitive);\n } else {\n if (l == JsonToken.START_ARRAY) {\n return (Short) _deserializeFromArray(jVar, gVar);\n }\n return (Short) gVar.mo31493a(this._valueClass, jVar);\n }\n }", "public List<Short> getShortList(final String key) {\n return getShortList(key, new ArrayList<>());\n }", "public String getMinKey() {\n if (list.isEmpty()) {\n return \"\";\n }\n return v.get(list.getLast()).iterator().next();\n }", "short decodeShort();", "public String getMinKey();", "public short toShort() {\n return this.toShortArray()[0];\n }", "public List<Short> getShortList(final String key, final List<Short> defaultValue) {\n return getList(Short.class, key, defaultValue);\n }", "private static String shortKey(PublicKey publicKey) {\n return publicKey.toString().substring(publicKey.toString().length() - 4);\n }", "private int getShort() {\n shortBuffer.rewind();\n archive.read(shortBuffer);\n shortBuffer.flip();\n return (int) shortBuffer.getShort();\n }", "public short getLEShortA() {\n\t\tint i = payload.get() - 128 & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public int getInt(String key)\n {\n return getInt(key, 0);\n }", "public short toShort()\n\t{\n\t\treturn (short)this.ordinal();\n\t}", "public short getLEShort() {\n\t\tint i = payload.get() & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public String get(int key){\n\t\treturn(hashMap[key]);\t\t\n\t}", "private int getValue(final String name, final String key) {\n\t\treturn Integer.parseInt(bundleConstants.getString(name + SEPERATOR + key));\n\t}", "public short[] getShortArray(final String key) {\n return getShortArray(key, ArrayUtils.EMPTY_SHORT_ARRAY);\n }", "public int getInt(String key) {\n return Integer.parseInt(mMap.get(key));\n }", "private String getShortInstruction(int nextVal) {\n\t\toldvar = nextVal;\n\t\treturn Character.toString((char) nextVal);\n\t}", "public short getElement_entries_id(int index1) {\n return (short)getUIntElement(offsetBits_entries_id(index1), 8);\n }", "public Short getShortAttribute();", "public String getShort() {\n return m_short;\n }", "public short[] getShortArray(final String key, final short... defaultValue) {\n return get(short[].class, key, defaultValue);\n }", "public int getAsInt(String key) {\n return getAsInt(key, 0);\n }", "public short getValue() {\n return value;\n }", "public Integer getKey()\r\n {\r\n return key;\r\n }", "@NonNull\n public String toShortString() {\n return toShortString(new StringBuilder(32));\n }", "private final short get_SMALLINT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos())\n return dataBuffer_.getShort(columnDataPosition_[column - 1]);\n else\n return dataBuffer_.getShortLE(columnDataPosition_[column - 1]);\n// return SignedBinary.getShort(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }", "int getKey(int i);", "private int getIndex(int key) {\n\t\treturn key % MAX_LEN;\n\t}", "public int getPropertyInt(String key);", "@Test\n public void testShort() {\n assertEquals(\"32767\", hiveTypeToJson(new MyHiveType(new ShortWritable(Short.MAX_VALUE), shortTypeInfo)));\n }", "public Integer getInt(String key)\n\t{\n\t\tLong l = getLong(key);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.intValue();\n\t}", "public Object get(short key) {\n\t\tIterator iter = iterator();\n\t\tEntry e = null;\n\t\tfor (; iter.hasNext(); e=(Entry)iter.next())\n\t\t\tif (e.getKey()==key)\n\t\t\t\treturn e.getObject();\n\t\treturn null;\n\t}", "public String getMinKey() {\n if (map.size() == 0)\n return \"\";\n return minKey;\n }", "Object getKey();", "String key();", "short getDefaultKeyIx();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "public short getValue() {\n return value;\n }", "int getInfoOrThrow(\n int key);", "public String getShort() { \n\t\treturn getShortElement().getValue();\n\t}", "public abstract short read_short();", "private static int binarySearch0_BranchFreeUnrolledStatic16(int[] a, int key) {\n\t\tint low = 8;\n\t\tint midVal;\n\t\tint highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 4;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 8 & highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 2;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 4 & highMask;\n\n\t\tmidVal = a[low];\n\t\tlow += 1;\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 2 & highMask;\n\n\t\tmidVal = a[low];\n\t\thighMask = (int) (((long) key - midVal) >> 63);\n\t\tlow -= 1 & highMask;\n\n\t\treturn a[low] == key ? low : -(low + 1);\n\n\t}", "public final short m2264b(int i) {\n JsonValue c = m2254c(i);\n if (c != null) {\n return c.m2272g();\n }\n throw new IllegalArgumentException(\"Indexed value not found: \" + this.f2956e);\n }", "private long packValues(int key, int next) {\n return ((long)next << 32) | ((long)key & 0xFFFFFFFFL);\n }", "int getInt(String key) throws KeyValueStoreException;", "public short getShortLE(int index)\r\n/* 339: */ {\r\n/* 340:353 */ ensureAccessible();\r\n/* 341:354 */ return _getShortLE(index);\r\n/* 342: */ }", "public String getLowestChromKey();", "public String getShortId() {\n\t\treturn shortId;\n\t}", "@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\n }", "public short getShort(String name, short defaultValue) {\n\t\tObject val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).shortValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Short.parseShort((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but found: \" + val);\n\t\t}\n\t}", "public Short getShort(final int index) {\n Object returnable = this.get(index);\n if (returnable == null) {\n return null;\n }\n if (returnable instanceof String) {\n /* A String can be used to construct a BigDecimal. */\n returnable = new BigDecimal((String) returnable);\n }\n return ((Number) returnable).shortValue();\n }", "public int get(int key) {\n int index = key % n;\n MapNode node = keys[index];\n for (int i =0; i < node.list.size(); ++i) {\n if (node.list.get(i) == key) {\n return vals[index].list.get(i);\n }\n }\n\n return -1;\n }", "protected short _getShort(int index)\r\n/* 334: */ {\r\n/* 335:348 */ return HeapByteBufUtil.getShort(this.array, index);\r\n/* 336: */ }", "int getInt(String key, int defaultValue);", "public abstract String toString_short();", "@Override\n public int getInt(String key) {\n return random.nextInt(RANDOM_INT_BOUND);\n }", "static Value<Short> parseShort(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Short.parseShort(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }" ]
[ "0.7643876", "0.75431347", "0.73137873", "0.71638393", "0.68915075", "0.6721509", "0.64996403", "0.64138657", "0.63541335", "0.63014764", "0.6298102", "0.62689215", "0.6092394", "0.60879314", "0.60304284", "0.60018414", "0.5982129", "0.589559", "0.5884417", "0.5884417", "0.57682204", "0.57002294", "0.56872046", "0.5644427", "0.5626454", "0.55933774", "0.55873895", "0.5569702", "0.55581194", "0.55530685", "0.55118793", "0.5504331", "0.5500808", "0.54786247", "0.546857", "0.5434897", "0.54297924", "0.54196215", "0.54070145", "0.539178", "0.538269", "0.5376333", "0.5375546", "0.5370648", "0.5368666", "0.53628916", "0.5356253", "0.53362715", "0.5333288", "0.5331293", "0.5327233", "0.5325964", "0.5324979", "0.53212744", "0.5320493", "0.52890116", "0.5287614", "0.52797693", "0.5273346", "0.52658916", "0.5264153", "0.52560854", "0.5233479", "0.52325994", "0.52281034", "0.52254087", "0.52251214", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52121145", "0.52077734", "0.520762", "0.5203923", "0.5201138", "0.5174988", "0.51623374", "0.516085", "0.5151563", "0.514391", "0.51364756", "0.51335716", "0.51203674", "0.5120324", "0.51202947", "0.5113138", "0.51084375", "0.5106674", "0.51066333", "0.51021194", "0.50975204" ]
0.72709584
3
Return a string value represented by the key argument (a neardefinitive list is given in the dictionary class).
public String getString(short dictionaryKey) { return stringsMap.get(dictionaryKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getString(String key);", "String getString(String key);", "private String getString(String key) {\n return key;\r\n }", "public String getString(String key) {\r\n String value = (String) keyvaluepairs.get(key.toLowerCase());\r\n return value == null ? \"\" : value;\r\n }", "public String getAsString(String key) {\n return entries.getProperty(key);\n }", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "private String keyAsString(Map map, String key) {\n Object value = map.get(key);\n return (value != null) ? value.toString() : null;\n }", "public String get(int key){\n\t\treturn(hashMap[key]);\t\t\n\t}", "String getString( String key, String def);", "String get(Integer key);", "@Override\n public String toString() {\n return String.valueOf(key);\n }", "public String getString(Keys key) {\n\t\treturn getString(key, null);\n\t}", "public String format(String key) {\r\n return getString(key);\r\n }", "public String getString(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (String) extGet(key);\n\t}", "public String get(String key) {\n return this.map.get(key);\n }", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "public String getString(String key)\n {\n return getString(key, null);\n }", "public String getString(String key) {\n Object value = get(key);\n return ((value instanceof String) ? (String)value : \"\");\n }", "public String getDicValue(String key)\n {\n String lang_code;\n if(key.indexOf(\"_\")==2)\n {\n lang_code = key.substring(0,2);\n key = key.substring(3,key.length());\n }\n else\n {\n return null;\n }\n return getTranslation(lang_code,key);\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn key + \"\";\r\n\t}", "public String get(String key){\n\t\tListMapEntry temp = first;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\treturn temp.getValue();\n\t\t}\n\t}", "String getValue(Key key) {\n return this.parameters.get(key);\n }", "public String toString() {\r\n \treturn key;\r\n }", "public static String getString(String key) {\n\t\tif (rb == null)\n\t\t\treinit();\n\n\t\tif (rb.containsKey(key)) {\n\t\t\treturn rb.getString(key);\n\t\t} else {\n\t\t\tLOG.warning(String.format(PermMessages._loc_noval, key));\n\t\t\treturn no_value;\n\t\t}\n\t}", "public String str(String key) throws AgentBuilderRuntimeException {\n\t\treturn getString(key);\n\t}", "public String getString(String key) {\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\tsp = (String) getDefault(key);\n\t\t}\n\t\treturn sp;\n\t}", "String key();", "public String get(String key) {\n return mMap.get(key);\n }", "String getString(String key) throws KeyValueStoreException;", "protected String getNavArgStr(String key){\r\n if(mNavArgs != null && mNavArgs.containsKey(key)){\r\n return (String)mNavArgs.get(key);\r\n }\r\n return null;\r\n }", "final String get(String key) {\n return get(key,null);\n }", "private String getKey()\r\n\t\t{\r\n\t\t\tif (key != null)\r\n\t\t\t{\r\n\t\t\t\treturn key.toString();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn \"The key has not been found\";\r\n\t\t\t}\r\n\t\t}", "public static String s(String key) {\n\t\treturn RES.getString(key);\n\t}", "public String getIdAsString(String key) {\n Object obj = ids.get(key);\n if (obj == null) {\n return \"\";\n }\n return String.valueOf(obj);\n }", "String getValue(String type, String key);", "public String getString(String key, String defaultValue);", "public String getString(String key, String defaultValue);", "@Override\n public String getString(String key) {\n return getStringFromBundle(key, BASE_STRING) + \" \" + random.nextInt(RANDOM_INT_BOUND);\n }", "public String get(String key) {\n Node pos = find(key);\n if (pos == null) {\n return null;\n } else {\n return pos.pairStringString.getValue();\n }\n }", "public String getAsString(String key, String defaultVal) {\n return entries.getProperty(key, defaultVal);\n }", "public String Str(String key) throws AgentBuilderRuntimeException {\n\t\treturn getString(key);\n\t}", "public String get(String key) {\n return this._map.get(key);\n }", "public String getValue(final String key)\r\n {\r\n m_keys.addElement(key);\r\n return m_value;\r\n }", "public String getKey()\r\n {\r\n return getValue().toString();\r\n }", "String getString(String key, String defaultValue);", "String getString(String key, String defaultValue);", "@Override\n public String toString() {\n return key;\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn keyConverter.apply(key) + KEY_VALUE_SEPARATOR_CHAR + ' ' + value;\n\t\t}", "public String lookup(String key){\n Node N;\n N = findKey(root, key);\n return ( N == null ? null : N.item.value );\n }", "@Override\n public String toString(){\n return key;\n }", "Object getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "public static String getValue(HashMap<Integer, String> students, int key) {\n\t\tString val = students.get(key);\n\t\treturn val;\n\t}", "String getKey(int index);", "public static String getValueForKey(HashMap<Integer, String> students, int key) {\n\t\treturn students.getOrDefault(key, \"Key has not Mapped\");\n\t}", "public String get(String key) {\n return getData().get(key);\n }", "public String getString(String key) {\n return (String) commandData.get(key);\n }", "public String getString(String key)\r\n {\r\n debug(\"getString(\" + key + \") - retrieving Key...\");\r\n String value = null;\r\n try\r\n {\r\n value = getResourceBundle().getString(key);\r\n }\r\n catch (MissingResourceException e)\r\n {\r\n System.out.println(\"java.util.MissingResourceException: \" + \"Couldn't find value for: \" + key);\r\n }\r\n if (value == null)\r\n {\r\n value = \"Could not find resource: \" + key + \" \";\r\n }\r\n debug(\"getString(\" + key + \") - value ==> \" + value);\r\n debug(\"getString(\" + key + \") - retrieving Key...Done\");\r\n return value;\r\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn this.key;\r\n\t}", "public String getValue(String keyName)\n {\n if (keyName == null || keyName.trim().length() == 0)\n throw new IllegalArgumentException(\"keyName may not be null or empty\");\n\n String keyValue = null;\n\n for (int i=0; i < m_keyNames.size(); i++)\n {\n if (((String)m_keyNames.get(i)).equals(keyName))\n {\n keyValue = (String)m_keyValues.get(i);\n break;\n }\n }\n\n return keyValue;\n }", "public static String getString(final String key, final Object... arguments) {\n\t\treturn MessageFormat.format(getString(key), arguments);\n\t}", "public String get(String key) {\n String lowerCaseKey = validateAndGetLowerCaseKey(key);\n\n if(map.containsKey(lowerCaseKey)) {\n return map.get(lowerCaseKey);\n }\n\n return Strings.EMPTY;\n }", "abstract public String getKey();", "public String getString(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.STRING)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), String.class);\n\t\treturn (String)value.value;\n\t}", "public String getString(String key) {\n return mPref.getString(key, null);\n }", "public String getKey(DLabel key) {\n return key.getKey();\n }", "public String get (String key) {\r\n // String gets hashed to become hashed key, which is the index to find the linked list\r\n int arrIndex = hash(key);\r\n\r\n if (hashTableArray[arrIndex] == null) {\r\n hashTableArray[arrIndex] = new LinkedList<>();\r\n }\r\n for (int i = 0; i < hashTableArray[arrIndex].size(); i++) {\r\n // if at i the key in the hashtable is the same as the key that is supplied, return the value\r\n if (hashTableArray[arrIndex].get(i).key.equals(key)){\r\n return hashTableArray[arrIndex].get(i).value;\r\n }\r\n }\r\n return null;\r\n }", "public java.lang.String getKey() {\n java.lang.Object ref = key_;\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 key_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String get (String key)\n {\n // if this string is tainted, we don't translate it, instead we\n // simply remove the taint character and return it to the caller\n if (key.startsWith(TAINT_CHAR)) {\n return key.substring(1);\n }\n \n String msg = getResourceString(key);\n return (msg != null) ? msg : key;\n }", "private final static String getKey( Integer id ) {\n\t\treturn \"\" + id ;\n\t}", "@Override\n public String toString() {\n return key + \"=\" + value;\n }", "public static String getKey(){\n\t\treturn key;\n\t}", "public String getDPTag(String key)\r\n {\n return tagHash.get(key).toString();\r\n }", "public String toString() {\r\n\t\treturn \"(\" + key + \",\" + value + \")\";\r\n\t}", "public static String getKeyValue(String key, String value) {\n return key + Locale.getConstants().keyValueSeparator() + value;\n }", "public String toString() {\n return key + \"=\" + value;\n }", "public java.lang.String getKey() {\n java.lang.Object ref = key_;\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 key_ = s;\n return s;\n }\n }", "public String lookup(String key){\n Node N = front;\n while( N != null){\n if( N.key.equals(key)){\n return N.value;\n }\n N = N.next;\n }\n return null;\n }", "public String getValue(String key) {\n\t\tfinal Iterator<Map.Entry<String, String>> iter = entries.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tfinal Map.Entry<String, String> entry = iter.next();\n\t\t\tif (entry.getKey().equals(key)) {\n\t\t\t\treturn entry.getValue();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "protected String keyToString(Object rawKey)\n {\n if (rawKey instanceof String) {\n return (String) rawKey;\n }\n return String.valueOf(rawKey);\n }" ]
[ "0.714939", "0.71236974", "0.7094003", "0.70311224", "0.70273757", "0.67449766", "0.67449766", "0.67449766", "0.67449766", "0.67449766", "0.67449766", "0.67341983", "0.66721964", "0.65549606", "0.654048", "0.6448919", "0.64374095", "0.6343176", "0.6340031", "0.6331212", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.63219696", "0.6295831", "0.62953895", "0.6293853", "0.62648785", "0.6229493", "0.62267035", "0.6209886", "0.61735743", "0.61714184", "0.6160944", "0.6112887", "0.61109024", "0.6108433", "0.6079933", "0.6077806", "0.606571", "0.60634387", "0.6062682", "0.605573", "0.6048534", "0.6048534", "0.60437673", "0.6043577", "0.60336155", "0.6032643", "0.60322016", "0.59965056", "0.59888166", "0.59847534", "0.59847534", "0.5982022", "0.5980266", "0.5958572", "0.5949619", "0.59406006", "0.59291106", "0.59291106", "0.59291106", "0.59291106", "0.5913339", "0.5901428", "0.58927965", "0.58907586", "0.5888924", "0.587563", "0.58415776", "0.58140093", "0.58139074", "0.58062255", "0.58048034", "0.5803637", "0.5784746", "0.5781859", "0.5781182", "0.5779149", "0.5757562", "0.5757001", "0.5749839", "0.57324725", "0.5719301", "0.5718331", "0.57152385", "0.57120293", "0.57119673", "0.57093024", "0.569925", "0.56898165" ]
0.64309895
17
Get the image width in pixel units
public short getWidth() { return getShort(ADACDictionary.X_DIMENSIONS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getImageWidth()\n {\n \n int retVal = getImageWidth_0(nativeObj);\n \n return retVal;\n }", "public int width() {\n return picture.width();\n }", "public int width() {\n return picture().width();\n }", "public int getImageWidth()\n\t{\n\t\treturn imgWidth;\n\t}", "public int getImageWidth() {\n\t\treturn imgWidth;\n\t}", "public int width() \n {\n return this.picture.width();\n }", "public int getImageWidth() {\n\treturn width;\n }", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int imWidth() {\n\t\treturn image.getWidth(this);\n\t}", "public int getWidth() {\n return (int) Math.round(width);\n }", "public native int getWidth() throws MagickException;", "public double getWidth();", "public double getWidth();", "public int getPicWidth() {\r\n\t\treturn this.image.getIconWidth();\r\n\t}", "public int getUnscaledWidth() {\n\t\tif(displayImage == null) return 0;\n\t\treturn displayImage.getWidth();\n\t}", "public int getWidth() {\n return fullPhoto.getWidth();\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth () {\r\n\tcheckWidget();\r\n\tint [] args = {OS.Pt_ARG_WIDTH, 0, 0};\r\n\tOS.PtGetResources (handle, args.length / 3, args);\r\n\treturn args [1];\r\n}", "double getWidth();", "double getWidth();", "public double getWidth() {\n\t\t\treturn width.get();\n\t\t}", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public float getWidth();", "public double getWidth () {\n return width;\n }", "long getWidth();", "public double getWidth()\r\n {\r\n return width;\r\n }", "public double getWidthInInches()\n {\n return width;\n }", "public final int getWidth() {\r\n return (int) size.x();\r\n }", "final public double getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth() {\n return width_;\n }", "public double getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn WIDTH;\r\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public Integer getWidth() {\n\t\t\treturn width;\n\t\t}", "public final int getWidth() {\r\n return width;\r\n }", "public double getWidth()\n {\n return width;\n }", "public double getWidth() {\r\n return width;\r\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public Integer getWidth()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.width, null);\n }", "public Number getWidth() {\n\t\treturn getAttribute(WIDTH_TAG);\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public float getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidthNumOfBytes() {\n return widthNumOfBytes;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth()\n\t{\n\t\treturn this._width;\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public final int getWidth(){\n return width_;\n }", "public int getWidth() {\n\t\t\treturn width;\n\t\t}", "public float getWidth() {\n\t\treturn width;\n\t}", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();" ]
[ "0.83086115", "0.81582546", "0.8124796", "0.80715686", "0.80128306", "0.79627264", "0.79148567", "0.78612614", "0.7839352", "0.78162664", "0.77475625", "0.76303965", "0.76303965", "0.7568808", "0.75677705", "0.7548566", "0.7547709", "0.7547709", "0.75473964", "0.7533294", "0.7533294", "0.75292534", "0.751737", "0.751737", "0.751737", "0.7503492", "0.7503492", "0.749415", "0.7490945", "0.74877477", "0.74861693", "0.7486124", "0.7483672", "0.7483624", "0.74823016", "0.7478782", "0.7472967", "0.74627566", "0.7462569", "0.7451964", "0.7451666", "0.74487185", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439642", "0.7439505", "0.7439505", "0.7439505", "0.74377614", "0.74377614", "0.74377614", "0.74376", "0.7435428", "0.7433093", "0.74330825", "0.74304014", "0.74304014", "0.74255675", "0.7424053", "0.7417035", "0.74155134", "0.7414095", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.7412604", "0.741127", "0.74064124", "0.74050856", "0.7396314", "0.739288", "0.73923033", "0.73923033", "0.73923033", "0.73876107", "0.73876107", "0.73876107", "0.73876107", "0.73876107", "0.73876107", "0.73876107" ]
0.75029194
27
Get the ZDimension. This is usually the number of frames of a dynamic data set.
public short getZDim() { return getShort(ADACDictionary.Z_DIMENSIONS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getDimZ() {\r\n return dimZ;\r\n }", "public final int getDimension() {\r\n\t\treturn this.dimension;\r\n\t}", "public int getDimension() {\n\t\treturn dimension;\n\t}", "public int getZSize() {\n\t\treturn (highPoint.getBlockZ() - lowPoint.getBlockZ()) + 1;\n\t}", "public byte getDimension() {\n return this.dimension;\n }", "public byte getDimension() {\n return this.dimension;\n }", "public int dimensions() {\n\t\treturn dim;\n\t}", "public int dimensionCount() {\n\t\treturn point.length;\n\t}", "public final int dimension() { return _N; }", "public int getDimension() {\n \treturn dim;\n }", "public int dimensions() {\n return this.data[0].length;\n }", "public int getZ()\n {\n return zaxis;\n }", "public Dimension3d getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn point3D.size();\r\n\t}", "public static int DimNum() {\n\t\treturn root_map.size();\n\t}", "BigInteger getDimension();", "public int getwDimension()\n {\n return wDimension;\n }", "Double getZLength();", "int getCurrentDimension() {\n if (!playerExists())\n return lastdim;\n return game.h.m;\n }", "double getZLength();", "public int dimension() {\n return N; // Return Board instance variable for dimension size\n }", "public int getZ() {\n\t\treturn z;\n\t}", "public int getCoordinateDimension() { \n return getPosition().getCoordinateDimension();\n }", "public Vector3f getDimensions();", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "public int getDimX() {\r\n return dimX;\r\n }", "int dim() {\r\n\t\treturn dimt * dimx * dimy;\r\n\t}", "int getDimensionsCount();", "public long getSize() {\n\t\treturn Math.abs(getXSize() * getYSize() * getZSize());\n\t}", "Dimension getDimensions();", "public int dimension() // board dimension n\n {\n return dim;\n }", "public DynamicCuboid setSizeZ(float z) {\n this.sizeZ = z;\n return this;\n }", "public int getDimension() {\n return 0;\n }", "int getDimX(){\n\t\treturn dimx;\n\t}", "public default int getDimension() {\n\t\treturn 1;\n\t}", "public int getZ() {\n return Z;\n }", "Dimension getDimension();", "public final String dimension() {\n\t\tStringBuffer b = new StringBuffer(16);\n\t\tthis.editDimension(b);\n\t\treturn(b.toString());\n\t}", "public String getDimension()\r\n/* 277: */ {\r\n/* 278:341 */ return this.dimension;\r\n/* 279: */ }", "@Override\n\tpublic D3int getDim() {\n\t\treturn myDim;\n\t}", "public int getXD3 ()\n\t{\n\t\treturn xDimension3;\n\t}", "public int getDimX ()\n {\n return m_dim_x;\n }", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "public int getZ() {\n\t\treturn -150;\n\t}", "public int getZ() {\r\n return z;\r\n }", "public int getZ() {\n return z;\n }", "public static int numDimensions_data() {\n return 1;\n }", "public int[] getDims() {\n int[] dimsTuple = { this.xDimension, this.yDimension };\n return dimsTuple;\n }", "public int featureDimension() {\n assert featureDimension > 0;\n return featureDimension;\n }", "public double getZFactor() {\r\n\t\treturn z_factor;\r\n\t}", "public double getZ() {\n return position.getZ();\n }", "public int domainDimension() {\n return dvModel.totalParamSize();\r\n }", "public List<Integer> getDimensionList() \n {\n return this.dimList;\n }", "public int dimension(){\n return blocks.length;\n }", "public abstract int getDimension();", "public float getZ() {\n return z_;\n }", "public int getYD3 ()\n\t{\n\t\treturn yDimension3;\n\t}", "public double getZ() {\n\t\treturn z;\n\t}", "public double getZ() {\n\t\treturn z;\n\t}", "int dim(){\n\t\treturn dimx*dimy;\n\t}", "public int getXMax(){\n\t\treturn xDim;\n\t}", "public DynamicModelPart setSizeZ(int[] sizeZ) {\n this.sizeZ = sizeZ;\n return this;\n }", "public float getZ() {\n return z_;\n }", "public int nDimension() {\n return TH.THTensor_(nDimension)(this);\n }", "public int getZwid() {\n return zwid;\n }", "public float getZ() {\r\n return z;\r\n }", "public int geomDim();", "public int getSizeZ() throws ImageException {\r\n\tif (!bValid){\r\n\t\tthrow new ImageException(\"image not valid\");\r\n\t}\t\r\n\treturn sizeZ;\r\n}", "public int getNumberOfImages() {\n\n\t\tshort zdim = getZDim();\n\t\tzdim = zdim > 0 ? zdim : 1;\n\n\t\tshort slices = getNumberOfSlices();\n\t\tslices = slices > 0 ? slices : 1;\n\n\t\tshort intervals = getNumberOfGatedIntervals();\n\t\tintervals = intervals > 0 ? intervals : 1;\n\n\t\treturn zdim * slices * intervals;\n\n\t}", "public native Dimension getDimension() throws MagickException;", "public int getDimY() {\r\n return dimY;\r\n }", "public double len() {\n \t\treturn Math.sqrt((double)x*x + (double)y*y + (double)z*z);\n \t}", "public final double getZ() {\n return z;\n }", "public DynamicCuboid setSize(float x, float y, float z) {\n return this.setSizeX(x).setSizeY(y).setSizeZ(z);\n }", "public Dimension getDimension() {\n return levelRunning.getDimension();\n }", "public native float kbGetMapZSize();", "public double getZ() {\r\n\t\treturn z;\t\r\n\t\t}", "public int getZ() {\n return Z;\n }", "public short getWidth() {\n\n\t\treturn getShort(ADACDictionary.X_DIMENSIONS);\n\t}", "public double getZ() {\r\n return z;\r\n }", "int getDimY(){\n\t\treturn dimy;\n\t}", "public double getZ(){\n\t\treturn z;\n\t}", "public Dimension getDimensionPack() {\n return dimensionPacker.getFilledArea();\n }", "public DimensionInformation getDimensionInformation() {\n return dimensionInformation;\n }", "public static int getTileSize(){\n\t\treturn tileDim;\n\t}", "public int getzPos() {\n return zPos;\n }", "public Map<Integer, Integer> getDimension() throws SQLException {\n return retrieveExpected(createNativeDimensionSQL(), INTEGER);\n }", "public float getZ()\n {\n return fz;\n }", "public int getDepth() {\n if (isLiveOrCompiled())\n if(!this.getCapability(ImageComponent.ALLOW_SIZE_READ))\n throw new CapabilityNotSetException(J3dI18N.getString(\"ImageComponent3D0\"));\n return ((ImageComponent3DRetained)this.retained).getDepth();\n }", "Dimension dimension();", "public int get_feature_dimension() {\n\t\treturn nFeatures;\n\t}", "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public double getZ() {\n\t\treturn point[2];\n\t}", "@Override\n\tpublic int size() {\n\t\treturn this.nDims;\n\t}", "public int getGridDimensions() {\n return GRID_DIMENSIONS;\n }", "public double getDeltaZ() {\n return deltaZ;\n }", "public double getDeltaZ() {\n return deltaZ;\n }", "Dimension getSize();", "Dimension getSize();", "int numberOfDimensions();" ]
[ "0.8306666", "0.70181817", "0.6983799", "0.6920066", "0.6884697", "0.6884697", "0.6884337", "0.68624884", "0.68480104", "0.66640306", "0.66573", "0.66212547", "0.66034514", "0.6600271", "0.65925384", "0.6577038", "0.6576519", "0.6566562", "0.65630466", "0.6553414", "0.65413845", "0.6538173", "0.6530743", "0.6405073", "0.6397437", "0.63879895", "0.6381768", "0.6377273", "0.6375748", "0.63551617", "0.63283247", "0.63237727", "0.63071424", "0.63012713", "0.62971586", "0.6286451", "0.6279492", "0.6267738", "0.6259667", "0.6234438", "0.623167", "0.6223177", "0.6200647", "0.6196947", "0.619497", "0.6187641", "0.6164005", "0.61542267", "0.6139523", "0.61372876", "0.6123255", "0.6121808", "0.60963774", "0.6092639", "0.6091548", "0.60915107", "0.6071078", "0.60687846", "0.60687846", "0.6068587", "0.6068149", "0.6060898", "0.6054704", "0.6046349", "0.6044508", "0.6041383", "0.60308695", "0.60007244", "0.59882396", "0.5978368", "0.5977611", "0.5972598", "0.59716785", "0.59689766", "0.5967096", "0.5958929", "0.59579366", "0.5951752", "0.59448475", "0.59278387", "0.5920933", "0.5907614", "0.5892829", "0.5889376", "0.5884283", "0.58741754", "0.5873591", "0.5863167", "0.585413", "0.5844314", "0.5840732", "0.58387244", "0.58327115", "0.58315086", "0.5830693", "0.5827775", "0.5827775", "0.58122724", "0.58122724", "0.5809845" ]
0.8432139
0
Gated data types will often require a 4D presentation.
public boolean isGated() { if (isGated == null) { String AD_Type = getString(ADACDictionary.DATA_TYPE); if (AD_Type != null && AD_Type.startsWith("G")) { // GE - Gated ECT // GP - Gated planar (although these usually just get given DP) isGated = true; } else { isGated = false; } } return isGated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic float[] getDemision() {\n\t\tfloat[] d = {x.getValue(),y.getValue(),width.getValue(),height.getValue()};\n\t\treturn d;\n\t}", "private static final byte[] xfmt_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -94, 1, 0, 0, 0,\n\t\t\t\t0, -1, -1, -1, 28, 28, 28, -128, -128, -128, -64, -64, -64, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 1, 0, 44, 0, 0,\n\t\t\t\t0, 0, 16, 0, 16, 0, 0, 3, 62, 24, -70, -36, 59, 48, 74, -8,\n\t\t\t\t-118, -67, -40, 2, 53, 10, -8, 32, -40, 109, -63, 40, -100,\n\t\t\t\t-24, 57, 114, -98, 80, -92, -86, -57, 2, 48, -70, -106, 109,\n\t\t\t\t45, -36, -90, -50, -25, -75, 31, 96, 34, -111, -31, 50, 72, 82,\n\t\t\t\t32, -60, 4, 57, 58, 23, -62, 64, -71, 104, 54, 29, -40, 70, 2,\n\t\t\t\t0, 59 };\n\t\treturn data;\n\t}", "String FormatDataType(int dataType, int scale, int precision);", "@Override\r\n\tpublic vec4 get4(String ponits) {\n\t\treturn null;\r\n\t}", "public String mo42396b() {\n return this.f12824g;\n }", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public String getDataType() {\n\t\t\t\t\n\t\t//for contributed grid, need to find the units from the ESRIShapefile object\n\t\tfor (LayerPanel layerPanel : ((MapApp)map.getApp()).layerManager.getLayerPanels()) {\n\t\t\tif (layerPanel.layer instanceof ESRIShapefile && ((ESRIShapefile)layerPanel.layer).equals(this)) {\n\t\t\t\tESRIShapefile esf = (ESRIShapefile)(layerPanel.layer);\n\t\t\t\treturn esf.getGridDataType();\n\t\t\t}\n\t\t}\n\t\t\n\t\tString units = getUnits();\n\t\tif ( name.equals(GridDialog.GEOID) ) {\n\t\t\treturn \"Geoid Height\";\n\t\t}\n\t\telse if ( units.equals(\"m\") ){\n\t\t\treturn \"Elevation\";\n\t\t}else if ( units.equals(\"mgal\") ) {\n\t\t\treturn \"Gravity Anomaly\";\n\t\t}else if ( units.equals(\"percent\") ) {\n\t\t\treturn \"Percent\";\n\t\t}else if ( units.equals(\"mY\") ) {\n\t\t\treturn \"Age\";\n\t\t}else if ( units.equals(\"%\") ) {\n\t\t\treturn \"Percentage\";\n\t\t}else if ( units.equals(\"mm/a\") ) {\n\t\t\treturn \"Rate\";\n\t\t}\n\n\t\treturn \"\";\n\t}", "public static interface DataTypeWithRatioScale<T> {\r\n \r\n /**\r\n * Add\r\n *\r\n * @param augend\r\n * @param addend\r\n * @return\r\n */\r\n public abstract T add(T augend, T addend);\r\n\r\n /**\r\n * Compare\r\n *\r\n * @param s1\r\n * @param s2\r\n * @return\r\n * @throws NumberFormatException\r\n * @throws ParseException\r\n */\r\n public abstract int compare(String s1, String s2) throws NumberFormatException,\r\n ParseException;\r\n\r\n /**\r\n * Compare\r\n *\r\n * @param t1\r\n * @param t2\r\n * @return\r\n */\r\n public abstract int compare(T t1, T t2);\r\n\r\n /**\r\n * Divide\r\n *\r\n * @param dividend\r\n * @param divisor\r\n * @return\r\n */\r\n public abstract String divide(String dividend, String divisor);\r\n \r\n /**\r\n * Divide\r\n *\r\n * @param dividend\r\n * @param divisor\r\n * @return\r\n */\r\n public abstract T divide(T dividend, T divisor);\r\n \r\n /**\r\n * Format\r\n *\r\n * @param t\r\n * @return\r\n */\r\n public abstract String format(T t);\r\n\r\n /**\r\n * Converts a double into a value.\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract T fromDouble(Double d);\r\n\r\n /**\r\n * Description\r\n *\r\n * @return\r\n */\r\n public abstract DataTypeDescription<T> getDescription();\r\n\r\n /**\r\n * Maximum\r\n *\r\n * @return\r\n */\r\n public T getMaximum();\r\n \r\n /**\r\n * Minimum\r\n *\r\n * @return\r\n */\r\n public T getMinimum();\r\n\r\n /**\r\n * Valid\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract boolean isValid(String s);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract String multiply(String multiplicand,\r\n String multiplicator);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract T multiply(T multiplicand, double multiplicator);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract T multiply(T multiplicand, int multiplicator);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract T multiply(T multiplicand, T multiplicator);\r\n \r\n /**\r\n * Parse\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract T parse(String s);\r\n\r\n /**\r\n * Divide\r\n *\r\n * @param dividend\r\n * @param divisor\r\n * @return\r\n */\r\n public abstract double ratio(T dividend, T divisor);\r\n \r\n /**\r\n * Subtract\r\n *\r\n * @param minuend\r\n * @param subtrahend\r\n * @return\r\n */\r\n public abstract T subtract(T minuend, T subtrahend);\r\n \r\n /**\r\n * Converts a double into a value.\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract Double toDouble(T t);\r\n }", "public interface IDimension {\n\n /**\n * Gets the type of this dimension (Height, Width, etc.).\n * @return the type of this dimension.\n */\n String getType();\n\n /**\n * Gets the value of this dimension.\n * @return the value of this dimension.\n */\n float getValue();\n}", "public int geomDim();", "@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }", "public void draw4x4 (char design){\n System.out.println(\"\"+design+design+design+design);\n System.out.println(design+\" \"+design);\n System.out.println(design+\" \"+design);\n System.out.println(\"\"+design+design+design+design);\n}", "public abstract String getImageFormat();", "private String LightConversion() {\n\n int exponent = ((raw[19] & 0xC0) >> 6) + ((raw[20] & 0x03) << 2);\n int mantissa = ((raw[20] & 0xFC) >> 2) + ((raw[21] & 0x03) << 6);\n double value = (Math.pow(2.0, exponent)) * mantissa * 0.025;\n\n return Double.valueOf(threeDForm.format(value)) + \"\";\n\n }", "@DISPID(1610940426) //= 0x6005000a. The runtime will prefer the VTID if present\n @VTID(32)\n GeometricElements geometricElements();", "public final zzgv<String> zzd() {\n String[] strArr = this.types;\n if (strArr != null) {\n return zzgv.zza((E[]) strArr);\n }\n return null;\n }", "public int getDataType()\n {\n return dtype;\n }", "public interface C2007e {\n C3224j getData();\n\n float getMaxHighlightDistance();\n\n int getMaxVisibleCount();\n\n float getYChartMax();\n\n float getYChartMin();\n}", "@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n GeometricElements geometricElements();", "public Vector4d() {\n\t\t// intentionally left empty\n\t}", "public String whatShape();", "public int getRenderType()\n {\n return 40;\n }", "public interface DGeom {\n\n\t/** the maximum number of user classes that are supported. */\n\t//\tenum {\n\tpublic static final int dMaxUserClasses = 4;\n\t//\t};\n\n\t/** \n\t * class numbers - each geometry object needs a unique number.\n\t * (TZ) This has not been made an 'enum' to leave it easily extensible\n\t * for user defined classes.\n\t */\n\t//\tenum {\n\tpublic static final int dSphereClass = 0;\n\tpublic static final int dBoxClass = 1;\n\tpublic static final int dCapsuleClass = 2;\n\tpublic static final int dCylinderClass = 3;\n\tpublic static final int dPlaneClass = 4;\n\tpublic static final int dRayClass = 5;\n\tpublic static final int dConvexClass = 6;\n\tpublic static final int dGeomTransformClass = 7;\n\tpublic static final int dTriMeshClass = 8;\n\tpublic static final int dHeightfieldClass = 9;\n\n\tpublic static final int dFirstSpaceClass = 10;\n\tpublic static final int dSimpleSpaceClass = dFirstSpaceClass; //10\n\tpublic static final int dHashSpaceClass = 11;\n\tpublic static final int dSweepAndPruneSpaceClass = 12;\n\tpublic static final int dQuadTreeSpaceClass = 13;\n\tpublic static final int dBVHSpaceClass = 14;\n\tpublic static final int dLastSpaceClass = dBVHSpaceClass; //14\n\n\t/** \n\t * ID of the first user defined class. \n\t * <b>These IDs may change between software releases!</b><br>\n\t * To avoid problem, user defined classes should have their IDs allocated \n\t * based on <tt>dFirstUserClass</tt>, for example: \n\t * <tt>int myCLassID = dFirstUserClass + x;</tt>, where (x &ge; 1). \n\t */\n\tpublic static final int dFirstUserClass = 14;\n\tpublic static final int dLastUserClass = dFirstUserClass + dMaxUserClasses - 1;\n\tpublic static final int dGeomNumClasses = dLastUserClass + 1; \n\t//\t};\n\n\n\n\tvoid DESTRUCTOR();\n\n\t/**\n\t * Destroy a geom, removing it from any space.\n\t * <p>\n\t * Destroy a geom, removing it from any space it is in first. This one\n\t * function destroys a geom of any type, but to create a geom you must call\n\t * a creation function for that type.\n\t * <p>\n\t * When a space is destroyed, if its cleanup mode is 1 (the default) then all\n\t * the geoms in that space are automatically destroyed as well.\n\t */\n\tvoid destroy();\n\n\t\n\t/**\n\t * Given a geom, this returns its class.\n\t * <p>\n\t * The ODE classes are:\n\t * <ul>\n\t * <li> dSphereClass </li>\n\t * <li> dBoxClass </li>\n\t * <li> dCylinderClass </li>\n\t * <li> dPlaneClass </li>\n\t * <li> dRayClass </li>\n\t * <li> dConvexClass </li>\n\t * <li> dGeomTransformClass </li>\n\t * <li> dTriMeshClass </li>\n\t * <li> dSimpleSpaceClass </li>\n\t * <li> dHashSpaceClass </li>\n\t * <li> dQuadTreeSpaceClass </li>\n\t * <li> dFirstUserClass </li>\n\t * <li> dLastUserClass </li>\n\t * </ul>\n\t * <p>\n\t * User-defined class will return their own number.\n\t *\n\t * @return The geom class ID.\n\t */\n\tint getClassID();\n\n\t\n\t/**\n\t * Query for the space containing a particular geom.\n\t * \n\t * @return The space that contains the geom, or NULL if the geom is\n\t * not contained by a space.\n\t */\n\tDSpace getSpace();\n\n\t\n\t/**\n\t * Set the user-defined data pointer stored in the geom.\n\t *\n\t * @param data the data pointer to be stored\n\t */\n\tvoid setData (Object data);\n\n\t\n\t/**\n\t * Get the user-defined data pointer stored in the geom.\n\t * @return user data\n\t */\n\tObject getData();\n\n\t\n\t/**\n\t * Set the body associated with a placeable geom.\n\t * <p>\n\t * Setting a body on a geom automatically combines the position vector and\n\t * rotation matrix of the body and geom, so that setting the position or\n\t * orientation of one will set the value for both objects. Setting a body\n\t * ID of zero gives the geom its own position and rotation, independent\n\t * from any body. If the geom was previously connected to a body then its\n\t * new independent position/rotation is set to the current position/rotation\n\t * of the body.\n\t * <p>\n\t * Calling these functions on a non-placeable geom results in a runtime\n\t * error in the debug build of ODE.\n\t *\n\t * @param body the body to attach to the geom\n\t */\n\tvoid setBody (DBody body);\n\n\t\n\t/**\n\t * Get the body associated with a placeable geom.\n\t * @return body object\n\t * @see #setBody(DBody)\n\t */\n\tDBody getBody();\n\n\t\n\t/**\n\t * Set the position vector of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's position will also be changed.\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param x the new X coordinate.\n\t * @param y the new Y coordinate.\n\t * @param z the new Z coordinate.\n\t * @see DBody#setPosition(double, double, double)\n\t */\n\tvoid setPosition (double x, double y, double z);\n\t\n\t\n\t/**\n\t * Set the position vector of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's position will also be changed.\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param xyz the new X, Y and Z coordinate.\n\t * @see DBody#setPosition(DVector3C)\n\t */\n\tvoid setPosition (DVector3C xyz);\n\n\n\t/**\n\t * Get the position vector of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's position will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's position vector.\n\t * @see DBody#getPosition()\n\t */\n\tDVector3C getPosition();\n\n\t\n\t/**\n\t * Copy the position of a geom into a vector.\n\t * @param pos a copy of the geom position\n\t * @see #getPosition()\n\t */\n\tvoid copyPosition (DVector3 pos);\n\n\t/**\n\t * Set the rotation matrix of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will also be changed.\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param R the new rotation matrix.\n\t * @see DBody#setRotation(DMatrix3C)\n\t */\n\tvoid setRotation (DMatrix3C R);\n\t\n\t\n\t/**\n\t * Get the rotation matrix of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's rotation matrix.\n\t * @see DBody#getRotation()\n\t */\n\tDMatrix3C getRotation();\n\t\n\t\n\t/**\n\t * Get the rotation matrix of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param R a copy of the geom rotation\n\t * @see #getRotation()\n\t */\n\tvoid copyRotation(DMatrix3 R);\n\n\n\t/**\n\t * Set the rotation of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will also be changed.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param quat the new rotation.\n\t * @see DBody#setQuaternion(DQuaternionC)\n\t */\n\tvoid setQuaternion (DQuaternionC quat);\n\n\t\n\t/**\n\t * Get the rotation quaternion of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's quaternion will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t * @return Rotation quaternion\n\t *\n\t * @see DBody#getQuaternion()\n\t */\n\tDQuaternionC getQuaternion ();\n\n\t\n\t/**\n\t * Return the axis-aligned bounding box.\n\t * <p>\n\t * Return in aabb an axis aligned bounding box that surrounds the given geom.\n\t * The aabb array has elements (minx, maxx, miny, maxy, minz, maxz). If the\n\t * geom is a space, a bounding box that surrounds all contained geoms is\n\t * returned.\n\t * <p>\n\t * This function may return a pre-computed cached bounding box, if it can\n\t * determine that the geom has not moved since the last time the bounding\n\t * box was computed.\n\t * @return bounding box\n\t */\n\tDAABBC getAABB ();\n\n\t\n//\t/**\n//\t * Determing if a geom is a space.\n//\t * @param geom the geom to query\n//\t * @return Non-zero if the geom is a space, zero otherwise.\n//\t */\n\t//\tint isSpace();\n\n\t\n\t/**\n\t * Set the \"category\" bitfield for the given geom.\n\t * <p>\n\t * The category bitfield is used by spaces to govern which geoms will\n\t * interact with each other. The bitfield is guaranteed to be at least\n\t * 32 bits wide. The default category values for newly created geoms\n\t * have all bits set.\n\t *\n\t * @param bits the new bitfield value\n\t */\n\tvoid setCategoryBits (long bits);//unsigned long bits)\n\t\n\t\n\t/**\n\t * Set the \"collide\" bitfield for the given geom.\n\t * <p>\n\t * The collide bitfield is used by spaces to govern which geoms will\n\t * interact with each other. The bitfield is guaranteed to be at least\n\t * 32 bits wide. The default category values for newly created geoms\n\t * have all bits set.\n\t *\n\t * @param bits the new bitfield value\n\t */\n\tvoid setCollideBits (long bits);//unsigned long bits)\n\t\n\t\n\t/**\n\t * Get the \"category\" bitfield for the given geom.\n\t *\n\t * @return The bitfield value\n\t * @see #setCategoryBits(long)\n\t */\n\t//unsigned \n\tlong getCategoryBits();\n\t\n\t\n\t/**\n\t * Get the \"collide\" bitfield for the given geom.\n\t *\n\t * @return The bitfield value\n\t * @see #setCollideBits(long)\n\t */\n\t//unsigned \n\tlong getCollideBits();\n\n\t\n\t/**\n\t * Enable a geom.\n\t * <p>\n\t * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2,\n\t * although they can still be members of a space. New geoms are created in\n\t * the enabled state.\n\t *\n\t * @see #disable()\n\t * @see #isEnabled()\n\t */\n\tvoid enable();\n\t\n\t\n\t/**\n\t * Disable a geom.\n\t * <p>\n\t * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2,\n\t * although they can still be members of a space. New geoms are created in\n\t * the enabled state.\n\t *\n\t * @see #enable()\n\t * @see #isEnabled()\n\t */\n\tvoid disable();\n\t\n\t\n\t/**\n\t * Check to see if a geom is enabled.\n\t * <p>\n\t * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2,\n\t * although they can still be members of a space. New geoms are created in\n\t * the enabled state.\n\t *\n\t * @return Non-zero if the geom is enabled, zero otherwise.\n\t * @see #disable()\n\t * @see #enable()\n\t */\n\tboolean isEnabled();\n\n\t\n\t/**\n\t * User callback for geom-geom collision testing.\n\t *\n\t * <p>REMARK: The callback function can call dCollide on o1 and o2 to generate\n\t * contact points between each pair. Then these contact points may be added\n\t * to the simulation as contact joints. The user's callback function can of\n\t * course chose not to call dCollide for any pair, e.g. if the user decides\n\t * that those pairs should not interact.\n\t */\n\t//typedef void dNearCallback (void *data, dGeom o1, dGeom o2);\n\tpublic interface DNearCallback {\n\t /**\n\t * @param data The user data object, as passed to dSpaceCollide.\n\t * @param o1 The first geom being tested.\n\t * @param o2 The second geom being test.\n\t */\n\t\tpublic void call (Object data, DGeom o1, DGeom o2);\n\t}\n\n\tvoid collide2 (DGeom g, Object data, DNearCallback callback);\n\n\n\t\n\n//\tenum CONTROL_CLASS {\n//\t dGeomCommonControlClass,// = 0,\n//\t dGeomColliderControlClass;// = 1\n//\t}\n//\n//\tenum CONTROL_CODE {\n//\t dGeomCommonAnyControlCode,// = 0,\n//\t dGeomColliderSetMergeSphereContactsControlCode,// = 1,\n//\t dGeomColliderGetMergeSphereContactsControlCode;// = 2\n//\t}\n//\n//\tenum COLLIDER_MERGE_CONTACTS_VALUE {\n//\t dGeomColliderMergeContactsValue__Default,// = 0, // Used with Set... to restore default value\n//\t dGeomColliderMergeContactsValue_None,// = 1,\n//\t dGeomColliderMergeContactsValue_Normals,// = 2,\n//\t dGeomColliderMergeContactsValue_Full;// = 3\n//\t}\n//\n//\t/**\n//\t * \n//\t *\n//\t * @author Tilmann Zaeschke\n//\t * @deprecated not implemented yet.\n//\t */\n//\tstatic interface DataValue {};\n//\t\n//\t/**\n//\t * Execute low level control operation for geometry.\n//\t *\n//\t * The variable the dataSize points to must be initialized before the call.\n//\t * If the size does not match the one expected for the control class/code function\n//\t * changes it to the size expected and returns failure. This implies the function \n//\t * can be called with NULL data and zero size to test if control class/code is supported\n//\t * and obtain required data size for it.\n//\t * <p>\n//\t * dGeomCommonAnyControlCode applies to any control class and returns success if \n//\t * at least one control code is available for the given class with given geom.\n//\t * <br>\n//\t * Currently there are the folliwing control classes supported:<br>\n//\t * <li> dGeomColliderControlClass</li>\n//\t * <p>\n//\t * For dGeomColliderControlClass there are the following codes available:<br>\n//\t * <li> dGeomColliderSetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*)</li>\n//\t * <li> dGeomColliderGetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*)</li>\n//\t * \n//\t * @param controlClass the control class\n//\t * @param controlCode the control code for the class\n//\t * @param dataValue the control argument pointer\n//\t * @param dataSize the control argument size provided or expected\n//\t * @return Boolean execution status\n//\t */\n//\tboolean lowLevelControl(CONTROL_CLASS controlClass, CONTROL_CODE controlCode, \n//\t\t\tDataValue dataValue, RefInt dataSize);\n\n\n\t/**\n\t * Get world position of a relative point on geom.\n\t *\n\t * Calling this function on a non-placeable geom results in the same point being\n\t * returned.\n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t *\n\t * @param result will contain the result.\n\t */\n\tvoid getRelPointPos(double px, double py, double pz, DVector3 result);\n\n\t/**\n\t * Takes a point in global coordinates and returns\n\t * the point's position in geom-relative coordinates.\n\t *\n\t * Calling this function on a non-placeable geom results in the same point being\n\t * returned.\n\t *\n\t * <p>REMARK:\n\t * This is the inverse of dGeomGetRelPointPos()\n\t * \n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t * @param result will contain the result.\n\t */\n\tvoid getPosRelPoint(double px, double py, double pz, DVector3 result);\n\n\t/**\n\t * Convert from geom-local to world coordinates.\n\t *\n\t * Calling this function on a non-placeable geom results in the same vector being\n\t * returned.\n\t *\n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t * @param result will contain the result.\n\t */\n\tvoid vectorToWorld(double px, double py, double pz, DVector3 result);\n\n\t/**\n\t * Convert from world to geom-local coordinates.\n\t *\n\t * Calling this function on a non-placeable geom results in the same vector being\n\t * returned.\n\t *\n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t * @param result will contain the result.\n\t */\n\tvoid vectorFromWorld(double px, double py, double pz, DVector3 result);\n\n\t\n\t/**\n\t * Get the offset position vector of a geom.\n\t * <p>\n\t * Returns the positional offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the zero vector.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's offset vector.\n\t */\n\tDVector3C getOffsetPosition();\n\n\t\n\t/**\n\t * Copy the offset position vector of a geom.\n\t * <p>\n\t * Returns the positional offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the zero vector.\n\t *\n\t * @param pos returns the offset position\n\t */\n\tvoid copyOffsetPosition (DVector3 pos);\n\t\n\t\n\t/**\n\t * Set the local offset position of a geom from its body.\n\t * <p>\n\t * Sets the geom's positional offset in local coordinates.\n\t * After this call, the geom will be at a new position determined from the\n\t * body's position and the offset.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param x the new X coordinate.\n\t * @param y the new Y coordinate.\n\t * @param z the new Z coordinate.\n\t */\n\tvoid setOffsetPosition(double x, double y, double z);\n\t/**\n\t * \n\t * @param xyz xyz\n\t * @see #setOffsetPosition(double, double, double) \n\t */\n\tvoid setOffsetPosition(DVector3C xyz);\n\n\t\n\t/**\n\t * Get the offset rotation matrix of a geom.\n\t * <p>\n\t * Returns the rotational offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the identity\n\t * matrix.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's offset rotation matrix.\n\t */\n\tDMatrix3C getOffsetRotation();\n\t\n\t\n\t/**\n\t * Copy the offset rotation matrix of a geom.\n\t * <p>\n\t * Returns the rotational offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the identity\n\t * matrix.\n\t *\n\t * @param R returns the rotation matrix.\n\t */\n\tvoid copyOffsetRotation (DMatrix3 R);\n\n\t\n\t/**\n\t * Set the local offset rotation matrix of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset in local coordinates.\n\t * After this call, the geom will be at a new position determined from the\n\t * body's position and the offset.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param R the new rotation matrix.\n\t */\n\tvoid setOffsetRotation(DMatrix3C R);\n\t\n\t\n\t/**\n\t * Get the offset rotation quaternion of a geom.\n\t *\n\t * Returns the rotation offset of the geom as a quaternion.\n\t * If the geom has no offset, the identity quaternion is returned.\n\t *\n\t * @param result a copy of the rotation quaternion.\n\t */\n\tvoid getOffsetQuaternion(DQuaternion result);\n\n\t\n\t/**\n\t * Set the local offset rotation of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset in local coordinates.\n\t * After this call, the geom will be at a new position determined from the\n\t * body's position and the offset.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param q the new rotation.\n\t */\n\tvoid setOffsetQuaternion(DQuaternionC q);\n\n\t\n\t/**\n\t * Set the offset position of a geom from its body.\n\t * <p>\n\t * Sets the geom's positional offset to move it to the new world\n\t * coordinates.\n\t * After this call, the geom will be at the world position passed in,\n\t * and the offset will be the difference from the current body position.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param x the new X coordinate.\n\t * @param y the new Y coordinate.\n\t * @param z the new Z coordinate.\n\t */\n\tvoid setOffsetWorldPosition(double x, double y, double z);\n\n\t\n\t/**\n\t * Set the offset rotation of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset to orient it to the new world\n\t * rotation matrix.\n\t * After this call, the geom will be at the world orientation passed in,\n\t * and the offset will be the difference from the current body orientation.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param R the new rotation matrix.\n\t */\n\tvoid setOffsetWorldRotation(DMatrix3C R);\n\t\n\t\n\t/**\n\t * Set the offset rotation of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset to orient it to the new world\n\t * rotation matrix.\n\t * After this call, the geom will be at the world orientation passed in,\n\t * and the offset will be the difference from the current body orientation.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param q the new rotation.\n\t */\n\tvoid setOffsetWorldQuaternion(DQuaternionC q);\n\t\n\t\n\t/**\n\t * Clear any offset from the geom.\n\t * <p>\n\t * If the geom has an offset, it is eliminated and the geom is\n\t * repositioned at the body's position. If the geom has no offset,\n\t * this function does nothing.\n\t * This is more efficient than calling dGeomSetOffsetPosition(zero)\n\t * and dGeomSetOffsetRotation(identiy), because this function actually\n\t * eliminates the offset, rather than leaving it as the identity transform.\n\t *\n\t */\n\tvoid clearOffset();\n\t\n\t\n\t/**\n\t * Check to see whether the geom has an offset.\n\t * <p>\n\t * This function will return non-zero if the offset has been created.\n\t * Note that there is a difference between a geom with no offset,\n\t * and a geom with an offset that is the identity transform.\n\t * In the latter case, although the observed behaviour is identical,\n\t * there is a unnecessary computation involved because the geom will\n\t * be applying the transform whenever it needs to recalculate its world\n\t * position.\n\t *\n\t * @return Non-zero if the geom has an offset, zero otherwise.\n\t */\n\tboolean isOffset();\n}", "public\tint\tgetTypeFormatId()\t{ return StoredFormatIds.FORMATABLE_ARRAY_HOLDER_V01_ID; }", "int getDataType();", "public Float getT1B11P4() {\r\n return t1B11P4;\r\n }", "@Override\n public int getRenderType()\n {\n return 22;\n }", "public String toString() {\n\t\treturn type + \" x \" + dim;\n\t}", "public Float getT1B11T4() {\r\n return t1B11T4;\r\n }", "public int mo25072g() {\n return this.f14802d;\n }", "public String m3146g() {\n return this.f2415i;\n }", "private static final byte[] xfmt_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -128,\n\t\t\t\t-128, -128, -1, -1, -1, 0, 0, 0, 0, 0, -1, -64, -64, -64, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 62, 88, -70,\n\t\t\t\t-36, 11, 48, 74, -8, -126, -67, -40, 10, 5, -126, -8, 32, -40,\n\t\t\t\t109, -59, 56, -100, -24, 57, 114, -34, 16, -92, -86, -57, 10,\n\t\t\t\t48, -70, -106, 109, 61, -36, -90, -50, -25, -75, -97, 96, 34,\n\t\t\t\t-111, -31, 50, 72, 82, 33, -60, 4, 57, 58, 23, 2, 64, -71, 104,\n\t\t\t\t54, 29, -40, 70, 2, 0, 59 };\n\t\treturn data;\n\t}", "private native void convertToLum( short[] data, int w, int h );", "private String getAltRegDataType() {\n\t\treturn \"logic[PIO_MAX_TR_WIDTH-1:0]\"; // TODO - make parameterizable, \"u_int\" + regProperties.getRegWidth() + \"_t\"\n\t}", "public interface Numeric extends DataType {\n}", "public String getPresentationFormat()\n {\n return (String) getProperty(PropertyIDMap.PID_PRESFORMAT);\n }", "private float m215d(float f) {\n return TypedValue.applyDimension(1, f, this.f418s);\n }", "@Override\n public void getDimensions() {\n DecimalFormat df = new DecimalFormat(\"###.000\");\n System.out.println(\"RESULT: \" + getType() + \" dimensions: (2/3)pi * \" + r + \"^3\");\n System.out.println(\"RESULT: \" + getType() + \" volume \" + getVolume() + \" = [\" + df.format(this.vol) + \"]\");\n }", "public int getDataType();", "@java.lang.Override\n public double getRealValue() {\n if (typeCase_ == 4) {\n return (java.lang.Double) type_;\n }\n return 0D;\n }", "Object getFormat();", "public Float getT1B11D3() {\r\n return t1B11D3;\r\n }", "public String getImg_4() {\n return img_4;\n }", "private static final short getDimType(Dimensions dims) {\r\n\t\tif (dims.is0D())\r\n\t\t\treturn SCALER;\r\n\t\telse if (dims.is1D()) {\r\n\t\t\tswitch (dims.getFirstDim()) {\r\n\t\t\tcase 2:\r\n\t\t\t\treturn V2;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn V3;\r\n\t\t\tcase 4:\r\n\t\t\t\treturn V4;\r\n\t\t\tdefault:\r\n\t\t\t\treturn Vn;\r\n\t\t\t}\r\n\t\t} else if (dims.is2D()) {\r\n\t\t\tswitch (dims.getFirstDim()) {\r\n\t\t\tcase 2:\r\n\t\t\t\tswitch (dims.getLastDim()) {\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\treturn M22;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\treturn M23;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\treturn M24;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tswitch (dims.getLastDim()) {\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\treturn M32;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\treturn M33;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\treturn M34;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tswitch (dims.getLastDim()) {\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\treturn M42;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\treturn M43;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\treturn M44;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn Mnn;\r\n\t\t}\r\n\t\treturn Dtens;\r\n\t}", "@java.lang.Override\n public boolean hasTransform2DValue() {\n return typeCase_ == 9;\n }", "public float getDCN();", "@Field(0) \r\n\tpublic ValuedEnum<DXGI_FORMAT> format() {\r\n\t\treturn this.io.getEnumField(this, 0);\r\n\t}", "public String getRepresentation();", "int getOneof1080();", "@java.lang.Override\n public boolean hasTransform2DValue() {\n return typeCase_ == 9;\n }", "float getD();", "public static int numDimensions_data() {\n return 1;\n }", "private static final byte[] xfcpp_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, 96,\n\t\t\t\t96, 96, -128, -128, -128, -1, -1, -1, -1, -1, -1, 33, -2, 14,\n\t\t\t\t77, 97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80,\n\t\t\t\t0, 33, -7, 4, 1, 10, 0, 2, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0,\n\t\t\t\t2, 53, -108, -113, -119, -64, 96, -2, 78, -101, 2, 86, -55,\n\t\t\t\t-80, -101, 116, 89, -40, 40, -33, -109, 41, 98, 105, 94, 21,\n\t\t\t\t42, -75, 85, 0, -57, -21, 26, 2, 49, -52, 90, 111, -84, -85,\n\t\t\t\t-58, 29, 72, -3, -126, 2, -104, -48, 120, 32, -102, -112, -62,\n\t\t\t\t67, 1, 0, 59 };\n\t\treturn data;\n\t}", "@Override public List<String> gridRepresentation() {\n assert(checkRep());\n return representation;\n }", "@Override\n public int getRenderType()\n {\n return 31;\n }", "public String getDataType() ;", "public int m2706g() {\n return ((Integer) this.f2439a.m2666a(ea.bs)).intValue();\n }", "public interface R2MatricesInstanceSingleValuesType\n{\n /**\n * @return The current modelview matrix for an instance\n */\n\n PMatrixDirectReadable4x4FType<R2SpaceObjectType, R2SpaceEyeType>\n matrixModelView();\n\n /**\n * @return The current normal matrix for an instance\n */\n\n PMatrixDirectReadable3x3FType<R2SpaceObjectType, R2SpaceNormalEyeType>\n matrixNormal();\n\n /**\n * @return The current UV matrix for an instance\n */\n\n PMatrixDirectReadable3x3FType<R2SpaceTextureType, R2SpaceTextureType>\n matrixUV();\n}", "public Float getT1B11S4() {\r\n return t1B11S4;\r\n }", "public byte getType() {\n\t\treturn SimpleGeoObj.TRIANGLE_ELT_3D;\n\t}", "public String[] mo12393d() {\n return this.f17341k.f17235g;\n }", "public static boolean m128359d() {\n if (!C39182e.m125104g()) {\n return false;\n }\n return C35563c.f93231M.mo93305a(Property.EnableVideoImageMixed);\n }", "@Override\n public String toString()\n {\n return String.format(\"(%f,%f,%f,%f)\", kP, kI, kD, kF);\n }", "public T4 _4() {\n return _4;\n }", "public Float getT1B112d() {\r\n return t1B112d;\r\n }", "public int grWidth() { return width; }", "private static final byte[] xfplot_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 17, 0, 0, 0,\n\t\t\t\t0, 74, 74, 74, 92, 92, 92, 98, 98, 98, 105, 105, 105, 108, 108,\n\t\t\t\t108, 116, 116, 116, 119, 119, 119, 123, 123, 123, -126, -126,\n\t\t\t\t-126, -123, -123, -123, -112, -112, -112, -109, -109, -109,\n\t\t\t\t-103, -103, -103, -95, -95, -95, -92, -92, -92, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 33, -7, 4, 1, 0, 0, 17, 0, 44, 0, 0, 0, 0, 16, 0, 16,\n\t\t\t\t0, 0, 5, 85, 96, 36, -114, 81, 16, -112, 40, 105, -102, 105,\n\t\t\t\t-70, -98, 40, 64, 10, 116, 29, -109, 4, 65, -25, -73, 88, -4,\n\t\t\t\t-71, 95, -127, 36, 19, 17, -124, 66, 2, 81, 36, -56, 29, 11,\n\t\t\t\t78, -63, -88, 88, 115, -22, 104, -45, 72, 109, -53, 21, 1, 94,\n\t\t\t\t92, -63, 43, -126, 32, 64, -50, 47, -45, 25, 66, 64, 68, 0,\n\t\t\t\t-128, -11, 107, 13, 39, -58, 33, 106, 72, -67, 5, -49, -19, 91,\n\t\t\t\t35, 8, 110, 41, 33, 0, 59 };\n\t\treturn data;\n\t}", "public String m7915g() {\n return this.f6694g;\n }", "@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }", "private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }", "private final void m126208g() {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n if (!this.f102568b.mIsFromDraft || !this.f102568b.hasStickers()) {\n boolean a = C39804em.m127437a(this.f102568b.videoWidth(), this.f102568b.videoHeight());\n if (a) {\n i = this.f102568b.videoWidth();\n } else {\n int[] k = C36964i.m118935k();\n if (k != null) {\n i3 = k[0];\n } else {\n i3 = 720;\n }\n i = m125903a(C7551d.m23567d(this.f102568b.videoWidth(), i3));\n }\n this.f102569c = i;\n if (a) {\n i2 = this.f102568b.videoHeight();\n } else {\n double d = (double) this.f102569c;\n Double.isNaN(d);\n i2 = (int) (Math.ceil(d / 9.0d) * 16.0d);\n }\n this.f102570d = i2;\n return;\n }\n if (this.f102568b.mVideoCanvasWidth > 0) {\n i4 = this.f102568b.mVideoCanvasWidth;\n } else {\n i4 = this.f102568b.videoWidth();\n }\n this.f102569c = i4;\n if (this.f102568b.mVideoCanvasHeight > 0) {\n i5 = this.f102568b.mVideoCanvasHeight;\n } else {\n i5 = this.f102568b.videoHeight();\n }\n this.f102570d = i5;\n }", "public int getRenderType()\n {\n return 2;\n }", "private static final byte[] xfdm_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, 104,\n\t\t\t\t104, 104, -1, -1, -1, 123, 123, 123, -127, -127, -127, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97,\n\t\t\t\t100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33,\n\t\t\t\t-7, 4, 1, 10, 0, 1, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 57,\n\t\t\t\t24, -70, -36, 43, -62, 41, 0, 24, -116, -115, 86, 11, -103,\n\t\t\t\t-106, -41, 68, 73, -54, -11, -111, -27, -87, 12, -125, -93, 97,\n\t\t\t\t107, 27, -56, 111, 23, -49, -20, 25, -30, 108, -66, -107, 16,\n\t\t\t\t22, -81, -41, 16, 16, 123, 72, 6, 113, 40, 92, 44, -103, -79,\n\t\t\t\t38, 106, -102, 0, 0, 59 };\n\t\treturn data;\n\t}", "public Float getT1B11D() {\r\n return t1B11D;\r\n }", "@Override\n\tpublic int[] getImageScaleDrawing() {\n\t\treturn new int[] {\n\t\t\t\t80, 80\n\t\t};\n\t}", "ImageFormat getFormat();", "@Override\n\tpublic void setDimensions() {\n\t\t\n\t}", "public double[] getWidth() { return this.width; }", "java.lang.String getField1648();", "public double[][] getWidthData() { return this.widthData; }", "public final String mo1685d() {\n return this.f1355g;\n }", "java.lang.String getDataType();", "public float getDisp();", "public double getG();", "public abstract float mo9744i();", "@Override\n public String toString()\n {\n\treturn getClass().getSimpleName() + \" (\" + getLength() + \"x\" + getWidth() + \")\";\n }", "@DISPID(100) //= 0x64. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n float width();", "public Float getT1B11Pg() {\r\n return t1B11Pg;\r\n }", "private View m3984P() {\n return mo4729d(this.f3143x ? mo4732e() - 1 : 0);\n }", "public Float getGrsds() {\n return grsds;\n }", "public String toString() {\n/* 318 */ switch (this.h) {\n/* */ case 1:\n/* 320 */ return \"Forward RCT\";\n/* */ case 2:\n/* 322 */ return \"Forward ICT\";\n/* */ case 0:\n/* 324 */ return \"No component transformation\";\n/* */ } \n/* 326 */ throw new IllegalArgumentException(\"Non JPEG 2000 part I component transformation\");\n/* */ }", "protected String getDataFormat() {\n return this.dataFormat;\n }", "private static final byte[] xfsg_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -77, 9, 0, 67,\n\t\t\t\t67, 67, 93, 93, 93, 115, 115, 115, -120, -120, -120, -96, -96,\n\t\t\t\t-96, -89, -89, -89, -88, -88, -88, -62, -62, -62, -28, -28,\n\t\t\t\t-28, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 33, -7, 4, 1, 0, 0, 9, 0, 44, 0, 0, 0, 0, 16, 0, 16,\n\t\t\t\t0, 0, 4, 83, 48, -55, 121, -86, -99, 88, 90, -124, 110, 78, 21,\n\t\t\t\t39, 118, 71, 86, 9, -60, 56, 0, 21, 117, 10, -24, 10, -80, 45,\n\t\t\t\t-8, 14, 2, 16, -24, -98, 69, 8, 3, -61, 96, 103, 41, -39, 14,\n\t\t\t\t-85, 64, 16, 87, -44, 84, 102, 59, 32, -20, 2, -85, -26, 6,\n\t\t\t\t-65, 105, -51, 42, 24, 33, 8, 53, -119, -43, 27, 78, 112, 15,\n\t\t\t\t28, -113, 88, -80, 46, 26, -41, 24, -10, 7, 62, -1, 68, 0, 0,\n\t\t\t\t59 };\n\t\treturn data;\n\t}", "@java.lang.Override\n public boolean hasRect2Value() {\n return typeCase_ == 7;\n }", "ZHDraweeView mo91981h();", "@Override\n\tprotected void readImpl()\n\t{\n\t\t_x = readD();\n\t\t_y = readD();\n\t\t_z = readD();\n\t\t_heading = readD();\n\t}", "@java.lang.Override\n public boolean hasRect2Value() {\n return typeCase_ == 7;\n }", "public Float getT1B11D1() {\r\n return t1B11D1;\r\n }", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetHorizontalResolution();", "public boolean mo17604g() {\n return this.f2599g != null;\n }", "public static interface DataTypeWithFormat {\r\n \r\n /**\r\n * Format\r\n * \r\n * @return\r\n */\r\n public abstract String getFormat();\r\n \r\n /**\r\n * Locale\r\n * \r\n * @return\r\n */\r\n public abstract Locale getLocale();\r\n }" ]
[ "0.5807251", "0.56143725", "0.55474263", "0.5376079", "0.5361663", "0.5234648", "0.52314353", "0.51940995", "0.5189934", "0.5154675", "0.5147938", "0.51469266", "0.5145069", "0.5144927", "0.5137463", "0.5103925", "0.5091441", "0.5091047", "0.50703216", "0.5062298", "0.5058383", "0.5058316", "0.50555223", "0.5050478", "0.5028316", "0.5028252", "0.4997767", "0.4991592", "0.49910718", "0.4988172", "0.49832368", "0.49813634", "0.4970523", "0.49675885", "0.49639177", "0.49606228", "0.49533924", "0.49492374", "0.49227917", "0.49185234", "0.4917854", "0.49113286", "0.49085525", "0.4892811", "0.48887762", "0.48814154", "0.4879067", "0.48674214", "0.48670256", "0.48650572", "0.4864137", "0.48604354", "0.48586127", "0.48546988", "0.48425063", "0.4842353", "0.48417667", "0.48413163", "0.48406318", "0.48318893", "0.48313153", "0.48295203", "0.48273236", "0.48209313", "0.4818877", "0.48180282", "0.4811423", "0.48061857", "0.48048684", "0.48004898", "0.47973123", "0.47848824", "0.47832313", "0.47823945", "0.47793585", "0.47779238", "0.47657403", "0.4764341", "0.47638628", "0.47607884", "0.4757536", "0.47573528", "0.4756853", "0.47558993", "0.47530395", "0.47472867", "0.47447282", "0.47437158", "0.4742436", "0.47359163", "0.4735794", "0.473432", "0.47308147", "0.47280917", "0.47270605", "0.4724196", "0.47227117", "0.47224924", "0.47151116", "0.47081956", "0.4706826" ]
0.0
-1
Check if the image is a tomographic reconstruction.
public boolean isReconstruction() { return getShort(ADACDictionary.RECONSTRUCTED_SLICES) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasImageByTransform();", "public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }", "boolean isMotionImageryType();", "public boolean hasImageByTransform() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }", "boolean isImageTileType();", "public boolean isMakeImage() {\n return makeImage;\n }", "private boolean canUseFastLoadingTechnique() {\n GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();\n BufferedImage image = gc.createCompatibleImage(100, 100, Transparency.TRANSLUCENT);\n\n // On windows this should be an ARGB integer packed raster. If it is then we can\n // use our optimization technique\n if (image.getType() != BufferedImage.TYPE_INT_ARGB)\n return false;\n\n WritableRaster raster = image.getRaster();\n\n if (!(raster instanceof IntegerInterleavedRaster))\n return false;\n\n if (!(raster.getDataBuffer() instanceof DataBufferInt))\n return false;\n\n if (!(image.getColorModel() instanceof DirectColorModel))\n return false;\n\n DirectColorModel colorModel = (DirectColorModel) image.getColorModel();\n\n if (!(colorModel.getColorSpace() instanceof ICC_ColorSpace)\n || colorModel.getNumComponents() != 4\n || colorModel.getAlphaMask() != 0xff000000\n || colorModel.getRedMask() != 0xff0000\n || colorModel.getGreenMask() != 0xff00\n || colorModel.getBlueMask() != 0xff)\n return false;\n\n return !(raster.getNumBands() != 4\n || raster.getNumDataElements() != 1\n || !(raster.getSampleModel() instanceof SinglePixelPackedSampleModel));\n }", "boolean isImageType();", "boolean isMake();", "public boolean generateImageFromText();", "boolean hasTransform2DValue();", "public boolean isSetImg() {\n return this.img != null;\n }", "public native boolean isAnimatedImage() throws MagickException;", "public native boolean getMatte() throws MagickException;", "boolean hasPicture();", "public abstract boolean teReproduces();", "public boolean shouldImageProcess() {\r\n\t\treturn table.getBoolean(SHOULD_IMAGE_PROCESS_KEY, false);\r\n\t}", "public boolean canBeTransformedWith(Transformation other) {\n return false; // Independent transformation\n }", "private boolean isImageGiven(){\n return captureImage.getDrawable() != null;\n }", "public boolean stitchWillWork()\n {\n // get features\n ImageFeatures features = new ImageFeatures(this.vlImages.size());\n MatVector feature_find_masks = new MatVector(this.vlImages.size());\n computeImageFeatures(stitcher.featuresFinder(), this.vlImages, features, feature_find_masks);\n\n // get matches\n MatchesInfo matchesInfo = new MatchesInfo(this.vlImages.size());\n stitcher.featuresMatcher().apply2(features, matchesInfo, new UMat());\n stitcher.featuresMatcher().collectGarbage();\n\n // figure out if all the images should be in pano\n IntPointer indices = leaveBiggestComponent(features, matchesInfo, (float) stitcher.panoConfidenceThresh());\n// int[] ints = indices.getStringCodePoints();\n// System.out.println(indices.capacity());\n// System.out.println(\"len: \" + ints.length);\n// System.out.println(Arrays.toString(ints));\n\n // composePanorama relies on the fact that you will provide the same number of images as it determined the panorama should contain\n return indices.capacity() == this.vlImages.size();\n }", "public boolean isProjectile();", "protected boolean isFinished() {\n \tTargetTransform tt = Robot.vision_.getLatestGearLiftTargetTransform();\n \t\n \tif ( !isTimedOut() )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( tt == null )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( !tt.targetFound() )\n \t{\n \t\treturn false;\n \t}\n \t\n \tif ( previousTargetTransform == null )\n \t{\n \t\tRobot.vision_.takeTargetSnapshot( tt );\n\t\t\treturn true;\n \t}\n \t\n \tif ( !tt.equals(previousTargetTransform) )\n \t{\n\t\t\tRobot.vision_.takeTargetSnapshot( tt );\n\t\t\treturn true;\n \t}\n \t\n \treturn false;\n }", "public boolean isCrops() {\n return this.type == Type.CROPS;\n }", "boolean restoreBufferedImage();", "@Override\r\n public boolean isKnown ()\r\n {\r\n Shape shape = getShape();\r\n\r\n return (shape != null) && (shape != Shape.NOISE);\r\n }", "public boolean isClass() {\n return operation == null;\n }", "boolean isCrouching();", "@Override\n\tpublic boolean isMyImage() {\n\t\treturn false;\n\t}", "public boolean hasImage() {\n\t\treturn false;\n\t}", "boolean hasTemperatureScalingCalibration();", "boolean hasConstruct();", "public boolean isSetWeatherImage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WEATHERIMAGE$2) != 0;\n }\n }", "boolean hasMosaicLayout();", "boolean hasScaler();", "public boolean translateImageToText();", "@Test\n public void testIsTransitionMatrix()\n {\n IDoubleArray T = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isTransitionMatrix(T);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public abstract boolean isRendered();", "boolean isTracked(UUID projectile);", "boolean isRealized();", "boolean hasProduceResType();", "public native boolean isMonochromeImage() throws MagickException;", "protected abstract boolean isShapeSimple();", "public boolean isPic(){\n return this.isPic;\n }", "private boolean isImage(File file) throws IOException {\n if (!file.isFile()) {\n return false;\n } else if (ImageIO.read(file) == null) // if cannot be read by imageIO, then not image\n {\n return false;\n }\n return true;\n }", "public static boolean isMatrixType( ProjectDTO type )\n {\n return \"hudson.matrix.MatrixProject\".equals( type.getType() ); //$NON-NLS-1$\n }", "public boolean isRedstoneTorch() {\n return this.type == Type.REDSTONE_TORCH;\n }", "public boolean isTest() {\n\t\treturn this.operation instanceof MagicCriterion;\n\t}", "public boolean hasReinforcedStructure() {\n return (getStructureType() == EquipmentType.T_STRUCTURE_REINFORCED);\n }", "public boolean isProjectile(){\n\t\treturn (getSpeed() != -1);\t\t\n\t}", "boolean hasMetricTreatment();", "@java.lang.Override\n public boolean hasTransform2DValue() {\n return typeCase_ == 9;\n }", "boolean isManipulated();", "public boolean isDisponible() {\n if (tipo == CAMINO) return true;\n else return false;\n }", "public boolean isTargetRC() { return isTargetRC; }", "boolean hasTransformValue();", "@Override\n public boolean isValid() {\n if(width < 0){\n return false;\n }\n\n if(height < 0){\n return false;\n }\n\n //no null objects\n if(origin == null){\n return false;\n }\n\n if(color == null){\n return false;\n }\n\n //if texture doesn't exist, sprite is not buildable\n if(!Gdx.files.internal(texture).exists()){\n Gdx.app.log(TAG, \"Texture cannot be found: \" + texture);\n return false;\n }\n\n return true;\n }", "public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }", "boolean isKOd();", "boolean isThumbnail();", "private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}", "private boolean canCondenseTf()\n {\n if (!this.isRedstonePowered()) return false;\n\n TfCondenserRecipe recipe = this.getCurrentRecipe();\n if (recipe == null) return false;\n\n // Has enough ingredients?\n if (recipe.ingredient != null && ingredientTank.getFluidAmount() < recipe.ingredient.amount\n || nigariTank.getFluidAmount() < NIGARI_COST_MB) return false;\n\n // Check if an output item can be stacked to the output slot\n if (this.itemStacks[SLOT_TOFU_OUTPUT] == null) return true;\n\n if (!this.itemStacks[SLOT_TOFU_OUTPUT].isItemEqual(recipe.result)) return false;\n\n // Check if the stack will overflow\n int resultStacks = itemStacks[SLOT_TOFU_OUTPUT].stackSize + recipe.result.stackSize;\n return (resultStacks <= getInventoryStackLimit() && resultStacks <= recipe.result.getMaxStackSize());\n }", "public boolean hasImage(){\n //return true or false\n return mImageResource != NO_IMAGE_PROVIDED;\n }", "public boolean isAtmo() {\n return atmo;\n }", "@java.lang.Override\n public boolean hasTransform2DValue() {\n return typeCase_ == 9;\n }", "public boolean verifyEmptyToDoImage() {\n if (validateAttributeContain(imageEmptyToDo, \"src\", \"images/icons/clipboard.png\", \"Image Empty ToDo\")) {\n return true;\n }\n return false;\n }", "public static boolean isReconciliationPausedWithAnnotation(ObjectMeta metadata) {\n return Annotations.booleanAnnotation(metadata, ANNO_STRIMZI_IO_PAUSE_RECONCILIATION, false);\n }", "public boolean isChiefCaptured(){\n Chief chief = establishChief();\n return chief == null;\n }", "public boolean hasRegulars()\n {\n return hasImages(regulars);\n }", "public native boolean isGrayImage() throws MagickException;", "public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }", "private boolean isObjectABrick(GObject collider) {\n return collider != null;\n }", "public static final boolean isGoal(Transformation T) {\n\t\tdouble distX = T.getX() - Tf.getX();\n\t\tdouble distY = T.getY() - Tf.getY();\n\t\treturn Utility.isZero(Utility.distanceToOrigin(new Point2D.Double(distX, distY)))\n\t\t && Utility.angleEqual(T.getTheta(), Tf.getTheta());\n\t}", "@Override\n public boolean isTransforming() {\n return super.isTransforming() || desiredWorldPosition != null;\n }", "protected boolean isObject() {\n long mark = 0;\n try {\n mark = this.createMark();\n boolean bl = this.getObject() != null;\n return bl;\n }\n catch (MathLinkException e) {\n this.clearError();\n boolean bl = false;\n return bl;\n }\n finally {\n if (mark != 0) {\n this.seekMark(mark);\n this.destroyMark(mark);\n }\n }\n }", "boolean isProcessingInstruction(Object object);", "boolean isReflectable();", "private boolean isGoodState() {\n\t resetMask();\n\t checkHorizontal();\n\t checkVertical();\n\n\t for(int i = 0; i < maskArray.length; i++){\n\t for (int j = 0; j < maskArray[i].length; j++){\n\n\t if (maskArray[i][j] == 1){\n\t return false;\n\t }\n\n\t }\n\t }\n\n\t return true;\n }", "@MediumTest\n public void test_1314_3() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_false.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "public boolean hasImage() { return ImageResource != NO_IMAGE_PROVIDED; }", "public boolean isSmartCover() {\r\n ScoverState coverState = getCoverState();\r\n return coverState != null && coverState.type == 255;\r\n }", "public boolean hasImTrue() {\n return result.hasImTrue();\n }", "public boolean isItaDraw(){\n\t\tboolean flag=false;\n\t\tfor(int row=0;row<9;row++){\n\t\t\tfor(int column=0;column<25;column++){\n\t\t\t\tif(Board[row][column] == 'O'){\n\t\t\t\t\tflag=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflag=true;\n\t\t\t}\n\t\t\tif(flag==false)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (flag == true)\n\t\t\tSystem.out.println(\"It's a draw\");\n\t\treturn flag;\n\t}", "boolean isComposite();", "boolean isComposite();", "@Override\n\tpublic AbstractTroisFrommage createTroisFrommage() {\n\t\treturn new TroisFrommageSN();\n\t}", "public boolean isPaintable() {\n return modifiedEditor.isPaintable ();\n }", "@Test\n\tpublic void testImageFromPaintNet() throws IOException, URISyntaxException {\n\t\tfinal String filePath = \"img_orientation/view_20170929_124415.jpg\";\n\t\tURL url = this.getClass().getClassLoader().getResource(filePath);\n\t\tFile imgFile = new File(url.toURI());\n\t\tlogger.debug(\"File '{}' exists = {}\", filePath, imgFile.isFile());\n\t\tBufferedImage bi = TrpImageIO.read(imgFile);\n\t\t\n\t\tif(bi instanceof RotatedBufferedImage) {\n\t\t\t//if we are here this is broken\n\t\t\tAssert.fail(\"Image was erroneously rotated!\");\n\t\t}\n\t}", "public boolean isViewing() { RMShape p = getParent(); return p!=null && p.isViewing(); }", "@Override\r\n public boolean isClef ()\r\n {\r\n return ShapeSet.Clefs.contains(getShape());\r\n }", "public boolean isRun() {\n if (!isValid()) {\n return false;\n }\n else {\n if (tiles.get(0).getColour() == tiles.get(1).getColour()) {\n return true;\n } else {\n return false;\n }\n }\n }", "public boolean mo12928a(Model model) {\n return model.toString().startsWith(\"data:image\");\n }", "public boolean hasTexture()\r\n\t{\r\n\t\treturn texture != null;\r\n\t}", "public boolean testTilingscale(EIfcfillareastyletiles type) throws SdaiException;", "boolean isInputNeuron();", "public native boolean hasFrames() throws MagickException;", "public boolean hasRoboticon(){\r\n\t\treturn roboticon != null;\r\n\t}", "public boolean hasImage() {\n return mImageResourceID != NO_IMAGE_PROVIDED;\n }", "public boolean testTilingpattern(EIfcfillareastyletiles type) throws SdaiException;", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n CurrentData.REAL.reset();\n QQRobot.findBoard(RGB_MY_SPACE, CurrentData.REAL.board);\n QQRobot.findAndCleanBoard(CurrentData.REAL.board, CurrentData.REAL.tetromino, CurrentData.REAL.nextBlocks);\n QQRobot.findFutures(RGB_MY_SPACE, CurrentData.REAL.nextBlocks);\n\n if (CurrentData.REAL.tetromino.isValid()) {\n return true;\n } else {\n return false;\n }\n }", "final boolean is(Scalar scalar) {\n return scalar.is(targetType());\n }" ]
[ "0.6677724", "0.6061995", "0.5963319", "0.59124154", "0.5890691", "0.57813233", "0.5725202", "0.56790257", "0.560754", "0.559039", "0.5574281", "0.54581565", "0.5438204", "0.54106396", "0.5380694", "0.5369367", "0.5350106", "0.53408337", "0.53327316", "0.53198737", "0.5268021", "0.52412254", "0.5235065", "0.52224666", "0.5209316", "0.5183502", "0.51737934", "0.51242435", "0.5110396", "0.510175", "0.50977665", "0.5091292", "0.5090198", "0.5087503", "0.5069803", "0.50684386", "0.50655127", "0.505177", "0.5041352", "0.5036259", "0.5026452", "0.50153", "0.5008809", "0.5006061", "0.4992353", "0.4986802", "0.4980257", "0.4977385", "0.49729568", "0.49717125", "0.49652502", "0.49590644", "0.4948143", "0.49363074", "0.49347252", "0.4930954", "0.49308124", "0.49234566", "0.49109957", "0.4909992", "0.4902424", "0.48998845", "0.4897151", "0.48959586", "0.4891881", "0.488978", "0.48849618", "0.48760656", "0.48752356", "0.48741284", "0.48718125", "0.48713553", "0.48614645", "0.48587015", "0.48489076", "0.48487628", "0.48437807", "0.48297232", "0.48282427", "0.4825552", "0.4820118", "0.48121196", "0.48096356", "0.48096356", "0.4809143", "0.48020995", "0.48019117", "0.48003963", "0.47874686", "0.4787067", "0.47769842", "0.47651368", "0.475818", "0.47542176", "0.4753361", "0.4740632", "0.47333354", "0.47322902", "0.473133", "0.47284934" ]
0.6233486
1
Parse the header information for keyvalue pairs.
private void parseHeader() throws IOException { // //////////////////////////////////////////////////////////// // Administrative header info // //////////////////////////////////////////////////////////// // First 10 bytes reserved for preamble byte[] sixBytes = new byte[6]; keyBuffer.get(sixBytes, 0, 6); logger.log(new String(sixBytes) + "\n"); // says adac01 try { short labels = keyBuffer.getShort(); logger.log(Integer.toString(labels)); // Number of labels in header logger.log(Integer.toString(keyBuffer.get())); // Number of // sub-headers logger.log(Integer.toString(keyBuffer.get())); // Unused byte // For each header field available.. get them for (short i = 0; i < labels; i++) { // Attempt to find the next key... // ...the keynum (description) // ...the offset to the value ADACKey key = getKeys(); switch (key.getDataType()) { case ADACDictionary.BYTE: keyList.add(new ByteKvp(this, key)); break; case ADACDictionary.SHORT: keyList.add(new ShortKvp(this, key)); break; case ADACDictionary.INT: keyList.add(new IntKvp(this, key)); break; case ADACDictionary.FLOAT: keyList.add(new FloatKvp(this, key)); break; case ADACDictionary.EXTRAS: keyList.add(new ExtrasKvp(this, key)); break; } } } catch (IOException e) { logger.error("ADAC Decoder", "Failed to retrieve ADAC image file header. " + "Is this an ADAC image file?"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void parseHeader()\n {\n\n Hashtable table = new Hashtable();\n String[] lines = Utilities.splitString(header, \"\\r\\n\"); //Break everything into lines\n String[] line1 = Utilities.splitString(header, \" \"); //Break the 1st header line Ex: GET / HTTP/1.1\n method = line1[0].trim();\n file = line1[1].trim();\n Utilities.debugLine(\"WebServer.parseHeader(): \" + lines[0], DEBUG);\n\n //For the remainder of the headers, parse the requestFields.\n for (int i = 1; i < lines.length - 1; i++)\n {\n String[] tempLine = Utilities.splitStringOnce(lines[i], \":\");\n table.put(tempLine[0].trim(), tempLine[1].trim());\n }\n headerFields = table;\n }", "static Map<String, String> parseHeaderParams(String value) {\n\t\tif (value == null) {\n\t\t\treturn Map.of();\n\t\t}\n\t\tMap<String, String> params = new LinkedHashMap<>();\n\t\tfor (String part : value.split(\";\")) {\n\t\t\tString[] pair = part.trim().split(\"=\", 2);\n\t\t\tString val = \"\";\n\t\t\tif (pair.length == 2) {\n\t\t\t\tval = pair[1];\n\t\t\t\tif (val.charAt(0) == '\"') { // trim possible quotes\n\t\t\t\t\tval = val.substring(1, val.length() - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tparams.put(pair[0], val);\n\t\t}\n\t\treturn params;\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 }", "String[] getHeader(String key);", "protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "void setHeaderRaw(String rawHeaderData) throws ParsingException, RuntimeException {\n String key=null;\n String value=null;\n\n final int SP = 0x20; // 32 Space\n int i=0;\n int start=-1;\n boolean keySet = false;\n boolean keySetHard = false;\n while(i < rawHeaderData.length()){\n if(rawHeaderData.charAt(i)==':' && !keySet) {\n keySet = true;\n }\n else if(rawHeaderData.charAt(i)==SP && keySet){\n if(!keySetHard) {\n key = rawHeaderData.substring(0, i - 1); // begin and end index\n start = i + 1;\n }\n keySetHard = true;\n }\n\n i++;\n }\n\n if(keySet && start != -1){\n value = rawHeaderData.substring(start, i);\n }\n setHeader(key, value);\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "public static Map<String, String> getHeaderParameters(String headerContent) {\n\t\tif (headerContent == null)\n\t\t\treturn null;\n\t\tfinal String[] params = StringUtils.split(headerContent, ';');\n\t\tif (params == null || params.length == 0)\n\t\t\treturn null;\n\t\tfinal Map<String, String> nameValues = new LinkedHashMap<>();\n\t\tfor (String param : params) {\n\t\t\tif (param == null)\n\t\t\t\tcontinue;\n\t\t\tString[] nameValue = StringUtils.split(param, \"=\");\n\t\t\tif (nameValue == null || nameValue.length != 2)\n\t\t\t\tcontinue;\n\t\t\tString value = nameValue[1].trim();\n\t\t\tif (value.startsWith(\"\\\"\") && value.endsWith(\"\\\"\"))\n\t\t\t\tvalue = value.substring(1, value.length() - 1);\n\t\t\tnameValues.put(nameValue[0].trim().toLowerCase(), value);\n\t\t}\n\t\treturn nameValues;\n\t}", "static public String[] parseHeader(String value, String regexInclude, String regexExclude) {\n \n if (value == null)\n \t\treturn EMPTY_ARRAY;\n \tString[] properties = value.split(\",\");\n \tfor (int i = 0; i < properties.length; i++)\n \t{\n \t\tif (properties[i].indexOf(Constants.VERSION_ATTRIBUTE + \"=\") != -1)\n \t\t{\t// Version may have been split because it has spaces\n \t\t\tfor (int j = i + 1; j < properties.length; j++)\n \t\t\t{\n \t \t\tif (!properties[j].endsWith(\"\\\"\"))\n \t \t\t\tbreak;\n \t \t\t\tproperties[i] = properties[i] + \",\" + properties[j];\t// Version\t\n \t \t\t\tproperties[j] = \"\";\n \t\t\t}\n \t\t}\n \t\tif (regexExclude != null)\n \t\t if (properties[i].matches(regexExclude))\n \t\t properties[i] = \"\";\n if (regexInclude != null)\n if (!properties[i].matches(regexInclude))\n properties[i] = \"\";\n \t}\n \treturn properties;\n }", "public static Header parseHeader(String value, LineParser parser) throws ParseException {\n/* 430 */ Args.notNull(value, \"Value\");\n/* */ \n/* 432 */ CharArrayBuffer buffer = new CharArrayBuffer(value.length());\n/* 433 */ buffer.append(value);\n/* 434 */ return ((parser != null) ? parser : INSTANCE).parseHeader(buffer);\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 Header getHeaderByKey(String key);", "private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }", "private void processHeader(String header) {\n this.header = header + System.lineSeparator(); // Store the header for writing back.\n\n String[] headers = header.split(\"\\\",\\\"\");\n for (int i = 0; i < headers.length; i++) {\n String columnName = headers[i].replaceAll(\"\\\"\", \"\");\n this.headerMap.put(i, columnName);\n }\n }", "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 }", "private TreeMap parseSrcType(String acceptHeader)\n throws XDIMEException {\n\n // todo: this code is duplicated in AcceptParser. Refactor.\n\n TreeMap result = new TreeMap();\n\n StringTokenizer commas = new StringTokenizer(acceptHeader, \",\");\n while (commas.hasMoreTokens()) {\n\n // Parse a declaration in the form \"value;q=x.y\"\n String listValue = commas.nextToken();\n String name;\n\n Double qValue = new Double(1.0);\n\n // Search for the first ;\n // We expect the list value to have only one parameter - q\n int semicolon = listValue.indexOf(\";\");\n if (semicolon >= 0) {\n // We found a semicolon, so parse out the qvalue\n name = listValue.substring(0, semicolon).trim();\n String parameter = listValue.substring(semicolon + 1);\n StringTokenizer equals = new StringTokenizer(parameter,\n \"=\");\n if (equals.hasMoreTokens() &&\n equals.nextToken().trim().equals(\"q\") &&\n equals.hasMoreTokens()) {\n String qString = equals.nextToken().trim();\n try {\n double qFoundValue = Double.parseDouble(qString);\n if (qFoundValue < 0.0 || qFoundValue > 1.0) {\n throw new XDIMEException(exceptionLocalizer.format(\n \"invalid-q-value\",\n qString));\n } else {\n qValue = new Double(qFoundValue);\n }\n } catch (NumberFormatException e) {\n throw new XDIMEException(exceptionLocalizer.format(\n \"invalid-q-value\",\n qString),\n e);\n }\n } else {\n // else, ignore invalid q parameters\n }\n } else {\n name = listValue.trim();\n }\n\n result.put(qValue, name);\n }\n return result;\n }", "public static void readHeaderFields(InputStream in, HashMap headerfields) throws IOException, ProtocolException {\r\n\t\tString fieldname = null;\r\n\t\tint i;\r\n\t\tSimpleStringBuilder buffer = Toolkit.getInstance().createSimpleStringBuilder();\r\n\t\tboolean foundCR = false;\r\n\t\tboolean foundCRLF = false;\r\n\t\twhile (((i = in.read()) != -1)) {\r\n\t\t\tif (fieldname == null) {\r\n\t\t\t\tif (i == Specialchars.CR && foundCRLF) {\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tfoundCRLF = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (foundCR) {\r\n\t\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (i == Specialchars.COL) {\r\n\t\t\t\t\tfieldname = buffer.toString().toLowerCase();\r\n\t\t\t\t\tif (fieldname.length() == 0) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// no CTL (ascii 0-31) allowed for field-name\r\n\t\t\t\t// no separators allowed for token (see RFC2616 2.2)\r\n\t\t\t\tif ((i >= 0x00 && i <= 0x1F) || i == 0x28 || i == 0x29 || i == 0x3C || i == 0x3D || i == 0x3E || i == 0x40 || i == 0x2C || i == 0x3F || i == 0x3B || i == 0x2F || i == 0x5C || i == 0x5B || i == 0x5D || i == 0x7B || i == 0x7D || i == 0x22 || i == Specialchars.SP || i == Specialchars.HT) { //\r\n\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t}\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t} else {\r\n\t\t\t\tif (i == Specialchars.CR) {\r\n\t\t\t\t\tif (foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// check for new line end\r\n\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\tif (!foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (foundCRLF) {\r\n\t\t\t\t\t\t// double CRLF, header ends here\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (fieldname.startsWith(MIMEConstants.DEFAULT_HEADERFIELD_PREFIX)) {\r\n\t\t\t\t\t\theaderfields.put(fieldname, buffer.toTrimmedString().toLowerCase());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = false;\r\n\t\t\t\t\tfoundCRLF = true;\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tfieldname = null;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfoundCR = false;\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IOException(FAULT_MALFORMED_HEADERFIELD);\r\n\t}", "protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }", "private boolean parseHeaders() {\n\n // headers have format:\n // key: value CRLF\n\n // the list ends with an empty CRLF\n\n // so you can process headers as long as you have CRLFs\n\n // put each header in this.request.getHeaders()\n\n // return true if you encounter a CRLF on an empty line\n\n // don't forget to consume the used lines from the buffer\n\n return false;\n }", "public HeaderEntry(String key, String value)\n\t{\n\t\tif(key == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"The Key can't be null\");\n\t\t}\n\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t}", "@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }", "java.lang.String getHeader();", "private HTTPHeaderEntry extractHeader(String headerStr) {\n \n \t\tHTTPHeaderEntry headerEntry = null;\n \t\tString[] each = headerStr.split( \": \" );\n \t\tif ( each[0].equals( HeaderEntry.CONTENT_TYPE.toString() ) ) {\n \t\t\theaderEntry = new HTTPHeaderEntry( HeaderEntry.CONTENT_TYPE, each[1] );\n \t\t}\n \t\telse if ( each[0].equals( HeaderEntry.DATE.toString() ) ) {\n \t\t\theaderEntry = new HTTPHeaderEntry( HeaderEntry.DATE, each[1] );\n \t\t}\n \t\telse if ( each[0].equals( ResponseHeaderEntry.CONTENT_LENGTH.toString() ) ) {\n \t\t\theaderEntry = new HTTPHeaderEntry( ResponseHeaderEntry.CONTENT_LENGTH, Integer.parseInt( each[1] ) );\n \t\t}\n \n \t\theader.add( headerEntry );\n \t\treturn headerEntry;\n \t}", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void parseHeader(String line) throws BugTrap {\n\t\t\n\t\tLineTokenizer tokenizer = new LineTokenizer(line);\n\t\t\n\t\tif (tokenizer.isAccessModifier())\n\t\t\taccess = tokenizer.parseAccessModifier();\n\n\t\tif (!tokenizer.isKeyword(StartKeyword)) throw new BugTrap(this, StartKeyword + \": Keyword missing\");\n\t\ttokenizer.parseKeyword(StartKeyword);\n\n\t\tif (!tokenizer.isName()) throw new BugTrap(this, \"name missing\");\n\t\tname = tokenizer.parseName();\n\n\t\tif (!tokenizer.isParameters()) throw new BugTrap(this, \"missing or bad parameter list\");\n\t\tparametersList = tokenizer.parseParameters();\n\n\t\tif (Debug) IOUtils.println(getClass().getSimpleName() + \" \" + name + \" parsed header: \" + line);\n\t}", "protected void setHeaderInfo(String header)\n throws AbnormalTerminationException {\n // strip comment and unnecessary spaces\n String actualLine = StringUtils.trimSpaces(Comment.stripComment(header));\n // split off the name\n int nameEnd = 0;\n\n while (nameEnd < actualLine.length() && ! StringUtils.isSpace(actualLine.charAt(nameEnd))) {\n nameEnd += 1;\n }\n\n String name = actualLine.substring(0, nameEnd);\n String params = actualLine.substring(nameEnd);\n\n if (! Name.isName(name)) {\n throw new AbnormalTerminationException(\"Ongeldige macronaam: \" + name);\n }\n\n this.setName(name);\n // parse the formal parameters\n StringTokenizer tokenizer = new StringTokenizer(params, \",\");\n List formalParams = new ArrayList();\n\n while (tokenizer.hasMoreTokens()) {\n String param = StringUtils.trimSpaces(tokenizer.nextToken());\n\n if (! Name.isName(param)) {\n throw new AbnormalTerminationException(\"Geen aanvaardbare naam voor een \"\n + \"formele parameter: \" + param);\n }\n\n formalParams.add(param);\n }\n\n this.setFormalParameters(formalParams);\n }", "private AcceptHeader(String headerName, String headerValue)\n\t\t{\n\t\t\tthis.acceptedTypes = new HashMap<>();\n\t\t\tthis.headerName = headerName;\n\t\t\t\n\t\t\t// Parses the headers (if possible)\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\tString[] contentTypes = headerValue.split(\"\\\\,\");\n\t\t\t\tfor (String contentTypeString : contentTypes)\n\t\t\t\t{\n\t\t\t\t\tString[] typeAndArgs = contentTypeString.split(\"\\\\;\");\n\t\t\t\t\tString contentType = typeAndArgs[0].trim();\n\t\t\t\t\tif (typeAndArgs.length < 2)\n\t\t\t\t\t\tthis.acceptedTypes.put(contentType, 1.0);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (int i = 1; i < typeAndArgs.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] argumentAndValue = typeAndArgs[i].split(\"\\\\=\");\n\t\t\t\t\t\t\tString argument = argumentAndValue[0].trim();\n\t\t\t\t\t\t\tif (argument.equals(\"q\") && argumentAndValue.length > 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.acceptedTypes.put(contentType, Double.parseDouble(\n\t\t\t\t\t\t\t\t\t\targumentAndValue[1].trim()));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static void validateHeaderValue(String headerValue) {\n //Check to see if the value is null\n if (headerValue == null) {\n throw new NullPointerException(\"Header values cannot be null\");\n }\n\n /*\n * Set up the state of the validation\n *\n * States are as follows:\n *\n * 0: Previous character was neither CR nor LF\n * 1: The previous character was CR\n * 2: The previous character was LF\n */\n int state = 0;\n\n //Start looping through each of the character\n\n for (int index = 0; index < headerValue.length(); index++) {\n char character = headerValue.charAt(index);\n\n //Check the absolutely prohibited characters.\n switch (character) {\n case 0x0b: // Vertical tab\n throw new IllegalArgumentException(\n \"Header value contains a prohibited character '\\\\v': \" + headerValue);\n case '\\f':\n throw new IllegalArgumentException(\n \"Header value contains a prohibited character '\\\\f': \" + headerValue);\n default:\n }\n\n // Check the CRLF (HT | SP) pattern\n switch (state) {\n case 0:\n switch (character) {\n case '\\r':\n state = 1;\n break;\n case '\\n':\n state = 2;\n break;\n default:\n }\n break;\n case 1:\n switch (character) {\n case '\\n':\n state = 2;\n break;\n default:\n throw new IllegalArgumentException(\n \"Only '\\\\n' is allowed after '\\\\r': \" + headerValue);\n }\n break;\n case 2:\n switch (character) {\n case '\\t':\n case ' ':\n state = 0;\n break;\n default:\n throw new IllegalArgumentException(\n \"Only ' ' and '\\\\t' are allowed after '\\\\n': \" + headerValue);\n }\n break;\n default:\n }\n }\n\n if (state != 0) {\n throw new IllegalArgumentException(\n \"Header value must not end with '\\\\r' or '\\\\n':\" + headerValue);\n }\n }", "public static HashMap<String, String> makehead(ArrayList<String> head){\n\t\n\t\tHashMap<String, String> header = new HashMap<String, String>();\n\t\t\t\n\t\tString[] headerKeyValue;\n\t \tString mostrecentKey = \"\";\n\t \t\n\t \tfor(String request : head){ \n\t \t\t//while((request = reader.readLine()) != null ){ \t \t\t \n\t \t\theaderKeyValue = request.split(\":\",2);\n\t \t\tif(headerKeyValue.length > 2){ \t\t\t \n\t \t\t\treturn null;\n\t \t\t}\n\t \t\telse if (headerKeyValue.length == 2){\n\t \t\t\tString key = headerKeyValue[0].trim().toUpperCase(); \n\t\t\t \n\t \t\t\tString value = headerKeyValue[1].trim(); \t\t\t\n\t\t\t \n\t \t\t\t//CASE handling when multiple headers have same keys, we append all the values by comma separation\n\t \t\t\tif((header.containsKey(key))){\n\t \t\t\t\tString initialvalue = header.get(key);\n\t \t\t\t\theader.put(key, initialvalue +\", \" + value); \n\t\t\t\t \n\t \t\t\t}\n\t\t\t \n\t \t\t\telse if(!key.equals(\"\")){ \t\t\t\t\t \n\t \t\t\t\tmostrecentKey = key;\n\t \t\t\t\theader.put(key, value); //check if we want to handle upper case or not // check multiple same keys\n\t \t\t\t}\n\t\t\t\t \t\t\t \n\t \t\t} \t\t \n\t\t \n\t \t\telse if(headerKeyValue.length == 1){ \n\t\t\t \n\t \t\t\tif(header.containsKey(mostrecentKey)&& Character.isWhitespace(headerKeyValue[0].charAt(0))){ \t\t\t\t \n\t \t\t\t\tString mostrecentValue = header.get(mostrecentKey); \n\t \t\t\t\t//System.out.println(headerKeyValue[0] + \" rmp3\");\n\t \t\t\t\theader.put(mostrecentKey,mostrecentValue + \" \" + headerKeyValue[0].trim()); // i think i missed the space here in MS1 \t\t\t\t \n\t\t\t\t \n\t \t\t\t} \t\t \t\t\t \t\t\t \n\t \t\t}\t \n\t \t} \n\t\n\t \treturn header;\n\t}", "@Test\n\tpublic void testParseHeader() throws IOException {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tcheckParseHeader(\"\", \"\", \"\", false, \"\");\n\t\tcheckParseHeader(\"PUT /reviewsearch\", \"PUT\", \"/reviewsearch\", false, \"\");\n\t\tcheckParseHeader(\"PULL /slackbot\", \"PULL\", \"/slackbot\", false, \"\");\n\t\tcheckParseHeader(\"GET /slackbot\", \"GET\", \"/slackbot\", false, \"\");\n\t\tcheckParseHeader(\"POST /slackbot\", \"POST\", \"/slackbot\", false, \"\");\n\t\tcheckParseHeader(\"POST /reviewsearch\", \"POST\", \"/reviewsearch\", false, \"\");\n\t\tcheckParseHeader(\"POST /reviewsearch?query=jumpers\", \"POST\", \"/reviewsearch\", true, \"query\");\n\t\tcheckParseHeader(\"POST /reviewsearch?query=jumpers&unknown=unknown\", \"POST\", \"/reviewsearch\", true, \"unknown\");\n\t\tcheckParseHeader(\"POST /reviewsearch?error\", \"POST\", \"/reviewsearch\", false, \"error\");\n\t\tcheckParseHeader(\"GET /reviewsearch?query=jumpers\", \"GET\", \"/reviewsearch\", true, \"query\");\n\t\tcheckParseHeader(\"GET /\", \"GET\", \"/\", false, \"\");\n\t\t\n\t}", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "public Map<String, String> createHeadersFromString(String headersAndValues) {\n\n if (headersAndValues == null || headersAndValues.isEmpty()) return Collections.emptyMap();\n\n final StringTokenizer token = new StringTokenizer(headersAndValues, \"@\");\n\n final Map<String, String> theHeaders = new HashMap<String, String>(token.countTokens());\n\n while (token.hasMoreTokens()) {\n final String headerAndValue = token.nextToken();\n if (!headerAndValue.contains(\":\"))\n throw new IllegalArgumentException(\n \"Request headers wrongly configured, missing separator :\" + headersAndValues);\n\n final String header = headerAndValue.substring(0, headerAndValue.indexOf(\":\"));\n final String value =\n headerAndValue.substring(headerAndValue.indexOf(\":\") + 1, headerAndValue.length());\n theHeaders.put(header, value);\n }\n\n return theHeaders;\n\n }", "private void initializeKnownHeaders() {\r\n needParceHeader = true;\r\n \r\n addMainHeader(\"city\", getPossibleHeaders(DataLoadPreferences.NH_CITY));\r\n addMainHeader(\"msc\", getPossibleHeaders(DataLoadPreferences.NH_MSC));\r\n addMainHeader(\"bsc\", getPossibleHeaders(DataLoadPreferences.NH_BSC));\r\n addMainIdentityHeader(\"site\", getPossibleHeaders(DataLoadPreferences.NH_SITE));\r\n addMainIdentityHeader(\"sector\", getPossibleHeaders(DataLoadPreferences.NH_SECTOR));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_CI, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_CI));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_LAC, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_LAC));\r\n addMainHeader(INeoConstants.PROPERTY_LAT_NAME, getPossibleHeaders(DataLoadPreferences.NH_LATITUDE));\r\n addMainHeader(INeoConstants.PROPERTY_LON_NAME, getPossibleHeaders(DataLoadPreferences.NH_LONGITUDE));\r\n // Stop statistics collection for properties we will not save to the sector\r\n addNonDataHeaders(1, mainHeaders);\r\n \r\n // force String types on some risky headers (sometimes these look like integers)\r\n useMapper(1, \"site\", new StringMapper());\r\n useMapper(1, \"sector\", new StringMapper());\r\n \r\n // Known headers that are sector data properties\r\n addKnownHeader(1, \"beamwidth\", getPossibleHeaders(DataLoadPreferences.NH_BEAMWIDTH), false);\r\n addKnownHeader(1, \"azimuth\", getPossibleHeaders(DataLoadPreferences.NH_AZIMUTH), false);\r\n }", "private void collectHeaders(\n DirectBuffer name,\n DirectBuffer value)\n {\n if (!error())\n {\n String nameStr = name.getStringWithoutLengthUtf8(0, name.capacity());\n String valueStr = value.getStringWithoutLengthUtf8(0, value.capacity());\n // TODO cookie needs to be appended with ';'\n headers.merge(nameStr, valueStr, (o, n) -> String.format(\"%s, %s\", o, n));\n }\n }", "public boolean isHeaderParsed();", "Map<String, List<String>> getHeaders();", "public static RequestSOAPHeader parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n RequestSOAPHeader object =\r\n new RequestSOAPHeader();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName!=null){\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1){\r\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\r\n \r\n if (!\"RequestSOAPHeader\".equals(type)){\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (RequestSOAPHeader)cn.com.huawei.www.schema.common.v2_1.ExtensionMapper.getTypeObject(\r\n nsUri,type,reader);\r\n }\r\n \r\n\r\n }\r\n \r\n\r\n }\r\n\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n \r\n reader.next();\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"spId\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setSpId(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"spPassword\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setSpPassword(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"serviceId\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setServiceId(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"timeStamp\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setTimeStamp(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"OA\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setOA(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"oauth_token\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setOauth_token(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"FA\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setFA(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"token\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setToken(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"watcher\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setWatcher(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"presentity\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setPresentity(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"authId\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setAuthId(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"linkid\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setLinkid(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"presentid\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setPresentid(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://www.huawei.com.cn/schema/common/v2_1\",\"msgType\").equals(reader.getName())){\r\n \r\n java.lang.String content = reader.getElementText();\r\n \r\n object.setMsgType(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content));\r\n \r\n reader.next();\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n object.setMsgType(java.lang.Integer.MIN_VALUE);\r\n \r\n }\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n \r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "String getHeader(String headerName);", "Map<String, String> getHeaders();", "private void readHeader() {\n version = \"\";\n XmlNode node = _document.SelectSingleNode(\"//ovf:Envelope\", _xmlNS);\n if (node != null) {\n version = node.attributes.get(\"ovf:version\").getValue();\n }\n }", "private Map<String, MetricHeaderInfo> processCSVFileDataHeader(DbClient dbClient, StorageSystem storageSystem, String directorName,\n List<String> headers) {\n Map<String, MetricHeaderInfo> metricToObjectMap = new HashMap<>();\n for (String header : headers) {\n Matcher matcher = METRIC_NAME_PATTERN.matcher(header);\n if (matcher.matches()) {\n String name = matcher.group(1);\n // Limit the processing to only those metrics that we care about\n if (!METRICS_NAMES_TO_GATHER.contains(name)) {\n continue;\n }\n\n String objectName = matcher.group(2);\n String units = matcher.group(3);\n if (Strings.isNullOrEmpty(objectName)) {\n objectName = EMPTY;\n }\n StorageHADomain vplexDirector = lookupVPlexDirectorByName(dbClient, storageSystem, directorName);\n if (objectName.equals(EMPTY)) {\n // This applies to the director\n MetricHeaderInfo headerInfo = new MetricHeaderInfo();\n headerInfo.type = MetricHeaderInfo.Type.DIRECTOR;\n headerInfo.director = vplexDirector;\n headerInfo.units = units;\n metricToObjectMap.put(header, headerInfo);\n } else {\n // Let's assume that this is for a StoragePort with name 'objectName'\n StoragePort storagePort = lookupVPlexFrontStoragePortByName(dbClient, vplexDirector, objectName);\n if (storagePort != null) {\n MetricHeaderInfo headerInfo = new MetricHeaderInfo();\n headerInfo.type = MetricHeaderInfo.Type.PORT;\n headerInfo.director = vplexDirector;\n headerInfo.port = storagePort;\n headerInfo.units = units;\n metricToObjectMap.put(header, headerInfo);\n }\n }\n }\n }\n return metricToObjectMap;\n }", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "public HeaderData get(String key){\r\n\t\treturn map.get(key);\r\n\t}", "private List<Variable> headerVariables(String headerLine) {\n LinkedList<Variable> vars = new LinkedList<Variable>();\n Matcher matcher = headerVariablePattern.matcher(headerLine);\n while (matcher.find()) {\n String varname = matcher.group(1);\n if (null != varname) {\n Map<String,Object> attrs = new TreeMap<String,Object>();\n // assuming float for all var for now\n Variable var = new Variable(varname, NCUtil.XType.NC_FLOAT, attrs);\n vars.add(var);\n }\n }\n return vars;\n }", "public void readFromStream(DataInputStream istream) throws IOException{\r\n headerFields = new HashMap();\r\n messageBody = null;\r\n String line;\r\n while(!(line = readLine(istream)).equals(\"\")){\r\n String fieldName = line.substring(0,line.indexOf(\":\"));\r\n String fieldValue = line.substring(line.indexOf(\" \")+1,line.length());\r\n setHeaderField(fieldName, fieldValue);\r\n //System.out.println(fieldName + \": \" +fieldValue);\r\n }\r\n readBody(istream);\r\n }", "private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }", "static Headers readHeaders(InputStream in) throws IOException {\n\t\tHeaders headers = new Headers();\n\t\tString line;\n\t\twhile (!(line = readLine(in, false)).isEmpty()) {\n\t\t\tString[] parts = line.split(\":\", 2);\n\t\t\tif (parts.length != 2) {\n\t\t\t\tthrow new WebException(StatusCode.BAD_REQUEST, \"invalid request header: \" + line);\n\t\t\t}\n\t\t\theaders.add(parts[0], parts[1].trim());\n\t\t}\n\t\treturn headers;\n\t}", "void setHeader(String headerName, String headerValue);", "AuthenticationTokenInfo authenticationTokenInfo(String headerToken);", "public void processHeader()\n {\n try{\n String line = oReader.readLine();\n String regrex = line.replaceAll(\"[^0-9]+\",\"\"); //only looking at the numbers\n this.maxmem = Integer.parseInt(regrex.substring(4, 8), 16);\n mem = new MainMemory(maxmem);\n\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "private static NameValue parseCookieNameValue(String str) {\n int idx = str.indexOf(\"=\");\n if (idx < 0) {\n // If there is no = symbol in the string at all, browsers treat it as the cookie with the empty-string name\n return new Header(\"\", str);\n } else {\n return new Header(str.substring(0, idx), str.substring(idx + 1));\n }\n }", "public void headerValidation(String headerName, String headerValue){\n\t\tresponseFilePath = AssertionsUtil.responseFilePath;\n\t\tString jsonResponseString = readJsonResponse(responseFilePath);\n\t\ttry {\n\t\t\tList headers = JsonPath.read(jsonResponseString, \"$.headers\");\n\t\t\tboolean isHeaderFlag=false, isValueFlag=false;\n\t\t\tString actualValue=\"\";\n\t\t\tfor(int i=0; i<headers.size(); i++){\n\t\t\t\tif(JsonPath.read(jsonResponseString, \"$.headers[\"+i+\"].name\").equals(headerName)){\n\t\t\t\t\tisHeaderFlag = true;\n\t\t\t\t\tactualValue = JsonPath.read(jsonResponseString, \"$.headers[\"+i+\"].value\");\n\t\t\t\t\tif(actualValue.equals(headerValue)){\n\t\t\t\t\t\tisValueFlag = true;\n\t\t\t\t\t\treportObj.AddDataToTestReport(\"HeaderValidation Assertion: Expected value: \\\"\"+ headerValue +\"\\\" for Header: \\\"\"+ headerName+\"\\\"\"+\" matches with actual value \\\"\"+ actualValue +\"\\\"\", true);\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\tif(!isHeaderFlag){\n\t\t\t\treportObj.AddDataToTestReport(\"HeaderValidation Assertion: No such Header Type:\\\"\"+ headerName +\"\\\" exists in reponse header\", false);\n\t\t\t}\n\t\t\tif(!isValueFlag && isHeaderFlag){\n\t\t\t\treportObj.AddDataToTestReport(\"HeaderValidation Assertion: Expected value: \\\"\"+ headerValue +\"\\\" for Header: \\\"\"+ headerName+\"\\\"\"+\" does not match with actual value \\\"\"+ actualValue +\"\\\"\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\treportObj.AddDataToTestReport(\"Exception in HeaderValidation Assertion: \"+e.getMessage(), false);\n\t\t}\n\t\t \n\t}", "public void storeResponseHeaderInto(Properties props, String prefix) {\n MultiValueMap<String,String> map = new MultiValueMap<String,String>();\n Header[] headers = method.getResponseHeaders();\n for (int ix = 0; ix < headers.length; ix++) {\n Header hdr = headers[ix];\n String key = hdr.getName();\n String value = hdr.getValue();\n if (value!=null) {\n // only store headers with values\n // qualify header names to avoid conflict with our properties\n\tif (key == null) {\n\t key = \"header_\" + ix;\n\t}\n\tString propKey = (prefix == null) ? key : prefix + key;\n\tif (!singleValuedHdrs.isEmpty() &&\n\t singleValuedHdrs.contains(key.toLowerCase())) {\n\t map.remove(propKey);\n\t}\n\tmap.put(propKey, value);\n }\n }\n // now combine multiple values into comma-separated string\n for (String key : map.keySet()) {\n Collection<String> val = map.getCollection(key);\n props.setProperty(key, ((val.size() > 1)\n\t\t\t ? StringUtil.separatedString(val, \",\")\n\t\t\t : CollectionUtil.getAnElement(val)));\n }\n }", "protected void parse() {\n\t\tcustomUserAgent = getConfig().getString(CUSTOM_HTTP_HEADER_USER_AGENT, \"\");\r\n\t}", "public static com.google.android.exoplayer2.metadata.icy.IcyHeaders parse(java.util.Map<java.lang.String, java.util.List<java.lang.String>> r13) {\n /*\n java.lang.String r0 = \"Invalid metadata interval: \"\n java.lang.String r1 = \"icy-br\"\n java.lang.Object r1 = r13.get(r1)\n java.util.List r1 = (java.util.List) r1\n java.lang.String r2 = \"IcyHeaders\"\n r3 = -1\n r4 = 1\n r5 = 0\n if (r1 == 0) goto L_0x0051\n java.lang.Object r1 = r1.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n int r6 = java.lang.Integer.parseInt(r1) // Catch:{ NumberFormatException -> 0x0039 }\n int r6 = r6 * 1000\n if (r6 <= 0) goto L_0x0021\n r1 = 1\n goto L_0x0037\n L_0x0021:\n java.lang.StringBuilder r7 = new java.lang.StringBuilder // Catch:{ NumberFormatException -> 0x003a }\n r7.<init>() // Catch:{ NumberFormatException -> 0x003a }\n java.lang.String r8 = \"Invalid bitrate: \"\n r7.append(r8) // Catch:{ NumberFormatException -> 0x003a }\n r7.append(r1) // Catch:{ NumberFormatException -> 0x003a }\n java.lang.String r7 = r7.toString() // Catch:{ NumberFormatException -> 0x003a }\n com.google.android.exoplayer2.util.Log.w(r2, r7) // Catch:{ NumberFormatException -> 0x003a }\n r1 = 0\n r6 = -1\n L_0x0037:\n r7 = r6\n goto L_0x0053\n L_0x0039:\n r6 = -1\n L_0x003a:\n java.lang.StringBuilder r7 = new java.lang.StringBuilder\n r7.<init>()\n java.lang.String r8 = \"Invalid bitrate header: \"\n r7.append(r8)\n r7.append(r1)\n java.lang.String r1 = r7.toString()\n com.google.android.exoplayer2.util.Log.w(r2, r1)\n r7 = r6\n r1 = 0\n goto L_0x0053\n L_0x0051:\n r1 = 0\n r7 = -1\n L_0x0053:\n java.lang.String r6 = \"icy-genre\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n r8 = 0\n if (r6 == 0) goto L_0x0067\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r9 = r1\n r1 = 1\n goto L_0x0068\n L_0x0067:\n r9 = r8\n L_0x0068:\n java.lang.String r6 = \"icy-name\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x007b\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r10 = r1\n r1 = 1\n goto L_0x007c\n L_0x007b:\n r10 = r8\n L_0x007c:\n java.lang.String r6 = \"icy-url\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x008f\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r11 = r1\n r1 = 1\n goto L_0x0090\n L_0x008f:\n r11 = r8\n L_0x0090:\n java.lang.String r6 = \"icy-pub\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x00a9\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n java.lang.String r6 = \"1\"\n boolean r1 = r1.equals(r6)\n r12 = r1\n r1 = 1\n goto L_0x00aa\n L_0x00a9:\n r12 = 0\n L_0x00aa:\n java.lang.String r6 = \"icy-metaint\"\n java.lang.Object r13 = r13.get(r6)\n java.util.List r13 = (java.util.List) r13\n if (r13 == 0) goto L_0x00ea\n java.lang.Object r13 = r13.get(r5)\n java.lang.String r13 = (java.lang.String) r13\n int r5 = java.lang.Integer.parseInt(r13) // Catch:{ NumberFormatException -> 0x00d8 }\n if (r5 <= 0) goto L_0x00c2\n r3 = r5\n goto L_0x00d5\n L_0x00c2:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ NumberFormatException -> 0x00d7 }\n r4.<init>() // Catch:{ NumberFormatException -> 0x00d7 }\n r4.append(r0) // Catch:{ NumberFormatException -> 0x00d7 }\n r4.append(r13) // Catch:{ NumberFormatException -> 0x00d7 }\n java.lang.String r4 = r4.toString() // Catch:{ NumberFormatException -> 0x00d7 }\n com.google.android.exoplayer2.util.Log.w(r2, r4) // Catch:{ NumberFormatException -> 0x00d7 }\n r4 = r1\n L_0x00d5:\n r1 = r4\n goto L_0x00ea\n L_0x00d7:\n r3 = r5\n L_0x00d8:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r13)\n java.lang.String r13 = r4.toString()\n com.google.android.exoplayer2.util.Log.w(r2, r13)\n L_0x00ea:\n if (r1 == 0) goto L_0x00f8\n com.google.android.exoplayer2.metadata.icy.IcyHeaders r13 = new com.google.android.exoplayer2.metadata.icy.IcyHeaders\n r6 = r13\n r8 = r9\n r9 = r10\n r10 = r11\n r11 = r12\n r12 = r3\n r6.<init>(r7, r8, r9, r10, r11, r12)\n r8 = r13\n L_0x00f8:\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.metadata.icy.IcyHeaders.parse(java.util.Map):com.google.android.exoplayer2.metadata.icy.IcyHeaders\");\n }", "public IPAuthenticationHeader(final ByteBuffer buffer) throws ParseException {\n super(consume(buffer, ((HeaderLength.get(buffer) + 2) * 4)), IP_PROTOCOL_NUMBER);\n\n if (logger.isLoggable(Level.FINER)) {\n logger.finer(this.log.entry(\"IPAuthenticationHeader.IPAuthenticationHeader\", buffer));\n logState(logger, Level.FINER);\n }\n }", "@Override\n public RecordType parseMetadata() {\n \n this.stationIndex = StationLookup.lookup(getStationId(this.filename));\n \n try {\n reader.mark(READ_AHEAD_LIMIT);\n String line = null;\n boolean headerRead = false;\n List<Variable> vars = null;\n while (null != (line = reader.readLine())) {\n Matcher matcher = headerLinePattern.matcher(line);\n if (matcher.matches()) {\n vars = headerVariables(matcher.group(1));\n reader.mark(READ_AHEAD_LIMIT);\n headerRead = true;\n }\n else if (headerRead) {\n matcher = dataLinePattern.matcher(line);\n if (matcher.matches()) {\n String date = matcher.group(1);\n Instant timestep = Instant.parse(date, getInputDateFormatter());\n this.baseDate = timestep;\n \n RecordType recordType = new RecordType(\"days since \" + baseDate.toString());\n for (Variable var : vars) {\n recordType.addType(var);\n }\n \n reader.reset();\n return recordType;\n }\n }\n }\n \n }\n catch (IOException ex) {\n LOG.debug(\"Error reading metadata\", ex);\n }\n return null;\n }", "protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }", "public interface HttpHeaderValues {\n\n /**\n * {@code \"keep-alive\"}.\n */\n String CONNECTION_KEEP_ALIVE = \"keep-alive\";\n\n /**\n * {@code \"Bearer\"}.\n */\n String AUTHORIZATION_PREFIX_BEARER = \"Bearer\";\n\n /**\n * {@code \"Basic\"}.\n */\n String AUTHORIZATION_PREFIX_BASIC = \"Basic\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.1\">Rfc 7234 section-5.2.1.1</a>\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.8\">Rfc 7234 section-5.2.2.8</a>\n */\n String CACHE_MAX_AGE = \"max-age\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.2\">Rfc 7234 section-5.2.1.2</a>\n */\n String CACHE_MAX_STALE = \"max-stale\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.3\">Rfc 7234 section-5.2.1.3</a>\n */\n String CACHE_MIN_FRESH = \"min-fresh\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.1\">Rfc 7234 section-5.2.2.1</a>\n */\n String CACHE_MUST_REVALIDATE = \"must-revalidate\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.4\">Rfc 7234 section-5.2.1.4</a>\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.2\">Rfc 7234 section-5.2.2.2</a>\n */\n String CACHE_NO_CACHE = \"no-cache\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.5\">Rfc 7234 section-5.2.1.5</a>\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.3\">Rfc 7234 section-5.2.2.3</a>\n */\n String CACHE_NO_STORE = \"no-store\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.6\">Rfc 7234 section-5.2.1.6</a>\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.4\">Rfc 7234 section-5.2.2.4</a>\n */\n String CACHE_NO_TRANSFORM = \"no-transform\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.1.7\">Rfc 7234 section-5.2.1.7</a>\n */\n String CACHE_ONLY_IF_CACHED = \"only-if-cached\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.6\">Rfc 7234 section-5.2.2.6</a>\n */\n String CACHE_PRIVATE = \"private\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.7\">Rfc 7234 section-5.2.2.7</a>\n */\n String CACHE_PROXY_REVALIDATE = \"proxy-revalidate\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.5\">Rfc 7234 section-5.2.2.5</a>\n */\n String CACHE_PUBLIC = \"proxy-revalidate\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc7234#section-5.2.2.9\">Rfc 7234 section-5.2.2.9</a>\n */\n String CACHE_S_MAXAGE = \"s-maxage\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc5861#section-4\">RFC5861, Section 4</a>\n */\n String CACHE_STALE_IF_ERROR = \"stale-if-error\";\n\n /**\n * @see <a href=\"https://tools.ietf.org/html/rfc5861#section-3\">RFC5861, Section 3</a>\n */\n String CACHE_STALE_WHILE_REVALIDATE = \"stale-while-revalidate\";\n}", "private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }", "static Map<String, Cookie> parseCookies(Headers headers) {\n\t\tMap<String, String> params = parseHeaderParams(headers.get(HeaderName.COOKIE));\n\t\tMap<String, Cookie> cookies = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, String> entry : params.entrySet()) {\n\t\t\tif (!entry.getValue().isEmpty()) {\n\t\t\t\tcookies.put(entry.getKey(), new Cookie(entry.getKey(), entry.getValue()));\n\t\t\t}\n\t\t}\n\t\treturn cookies;\n\t}", "public void setHeaderValue(java.lang.String headerValue) {\r\n this.headerValue = headerValue;\r\n }", "public ETag deserializeHeaderValue(String etagHeader);", "private static String [] getCommaSeparatedMultipleHeaderValues(final HttpServletRequest request, final String headerName) {\n String value = request.getHeader(headerName);\n\n if (value == null) {\n return null;\n }\n\n String [] tokens = value.split(\",\");\n\n for (int i = 0; i < tokens.length; i++) {\n tokens[i] = tokens[i].trim();\n }\n\n return tokens;\n }", "public static void parseValue(String s) throws FileInvalidException {\r\n\t\tif (s.indexOf('=') == -1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString key = s.substring(0, s.indexOf('='));\r\n\t\t\r\n\t\t// Handles empty field.\r\n\t\tif (s.indexOf('{') == -1 || s.indexOf('}') == -1 || s.indexOf('}') - s.indexOf('{') < 2) {\r\n\t\t\tthrow new FileInvalidException(\"Field \\\"\" + key + \"\\\" is empty.\");\r\n\t\t}\r\n\r\n\t\tString value = s.substring(s.indexOf('{') + 1, s.indexOf('}'));\r\n\r\n\t\tswitch(key) {\r\n\t\tcase \"author\": \r\n\t\t\tauthor = value;\r\n\t\t\tbreak;\r\n\t\tcase \"journal\": \r\n\t\t\tjournal = value;\r\n\t\t\tbreak;\r\n\t\tcase \"title\": \r\n\t\t\ttitle = value;\r\n\t\t\tbreak;\r\n\t\tcase \"year\": \r\n\t\t\tyear = value;\r\n\t\t\tbreak;\r\n\t\tcase \"volume\": \r\n\t\t\tvolume = value;\r\n\t\t\tbreak;\r\n\t\tcase \"number\": \r\n\t\t\tnumber = value;\r\n\t\t\tbreak;\r\n\t\tcase \"pages\": \r\n\t\t\tpages = value;\r\n\t\t\tbreak;\r\n\t\tcase \"doi\": \r\n\t\t\tdoi = value;\r\n\t\t\tbreak;\r\n\t\tcase \"ISSN\": \r\n\t\t\tISSN = value;\r\n\t\t\tbreak;\r\n\t\tcase \"month\": \r\n\t\t\tmonth = value;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "public void parse(String content, String separator, NumberFormat numberFormat) throws Exception {\r\n\t\t\r\n\t\tScanner scanner = new Scanner(content);\r\n\t\t\r\n\t\theader = new Header();\r\n\t\t\r\n\t\tif(rows.size() > 0) {\r\n\t\t\trows.clear();\r\n\t\t}\r\n\t\t\r\n\t\tPattern metaPattern = Pattern.compile(\"'.*\");\r\n\t\tPattern headerPattern = Pattern.compile(\"'(.*)=([^;]*);*\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(scanner.hasNextLine()) {\r\n\t\t\t\tString line = scanner.nextLine();\r\n\t\t\t\r\n\t\t\t\tMatcher metaMatcher = metaPattern.matcher(line);\r\n\t\t\t\tif(metaMatcher.matches()) {\r\n\t\t\t\t\t// header or comment\r\n\t\t\t\t\t\r\n\t\t\t\t\tMatcher headerMatcher = headerPattern.matcher(line);\r\n\t\t\t\t\tif(headerMatcher.matches()) {\r\n\t\t\t\t\t\t// header\r\n\t\t\t\t\t\tString parameter = headerMatcher.group(1);\r\n\t\t\t\t\t\tString value = headerMatcher.group(2);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(parameter.equalsIgnoreCase(\"format\")) {\r\n\t\t\t\t\t\t\tif(Integer.parseInt(value) != 4) {\r\n\t\t\t\t\t\t\t\tthrow new Exception(\"Wrong format version\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if(parameter.equalsIgnoreCase(\"CheckUnit\")) {\r\n\t\t\t\t\t\t\theader.checkUnit = value;\r\n\t\t\t\t\t\t} else if(parameter.equalsIgnoreCase(\"CheckPlausibility\")) {\r\n\t\t\t\t\t\t\theader.checkPlausibility = value;\r\n\t\t\t\t\t\t} else if(parameter.equalsIgnoreCase(\"Source\")) {\r\n\t\t\t\t\t\t\theader.source = value;\r\n\t\t\t\t\t\t} else if(parameter.equalsIgnoreCase(\"TimeZone\")) {\r\n\t\t\t\t\t\t\theader.timeZone = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// read values\r\n\t\t\t\t\tRow row = new Row();\r\n\t\t\t\t\trow.fromCsv(line, separator, numberFormat);\r\n\t\t\t\t\trows.add(row);\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tscanner.close();\r\n\t\t}\t\r\n\t}", "public List<String> getHeader(String key) {\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders.get(key);\n }", "private static ElfType32.Elf32_Sym parseSymbolTable(byte[] header){\n\t\tElf32_Sym sym = new Elf32_Sym();\n\t\tsym.st_name = Utils.copyBytes(header, 0, 4);\n\t\tsym.st_value = Utils.copyBytes(header, 4, 4);\n\t\tsym.st_size = Utils.copyBytes(header, 8, 4);\n\t\tsym.st_info = header[12];\n\t\t//FIXME 这里有一个问题,就是这个字段读出来的值始终是0\n\t\tsym.st_other = header[13];\n\t\tsym.st_shndx = Utils.copyBytes(header, 14, 2);\n\t\treturn sym;\n\t}", "public static HashMap<String, String> getHeaderDetails(){\n\t\tHashMap<String, String> data = new HashMap<>();\n\n\t\tHeaderDataDAO headerDao = DaoFactory.getHeaderDataDAO();\n\t\tHeaderData headerData = headerDao.getAllRecords().get(0);\n\t\t\n\t\tif(headerData != null){\n\t\t\tdata.put(AppConstants.G_LUID, headerData.getLuid());\n\t\t\tdata.put(AppConstants.G_OFFICE_CODE, headerData.getOfficeCode());\n\t\t\tdata.put(AppConstants.G_USER_ID, headerData.getUserId());\n\t\t\tdata.put(AppConstants.C_LOG_DATE, StringUtils.leftPad(headerData.getLogDate(), 6, \"0\"));\n\t\t\tdata.put(AppConstants.G_LOG_TIME, StringUtils.leftPad(headerData.getLogTime(), 6, \"0\"));\n\t\t\tdata.put(AppConstants.G_TRAN_FI, headerData.getTranFi());\n\t\t}\n\n\t\treturn data;\n\t}", "private Map<String, String> parseDictionary(XMLStreamReader parser) throws XMLStreamException {\n\n Map<String, String> map = new HashMap<>();\n\n String key = \"\";\n String value = \"\";\n int event = parser.next();\n while (event != XMLStreamReader.END_DOCUMENT) {\n switch (event) {\n case XMLStreamReader.START_ELEMENT:\n String name = parser.getName().getLocalPart();\n if (Constants.KEY_TAG.equals(name)) {\n key = parser.getElementText();\n } else if (Constants.VALUE_TAG.equals(name)) {\n value = parser.getElementText();\n map.put(key, value);\n }\n break;\n }\n event = parser.next();\n }\n\n return map;\n }", "public String getHeader(String key) {\n for (int i = 0; i < nFields; i++) {\n if (key.equalsIgnoreCase(keys[i])) {\n return extractRange(valueRanges[i]);\n }\n }\n return \"\"; // no point returning null\n }", "public String getHeaderNames(){return header.namesText;}", "private static int \n headersCount (final Map.Entry <String, VersionedValue> entry)\n {\n return entry.getKey ().length () + 1 + 4 + entry.getValue ().getValue ().length () + 1;\n }", "public String getHeader();", "Map<String, String> getRequestHeaders();", "public List<String> getHeaderValues(String headerName)\n\t{\n\t\tList<String> values = this.headers.get(headerName.toLowerCase());\n\t\tif (values == null)\n\t\t\treturn null;\n\t\telse\n\t\t{\n\t\t\tList<String> copy = new ArrayList<>();\n\t\t\tcopy.addAll(values);\n\t\t\treturn copy;\n\t\t}\n\t}", "public void extractParameters() {\n\t\tString[] parameters = body.split(\"&\");\n\n\n\n\t\t//If there is a value given for every parameter, we extract them\n\t\tString[] huh = parameters[0].split(\"=\");\n\t\tif(huh.length>1) {\n\t\t\tusername = huh[1];\n\t\t}else{allParametersGiven=false;}\t\n\n\t\tString[] hoh = parameters[1].split(\"=\");\n\t\tif(hoh.length>1) {\n\t\t\tpassword = hoh[1];\n\t\t}else{allParametersGiven=false;}\n\n\t}", "@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 void readHeader(byte[] content){\n StringBuilder header = new StringBuilder();\n char c;\n int j = 0;\n for (int i = 0; i < 3; ++i){\n c = (char) content[j];\n header.append(c);\n ++j;\n if(c == '#')--i;\n while((c = (char) content[j]) != '\\n') {\n header.append(c);\n ++j;\n }\n header.append(c);\n ++j;\n }\n this.header = header.toString();\n this.headerSize = header.length();\n\n j = 0;\n for(int i = 0; i < 3; ++i){\n c = header.charAt(j);\n if(c == '#'){\n while(header.charAt(j) != '\\n')++j;\n ++j;\n --i;\n } else{\n if(i == 0){\n while(header.charAt(j) != '\\n')++j;\n ++j;\n } else if(i==1){\n StringBuilder width = new StringBuilder();\n StringBuilder height = new StringBuilder();\n while(c != ' '){\n width.append(c);\n ++j;\n c = header.charAt(j);\n }\n ++j;\n c = header.charAt(j);\n while(c != '\\n' && c != '#' && c != ' '){\n height.append(c);\n ++j;\n c = header.charAt(j);\n }\n while(header.charAt(j)!='\\n')++j;\n ++j;\n this.width = Integer.parseInt(width.toString());\n this.height = Integer.parseInt(height.toString());\n } else {\n StringBuilder resolution = new StringBuilder();\n while(c != '\\n'){\n resolution.append(c);\n ++j;\n c = header.charAt(j);\n }\n this.resolution = Integer.parseInt(resolution.toString());\n }\n }\n }\n }", "private ParcelableNameValuePair(Parcel in) {\n\t\tname = in.readString();\n\t\tvalue = in.readString();\n\t}", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "void processHeader(InputStream dataInput) throws IOException {\n int formatVersion = dataInput.read();\n if (formatVersion < 0) {\n throw new EOFException();\n }\n ensureCondition(formatVersion == SERIALIZER_VERSION, \"Unsupported format version %d.\", formatVersion);\n }", "public Map<String, String> getHeaderList() {\n return headerMap;\n }", "private void parseValues() {\n final Element table = this.doc.select(\"table\").get(0);\n final Elements rows = table.select(\"tr\");\n for (int ind = 1; ind < rows.size(); ind += 1) {\n String label = rows.get(ind).select(\"td\").get(0).select(\"code\").get(0).text();\n label = label.substring(label.lastIndexOf('.') + 1);\n final String value = rows.get(ind).select(\"td\").get(1).text();\n this.values.put(label, value);\n }\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public void setHeader(String key, String value) {\n\t\tmHeaderParams.put(key, value);\n\t}", "public static void checkValidHeader(String header)\n throws DataConversionException {\n String[] headerCheck = header.split(\";\", CsvAdaptedPerson.ATTRIBUTE_ORDERING.keySet().size());\n String[] headerValid = CsvAdaptedPerson.headerOrder();\n\n if (headerCheck.length == 1) {\n throw new DataConversionException(\"Wrong delimiter, Refer to user guide to use correct \"\n + \"delimiter.\\nEach row should have \"\n + (CsvAdaptedPerson.ATTRIBUTE_ORDERING.keySet().size() - 1) + \" ';' \");\n }\n\n if (headerCheck.length != headerValid.length) {\n throw new DataConversionException(\"Missing/Extra Headers, Please check file\");\n }\n\n for (int i = 0; i < headerValid.length; i++) {\n String upperHeader = headerCheck[i].toUpperCase(Locale.ROOT);\n String upperValidHeader = headerValid[i].toUpperCase(Locale.ROOT);\n\n if (!(upperHeader.contains(upperValidHeader))) {\n throw new DataConversionException(\"Wrong header detected,\"\n + \"please double check file\\nFirst row of csv must contain valid headers \"\n + Arrays.toString(headerValid) + \" in that order.\");\n }\n }\n }", "public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }", "public void set(String headerName, String headerValue)\r\n/* 353: */ {\r\n/* 354:526 */ List<String> headerValues = new LinkedList();\r\n/* 355:527 */ headerValues.add(headerValue);\r\n/* 356:528 */ this.headers.put(headerName, headerValues);\r\n/* 357: */ }", "public void setHeader(String header) {\n this.header = header;\n }", "protected Map<String, String> parseClientLoginBody(String body) {\n Map<String, String> responseMap = new HashMap<>();\n for (String line : body.split(\"\\n\")) {\n int idx = line.indexOf(\"=\");\n if (idx > 0) {\n responseMap.put(line.substring(0, idx), line.substring(idx + 1));\n }\n }\n return responseMap;\n }", "private static Heading parse(String record) {\n\t\tString[] parts = record.split(\" \", 2);\n\t\tint weight = Integer.parseInt(parts[0].substring(1));\n\t\tHeading heading = new Heading(weight, parts[1].trim());\n\t\treturn heading;\n\t}", "public static ChallengeRequest parseRequest(String header) {\r\n ChallengeRequest result = null;\r\n \r\n if (header != null) {\r\n int space = header.indexOf(' ');\r\n \r\n if (space != -1) {\r\n String scheme = header.substring(0, space);\r\n String realm = header.substring(space + 1);\r\n int equals = realm.indexOf('=');\r\n String realmValue = realm.substring(equals + 2,\r\n realm.length() - 1);\r\n result = new ChallengeRequest(new ChallengeScheme(\"HTTP_\"\r\n + scheme, scheme), realmValue);\r\n }\r\n }\r\n \r\n return result;\r\n }", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }" ]
[ "0.718822", "0.68832827", "0.6480069", "0.6074393", "0.602211", "0.5965135", "0.5961698", "0.59368885", "0.59357786", "0.5758518", "0.5669531", "0.56546474", "0.5543132", "0.5505608", "0.5494525", "0.54845536", "0.5480918", "0.54254115", "0.54197496", "0.53590804", "0.5352692", "0.532031", "0.5312729", "0.530665", "0.5306541", "0.5305891", "0.52875966", "0.52702254", "0.5245556", "0.5230703", "0.52254426", "0.5199845", "0.5169344", "0.51620924", "0.51263165", "0.5124531", "0.51220226", "0.5114328", "0.5109735", "0.5096479", "0.50901693", "0.50712556", "0.4975783", "0.49658677", "0.49235824", "0.49216938", "0.49146852", "0.49067783", "0.48958665", "0.4867638", "0.48620543", "0.485932", "0.48531252", "0.48424995", "0.48357463", "0.48127228", "0.48106948", "0.480976", "0.48067704", "0.48039073", "0.47937322", "0.47923368", "0.47919458", "0.4786172", "0.4778191", "0.47760618", "0.47722867", "0.4771115", "0.4770744", "0.47674048", "0.47435197", "0.47413227", "0.4739243", "0.4738936", "0.47310126", "0.47263828", "0.47256073", "0.47240084", "0.47201568", "0.47167242", "0.47149563", "0.47103515", "0.47095862", "0.47054955", "0.4698873", "0.46979797", "0.46979797", "0.4687702", "0.46818113", "0.46783465", "0.46704543", "0.46687627", "0.46655095", "0.46612212", "0.46575987", "0.46575192", "0.4654728", "0.46502617", "0.46380943", "0.4636644" ]
0.6513948
2
Read a byte keyvalue pair.
public void read(ByteKvp byteKvp) { // How long is this byte[]? int len = ADACDictionary.valLength[byteKvp.getKeyNum()]; byte[] bytes = new byte[len]; // Move the value buffer to the correct location valBuffer.position(byteKvp.getFieldOffset()); valBuffer.get(bytes, 0, len); byteKvp.setString(bytes); stringsMap.put(byteKvp.getKeyNum(), byteKvp.getString()); logger.log(byteKvp.getLogString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ByteSequence getByteSequence(Key key) throws IOException;", "byte readByte();", "public byte[] get(byte[] key);", "public abstract byte read_octet();", "public byte readByte() throws IOException {\n return in.readByte();\n }", "public byte getByte(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (byte)((Long)value).intValue() : 0);\n }", "public byte readByte() {\n return ((byte) readLong());\n }", "String byteOrBooleanRead();", "public byte readScalarByte() throws java.io.IOException;", "public static byte getByte(final String key) {\r\n if (PROP == null) {\r\n throw new RuntimeException(\"Config hasn't been initialized yet.\");\r\n }\r\n if (PROP.containsKey(key))\r\n return Byte.parseByte(PROP.getProperty(key));\r\n else\r\n throw new RuntimeException(\"No config key found for [\" + key + \"].\");\r\n }", "byte decodeByte();", "byte[] readBytes();", "public static double readByte() {\n return Byte.parseByte(readString());\n }", "protected abstract T getValue(ByteBuffer b);", "public byte getByte(String key)\n {\n return getByte(key, (byte) 0);\n }", "public byte getByte(String name) {\n\t\tObject val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Byte value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).byteValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Byte.parseByte((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Byte value required, but found: \" + val);\n\t\t}\n\t}", "public byte read(int param1) {\n }", "@Override\n\tpublic byte readByte() throws IOException {\n\t\treturn (byte) (_buff.get() & 0xFF);\n\t}", "MongoDBEntry<K, V> get(byte[] key);", "public byte readByte() throws IOException {\n\t\treturn (byte) read();\n\t}", "public byte[] read();", "byte[] getKey();", "com.google.protobuf.ByteString getKeyBytes();", "com.google.protobuf.ByteString getKeyBytes();", "public BencodeValue decodeBytes() throws IOException {\n int c = this.getNextIndicator();\n int num = c - '0';\n if (num < 0 || num > 9)\n throw new BencodeFormatException(\"Next char should be a digit, instead it is: '\"\n + (char)c + \"'\");\n this.indicator = 0;\n\n c = this.read();\n int i = c - '0';\n while (i >= 0 && i <= 9) {\n num = num*10 + i; //reconstruct a number digit by digit\n c = this.read();\n i = c - '0';\n }\n\n if (c != ':') {\n throw new BencodeFormatException(\"Next char should be a colon, instead it is: '\" +\n (char)c + \"'\");\n }\n return new BencodeValue(read(num));\n }", "byte get(int index);", "public abstract ChecksumPair read() throws IOException;", "byte peekByte() throws IOException;", "@Override\n public byte byteValue() {\n return value;\n }", "public abstract void read_octet_array(byte[] value, int offset, int\nlength);", "@Override\n\tpublic int ReadByte()\n\t{\n//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:\n//ORIGINAL LINE: byte[] oneByteBuffer = new byte[1];\n\t\tbyte[] oneByteBuffer = new byte[1];\n\t\tint num = Read(oneByteBuffer, 0, 1);\n\t\tif (num <= 0)\n\t\t{\n\t\t\t// return -1 to indicate that no byte was read.\n\t\t\treturn -1;\n\t\t}\n\t\treturn oneByteBuffer[0];\n\t}", "public byte[] readRawByte() throws IOException {\n byte[] bytes = new byte[2];\n bytes[0] = (byte) Type.BYTE.code;\n in.readFully(bytes, 1, 1);\n return bytes;\n }", "byte toByteValue() {\n return (byte) value;\n }", "public final int getByte() throws IOException {\r\n b3 = 0;\r\n\r\n b3 = (tagBuffer[bPtr] & 0xff);\r\n bPtr += 1;\r\n\r\n return b3;\r\n }", "public byte getByte(int offset)\n {\n return readMode(offset + 0xA0000);\n }", "public int readByte() {\n waitForData();\n try {\n return m_DataInputStream.readByte();\n }\n catch (IOException e) {\n return 256;\n }\n }", "public static byte getB(final short key)\n {\n return (byte) (key & BITS);\n }", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "static Value<Byte> parseByte(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Byte.parseByte(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "@Override\r\n\tpublic byte getByte(int pos) {\n\t\treturn buffer.get(pos);\r\n\t}", "public static BabbleValue fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }", "protected byte readByte(final int adr) {\r\n return this.memory[adr];\r\n }", "private int readByte() {\n return src[srcPos++] & 0xFF;\n }", "public static byte readByte(final long address) {\n\t\treturn Unsafe.get().getByte(address);\n\t}", "com.google.protobuf.ByteString getValue();", "com.google.protobuf.ByteString getValue();", "com.google.protobuf.ByteString getValue();", "boolean readByte(int c, String streamProvider) throws RawDataEventException ;", "int readS16BE()\n throws IOException, EOFException;", "private byte getValue() {\n\t\treturn value;\n\t}", "public byte getValueByte(short valueOffset) throws ToolkitException {\n byte[] buffer = getAPDUBuffer();\n short Lc = (short)(buffer[OFFSET_LC] & 0xFF);\n short TLVOffset = getLastTLVOffset(buffer, Lc);\n if (TLVOffset >= Lc) {\n ToolkitException.throwIt(ToolkitException.UNAVAILABLE_ELEMENT);\n }\n short TLVLength = (short)(buffer[(short)(TLVOffset + 1)] & 0xFF);\n if (valueOffset > TLVLength) {\n ToolkitException.throwIt(ToolkitException.OUT_OF_TLV_BOUNDARIES);\n }\n // return the byte at offset\n return buffer[(short)(TLVOffset + 2 + valueOffset)]; \n }", "Object readValue();", "public byte[] getBytes(){\n\t\treturn m_EncKeyValue;\n\t}", "T get(String key) throws IOException;", "public Byte _parseByte(JsonParser jVar, DeserializationContext gVar) throws IOException {\n JsonToken l = jVar.mo29328l();\n if (l == JsonToken.VALUE_STRING) {\n String trim = jVar.mo29334t().trim();\n if (_hasTextualNull(trim)) {\n return (Byte) _coerceTextualNull(gVar, this._primitive);\n }\n if (trim.length() == 0) {\n return (Byte) _coerceEmptyString(gVar, this._primitive);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n int a = NumberInput.m23779a(trim);\n if (_byteOverflow(a)) {\n return (Byte) gVar.mo31517b(this._valueClass, trim, \"overflow, value cannot be represented as 8-bit value\", new Object[0]);\n }\n return Byte.valueOf((byte) a);\n } catch (IllegalArgumentException unused) {\n return (Byte) gVar.mo31517b(this._valueClass, trim, \"not a valid Byte value\", new Object[0]);\n }\n } else if (l == JsonToken.VALUE_NUMBER_FLOAT) {\n if (!gVar.mo31509a(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) {\n _failDoubleToIntCoercion(jVar, gVar, \"Byte\");\n }\n return Byte.valueOf(jVar.mo29335A());\n } else if (l == JsonToken.VALUE_NULL) {\n return (Byte) _coerceNullToken(gVar, this._primitive);\n } else {\n if (l == JsonToken.START_ARRAY) {\n return (Byte) _deserializeFromArray(jVar, gVar);\n }\n if (l == JsonToken.VALUE_NUMBER_INT) {\n return Byte.valueOf(jVar.mo29335A());\n }\n return (Byte) gVar.mo31493a(this._valueClass, jVar);\n }\n }", "public byte getByte(String name, byte defaultValue) {\n\t\tObject val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).byteValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Byte.parseByte((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Byte value required, but found: \" + val);\n\t\t}\n\t}", "byte getEByte();", "public abstract \n boolean nextKeyValue() throws IOException, InterruptedException;", "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 }", "int readS16BE(String name)\n throws IOException, EOFException;", "public Byte getByteAttribute();", "com.google.protobuf.ByteString\n getKeyBytes();", "com.google.protobuf.ByteString\n getKeyBytes();", "public byte getValue() {\n return value;\n }", "private static byte[] getPropertyBytes(String key)\r\n/* 98: */ throws IOException\r\n/* 99: */ {\r\n/* 100: 95 */ String value = getProperty(key);\r\n/* 101: 96 */ return value == null ? new byte[0] : Base64Utils.base64Decode(value);\r\n/* 102: */ }", "public <T> T readKey() {\n return readObject();\n }", "@Override\n\tpublic int read() {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\treturn CpuMem.getInstance().readMem(address);\n\t}", "private byte nextByte(ByteBuffer inputBuffer) throws IOException {\n getAtLeastBytes(inputBuffer, 1);\n return inputBuffer.get();\n }", "public void read(ExtrasKvp extraKvp) {\n\n\t\tbyte[] bytes = new byte[ExtrasKvp.LENGTH];\n\n\t\t// Move the value buffer to the correct location\n\t\tvalBuffer.position(extraKvp.getFieldOffset());\n\t\tvalBuffer.get(bytes, 0, ExtrasKvp.LENGTH);\n\n\t\t// Set the bytes string of the extras object\n\t\textraKvp.setData(bytes);\n\t\textrasMap = extraKvp.getMap();\n\n\t}", "@NotNull\n @Generated\n @Selector(\"keyData\")\n public native NSData keyData();", "public byte readByte()\r\n/* 387: */ {\r\n/* 388:400 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 389:401 */ return super.readByte();\r\n/* 390: */ }", "public String getKV(String key) throws Exception;", "byte toStringValue() {\n return (byte) String.valueOf(value).charAt(0);\n }", "public Byte getByte(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).byteValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null && string.length() > 0) {\n return Byte.parseByte(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }", "@Override\n public byte readByte() throws IOException\n {\n if (!hasRemaining())\n {\n throw new IOException(\"End off buffer reached\");\n }\n return (byte) randomAccessRead.read();\n }", "public static ContentKey fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }", "public byte getByte(String key, byte fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getByte(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Byte.parseByte(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "@Override\n public byte[] handle(byte[] bs, int length) {\n String key = UtilKeyValue.get(bs, length);\n if (key == null) {\n return new byte[]{5};\n }\n\n String value = keyValue.get_(key);\n\n return UtilKeyValue.get(Operation.SUCCESS, value);\n }", "@Override\n public int read(final byte[] b) throws IOException {\n return input.read(b);\n }", "public int readUnsignedByte() throws IOException {\n\t\treturn read() | 0x00ff;\n\t}", "@Test\n public void testRead() {\n // Choose a random key to read, among the available ones.\n int readKeyNumber = new Random().nextInt(RiakKVClientTest.recordsToInsert);\n // Prepare two fields to read.\n Set<String> fields = new HashSet<>();\n fields.add(RiakKVClientTest.firstField);\n fields.add(RiakKVClientTest.thirdField);\n // Prepare an expected result.\n HashMap<String, String> expectedValue = new HashMap<>();\n expectedValue.put(RiakKVClientTest.firstField, Integer.toString(readKeyNumber));\n expectedValue.put(RiakKVClientTest.thirdField, Integer.toString((readKeyNumber * readKeyNumber)));\n // Define a HashMap to store the actual result.\n HashMap<String, ByteIterator> readValue = new HashMap<>();\n // If a read transaction has been properly done, then one has to receive a Status.OK return from the read()\n // function. Moreover, the actual returned result MUST match the expected one.\n Assert.assertEquals(\"Read transaction FAILED.\", OK, RiakKVClientTest.riakClient.read(RiakKVClientTest.bucket, ((RiakKVClientTest.keyPrefix) + (Integer.toString(readKeyNumber))), fields, readValue));\n Assert.assertEquals(\"Read test FAILED. Actual read transaction value is NOT MATCHING the expected one.\", expectedValue.toString(), readValue.toString());\n }", "public byte getByte(int k) {\n if (this.inByteRange(k)) return (byte) this.data.get(k);\n return 0;\n }", "public byte readByte() throws SerialPortException {\n\t\tif (this.available()) {\n\t\t\tbyte [] byteRead = port.readBytes(1);\n\t\t\tif(debug) {\n\t\t\t\tString byteName = String.format(\"%02x\", byteRead[0]);\n\t\t\t\tSystem.out.print(byteName + \"\\t\");;\n\t\t\t}\n\t\t\treturn byteRead[0];\n\t\t\t\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "public byte get() throws TLVEncodingException {\r\n\t\tif (cursor >= limit)\r\n\t\t\tthrow new TLVEncodingException(\"End of buffer\");\r\n\r\n\t\treturn buffer[cursor++];\r\n\t}", "void readBytes(byte[] into, int offset, int toRead) throws IOException;", "public int readByte() {\n try {\n return in.read();\n } catch (IOException e) {\n print(\"Error reading byte from \" + portName);\n }\n return -1;\n }", "@Override\n public int peekUnsignedByte(int offset) throws IOException\n {\n if (offset < 0)\n {\n throw new IOException(\"offset is negative\");\n }\n if (offset == 0)\n {\n return randomAccessRead.peek();\n }\n long currentPosition = randomAccessRead.getPosition();\n if (currentPosition + offset >= randomAccessRead.length())\n {\n throw new IOException(\"Offset position is out of range \" + (currentPosition + offset)\n + \" >= \" + randomAccessRead.length());\n }\n randomAccessRead.seek(currentPosition + offset);\n int peekValue = randomAccessRead.read();\n randomAccessRead.seek(currentPosition);\n return peekValue;\n }", "@Nullable\n private synchronized KeyPair readKeyPair() throws GeneralSecurityException, IOException {\n final String methodTag = TAG + \":readKeyPair\";\n\n Logger.v(methodTag, \"Reading Key entry\");\n try {\n final KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE);\n keyStore.load(null);\n\n final Certificate cert = keyStore.getCertificate(KEY_STORE_CERT_ALIAS);\n final Key privateKey = keyStore.getKey(KEY_STORE_CERT_ALIAS, null);\n\n if (cert == null || privateKey == null) {\n Logger.v(methodTag, \"Key entry doesn't exist.\");\n return null;\n }\n\n return new KeyPair(cert.getPublicKey(), (PrivateKey) privateKey);\n } catch (final RuntimeException e) {\n // There is an issue in android keystore that resets keystore\n // Issue 61989: AndroidKeyStore deleted after changing screen lock type\n // https://code.google.com/p/android/issues/detail?id=61989\n // in this case getEntry throws\n // java.lang.RuntimeException: error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long\n // handle it as regular KeyStoreException\n throw new KeyStoreException(e);\n }\n }", "public boolean put(byte[] key, byte[] value) throws Exception;", "byte[] byteValue() {\n\treturn data;\n }", "public byte value() {\n return value;\n }", "public byte getValueInRowKey() {\n return valueInRowKey;\n }", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "public byte[] getKeyBytes(){\n\t\t\n\t\tif(this.key == null) return null;\n\t\treturn getKey().getBytes();\n\t}", "@Override\n\tpublic byte readScalarByte() throws IOException {\n\t\treturn 0;\n\t}" ]
[ "0.6573237", "0.641572", "0.625969", "0.6118987", "0.606582", "0.6013126", "0.60034776", "0.5936356", "0.58263457", "0.5706267", "0.569436", "0.5692064", "0.5685943", "0.5684055", "0.56507206", "0.563435", "0.5630641", "0.56268245", "0.56258565", "0.558404", "0.5537368", "0.54965544", "0.5488624", "0.5488624", "0.54472136", "0.5442159", "0.54374075", "0.5430246", "0.54264414", "0.5396607", "0.5354732", "0.53258705", "0.53137493", "0.5253929", "0.5214891", "0.5208764", "0.52010477", "0.51981694", "0.51981694", "0.51981694", "0.517933", "0.51767296", "0.5167107", "0.51592785", "0.5151775", "0.51485026", "0.5146588", "0.5146588", "0.5146588", "0.51410216", "0.5140263", "0.51377803", "0.51367587", "0.5135107", "0.5133936", "0.51304954", "0.51153713", "0.511532", "0.5114672", "0.51011044", "0.5090456", "0.50822157", "0.50626326", "0.50442064", "0.50442064", "0.50412935", "0.50403905", "0.5037961", "0.50340164", "0.5025719", "0.5022409", "0.50209945", "0.5016689", "0.5010468", "0.5009044", "0.4992815", "0.49831453", "0.4972025", "0.49718997", "0.4967072", "0.4956048", "0.49544764", "0.49528128", "0.4943015", "0.49378607", "0.4936141", "0.49233493", "0.49183473", "0.49171233", "0.4915939", "0.4910236", "0.49066237", "0.49048495", "0.4883554", "0.48818704", "0.48818704", "0.48818704", "0.48818704", "0.4874906", "0.4874355" ]
0.63397104
2
Read the "extra" keyvalue pair.
public void read(ExtrasKvp extraKvp) { byte[] bytes = new byte[ExtrasKvp.LENGTH]; // Move the value buffer to the correct location valBuffer.position(extraKvp.getFieldOffset()); valBuffer.get(bytes, 0, ExtrasKvp.LENGTH); // Set the bytes string of the extras object extraKvp.setData(bytes); extrasMap = extraKvp.getMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VersionedMap getExtra ()\n {\n return extra;\n }", "public String getExtra2() {\n return extra2;\n }", "Pair<String, String> getAdditionalAttribute();", "Map<String, Object> extras();", "public String[] getExtraInfo() {\n return extraInfo;\n }", "public String getExtra3() {\n return extra3;\n }", "com.google.protobuf.ByteString getExtra();", "public com.google.protobuf.ByteString getExtra() {\n return extra_;\n }", "String getExtra();", "public Object getExtraInformation() {\n\t\treturn extraInformation;\n\t}", "public com.google.protobuf.ByteString getExtra() {\n return extra_;\n }", "public UnparseableExtraFieldData getUnparseableExtraFieldData() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"a945f49c-9e0e-4d61-96d9-614c3b2abe51\");\n return unparseableExtra;\n }", "public String getExtra() {\n Object ref = extra_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n extra_ = s;\n return s;\n }\n }", "public String getExtra() {\n Object ref = extra_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n extra_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getExtraValue() {\n\t\t\treturn null;\r\n\t\t}", "public String getExtraValue() {\n\t\t\treturn null;\r\n\t\t}", "public void setExtraInfo(String[] extraInfo) {\n this.extraInfo = extraInfo;\n this.bextraInfo = true;\n }", "public com.google.protobuf.ByteString\n getExtraBytes() {\n Object ref = extra_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n extra_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.util.Map getExtra(int status) throws android.os.RemoteException;", "public Map<Object, Object> getExtraMap() {\n return extraMap;\n }", "public void setExtra2(String extra2) {\n this.extra2 = extra2;\n }", "public String getExtra1() {\n return extra1;\n }", "public String getExtraOptions() {\n return this.extraOptions;\n }", "public com.google.protobuf.ByteString\n getExtraBytes() {\n Object ref = extra_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n extra_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getExtraHeader(final String name) {\n return extraHeaders.get(name);\n }", "AdditionalValuesType getAdditionalValues();", "public void setExtraInfo (String info) {\n\tthis.extraInfo = info;\n }", "com.google.protobuf.ByteString\n getExtraBytes();", "String getAdditionalInfo();", "public void setExtra3(String extra3) {\n this.extra3 = extra3;\n }", "public void readAdditional(CompoundNBT compound) {\n super.readAdditional(compound);\n this.dataManager.set(ATTACHED_FACE, Direction.byIndex(compound.getByte(\"AttachFace\")));\n this.dataManager.set(PEEK_TICK, compound.getByte(\"Peek\"));\n this.dataManager.set(COLOR, compound.getByte(\"Color\"));\n if (compound.contains(\"APX\")) {\n int i = compound.getInt(\"APX\");\n int j = compound.getInt(\"APY\");\n int k = compound.getInt(\"APZ\");\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(new BlockPos(i, j, k)));\n } else {\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.empty());\n }\n\n }", "public Map<String, String> getAdditionalData() {\n return additionalData;\n }", "@Test\n public void setExtraSavesExtra()\n {\n //arrange\n String expectedExtra = \"some user agent extra\";\n ProductInfo actual = new ProductInfo();\n\n //act\n actual.setExtra(expectedExtra);\n\n //assert\n assertEquals(expectedExtra, Deencapsulation.getField(actual, \"extra\"));\n }", "public ListaAttributi getExtra() {\r\n return this.extra;\r\n }", "private ArrayOfTExtraInfo manageSpecialKey(String key) {\n\n ArrayOfTExtraInfo arrayResult = new ArrayOfTExtraInfo();\n SpecialKey specialKey = SpecialKey.fromString(key);\n switch (specialKey) {\n case ALL:\n arrayResult = allKeys(extractParam(key));\n break;\n case BE_OS_PLATFORM:\n try {\n arrayResult.addTExtraInfo(new TExtraInfo(key, Constants.BE_OS_PLATFORM.getValue()));\n } catch (InvalidTExtraInfoAttributeException e) {\n log.error(e.getMessage(), e);\n }\n break;\n case BE_OS_KERNEL_RELEASE:\n try {\n arrayResult.addTExtraInfo(new TExtraInfo(key, Constants.BE_OS_KERNEL_RELEASE.getValue()));\n } catch (InvalidTExtraInfoAttributeException e) {\n log.error(e.getMessage(), e);\n }\n break;\n case TEST_PUT_NEW_STATUS:\n arrayResult = test_put_new_status(extractParam(key));\n break;\n case TEST_PUT_RETRY_VALUE:\n arrayResult = test_put_retry_value(extractParam(key));\n break;\n case TEST_TAKEOVER:\n arrayResult = test_takeover(extractParam(key));\n break;\n default: {\n TExtraInfo extraInfo = new TExtraInfo();\n try {\n extraInfo = new TExtraInfo(SpecialKey.UNKNOWN.toString(),\n SpecialKey.UNKNOWN.getDescription() + \":'\" + key + \"'\");\n } catch (InvalidTExtraInfoAttributeException e) {\n log.error(e.getMessage(), e);\n }\n arrayResult.addTExtraInfo(extraInfo);\n break;\n }\n }\n return arrayResult;\n }", "@NonNull\n public Map<String, byte[]> getAdditionalProperties() {\n Map<String, byte[]> additionalProps = new HashMap<>();\n\n for (KeyValuePair pair : mProto.additionalProps) {\n byte[] value = pair.value != null ? pair.value.toByteArray() : null;\n additionalProps.put(pair.name, value);\n }\n\n return additionalProps;\n }", "public String getAdditionalInfo() {\r\n return additionalInfo;\r\n }", "public String getAdditionalData() {\n return additionalData;\n }", "public void setExtraMap(Map<Object, Object> extraMap) {\n this.extraMap = extraMap;\n }", "public String getAdditionalInfo() {\n return additionalInfo;\n }", "public String getAdditionalInfo() {\n return additionalInfo;\n }", "private ZipExtraField[] getAllExtraFieldsNoCopy() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3fa9af0d-52ec-4dfb-8f8f-664dab78c7a2\");\n if (extraFields == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e10aa90d-39cc-4c84-8523-509199acd725\");\n return getUnparseableOnly();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6f46f8f8-2f8d-4363-895b-687a45be39ed\");\n return unparseableExtra != null ? getMergedFields() : extraFields;\n }", "public boolean hasExtra() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasExtra() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public void removeUnparseableExtraFieldData() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c3763808-2050-4e13-a0c1-1c775bd5e0ee\");\n if (unparseableExtra == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4003f30c-e5f3-4c15-b6da-adb3b7a4a1a1\");\n throw new java.util.NoSuchElementException();\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c7621793-4ba2-47c3-8bce-7c8b5c05ed8e\");\n unparseableExtra = null;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"daca2b5a-ddf7-4a9f-b64f-153927dc0b18\");\n setExtra();\n }", "protected Map<String, Object> getExtraData(HttpServletRequest request) {\n\n HashMap<String, Object> extraData = new HashMap<String, Object>();\n extraData.put(ProcessListener.EXTRA_DATA_RESOURCE_BUNDLE, getResourceBundle(request));\n extraData.put(ProcessListener.EXTRA_DATA_SETTINGS, getSettings(request));\n extraData.put(ProcessListener.EXTRA_DATA_USER, getUser(request));\n extraData.put(ProcessListener.EXTRA_DATA_IDPROJECT, getIdProject(request));\n\n return extraData;\n }", "@Test\n public final void testParseWhereExtraValue() throws Exception {\n\n try (InputStream is = this.getClass()\n .getResourceAsStream( \"/data/loader/expression/experimentalDesignTestExtra.txt\" )) {\n\n experimentalDesignImporter.importDesign( ee, is );\n }\n\n ee = this.eeService.thawLite( ee );\n\n Collection<BioMaterial> bms = new HashSet<>();\n for ( BioAssay ba : ee.getBioAssays() ) {\n BioMaterial bm = ba.getSampleUsed();\n bms.add( bm );\n }\n this.aclTestUtils.checkEEAcls( ee );\n\n this.checkResults( bms );\n }", "public static Object getExtraObject(Activity context, String key) {\n \tObject param = null;\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.get(key);\n \t}\n \treturn param;\n\t}", "public void setExtra1(String extra1) {\n this.extra1 = extra1;\n }", "private String addExtra() {\n\t\t// One Parameter: ExtraName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|extra:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "protected final void setExtraInfo(final String info) {\n\t\tif (info == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid extra info\");\n\t\t}\n\t\textras = info;\n\t}", "public void addExtraField(final ZipExtraField ze) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"04a0a86a-8034-4044-aeed-cebe7016e2d1\");\n if (ze instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6b9a9172-8ea2-4aed-8433-17b19d1a9891\");\n unparseableExtra = (UnparseableExtraFieldData) ze;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c4c62a77-912a-4047-b4bc-d8a05e95bc86\");\n if (extraFields == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"450fc98b-d668-4300-b141-2c5907baab75\");\n extraFields = new ZipExtraField[] { ze };\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"5d8f1c11-1f27-4f98-923b-c42685d35e95\");\n if (getExtraField(ze.getHeaderId()) != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"7cc8a651-6175-4ec7-ab56-688a497910a8\");\n removeExtraField(ze.getHeaderId());\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"aa062502-071a-4ff6-8692-1c1202b14fec\");\n final ZipExtraField[] zipExtraFields = copyOf(extraFields, extraFields.length + 1);\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e30c5825-289a-4c05-a5ec-8c2d6bec09e8\");\n zipExtraFields[zipExtraFields.length - 1] = ze;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3f326300-d61d-4afa-ae59-fe45855b45a6\");\n extraFields = zipExtraFields;\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"944dff45-ab9b-4e44-b913-045a4e38da7a\");\n setExtra();\n }", "public Builder setExtra(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n extra_ = value;\n onChanged();\n return this;\n }", "public Map<String, String> getExtraHeaders() {\n return Collections.unmodifiableMap(extraHeaders);\n }", "protected Map<String, Object> getAdditionalProperties()\n {\n return additionalProperties;\n }", "@Override\n\tpublic void load(Reader reader)\n\t{\n\t\tString os = System.getProperty(\"os.name\", \"?\").toLowerCase();\n\t\tif (os.startsWith(\"linux\"))\n\t\t\tos = \"linux\";\n\t\telse if (os.startsWith(\"windows\"))\n\t\t\tos = \"windows\";\n\t\telse if (os.startsWith(\"sun\"))\n\t\t\tos = \"sun\";\n\t\telse if (os.startsWith(\"mac\"))\n\t\t\tos = \"mac\";\n\t\t\n\t\t\n\t\tString line, key, value;\n\t\tint i,j;\n\t\tScanner input = new Scanner(reader);\n\t\twhile (input.hasNext())\n\t\t{\n\t\t\tline = getNextLine(input);\n\t\t\tif (line.length() > 0)\n\t\t\t{\n\t\t\t\twhile (line.endsWith(\" \\\\\") || line.endsWith(\"\\t\\\\\"))\n\t\t\t\t\tline = line.substring(0, line.length()-1) + getNextLine(input);\n\t\t\t\t\n\t\t\t\t// find index of the first occurrence of either '=' or ':'\n\t\t\t\ti=line.indexOf('=');\n\t\t\t\tj=line.indexOf(':');\n\t\t\t\tif (j >= 0 && j < i)\n\t\t\t\t\ti = j;\n\t\t\t\t\n\t\t\t\t// split line into key and value substrings.\n\t\t\t\t// Note: key must have at least one character.\n\t\t\t\tif (i > 0)\n\t\t\t\t{\n\t\t\t\t\tkey = line.substring(0, i).trim();\n\t\t\t\t\t\n\t\t\t\t\tboolean skip = false;\n\t\t\t\t\tfor (String op : new String[] {\"linux\", \"windows\", \"sun\", \"mac\"})\n\t\t\t\t\t{\n\t\t\t\t\t\tif (key.startsWith(\"<\"+op+\">\"))\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif (os.equals(op))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey = key.substring((\"<\"+op+\">\").length()).trim();\n\t\t\t\t\t\t\t\tskip = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\tskip = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (skip)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvalue = line.substring(i+1).trim();\n\t\t\t\t\n\t\t\t\t\t// The following two if statements provide backward compatibility for old GMP property files\n\t\t\t\t\t// that added double '\\' characters in file names and directory names. As soon as all of \n\t\t\t\t\t// our property files no longer contain double backslash characters, we should get rid of this.\n\t\t\t\t\t// if value starts with 4 backslash characters, eg., \\\\\\\\fig2\\\\GMPSys\\\\filename\n\t\t\t\t\t// then replace all double backslashes with single backslashes, eg., \\\\fig2\\GMPSys\\filename\n\t\t\t\t\tif (value.startsWith(\"\\\\\\\\\\\\\\\\\"))\n\t\t\t\t\t{\n\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\twhile (i >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue = value.substring(0,i)+value.substring(i+1);\n\t\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue = \"\\\\\"+value;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if value starts with a character followed by \":\\\\\", eg., c:\\\\GMPSys\\\\filename\n\t\t\t\t\t// then replace all double backslashes with single backslashes, eg., c:\\GMPSys\\filename\n\t\t\t\t\tif (value.length() >= 4 && value.charAt(1)==':' && value.charAt(2) == '\\\\' && value.charAt(3) == '\\\\')\n\t\t\t\t\t{\n\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\twhile (i >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue = value.substring(0,i)+value.substring(i+1);\n\t\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tsetProperty(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (getProperty(\"includePropertyFile\") != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFile includeFile = getFile(\"includePropertyFile\");\n\t\t\t\tremove(\"includePropertyFile\");\n\t\t\t\tload(new FileReader(includeFile));\n\t\t\t} \n\t\t\tcatch (PropertiesPlusException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} \n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public void addExtraInfo(final ArrayList<PersonInfo> extra) {\n info.addAll(extra);\n hasExtra = true;\n }", "public static native int getCustomSettings(byte[] info);", "public String getAdditionalInformation() {\n return additionalInformation;\n }", "java.lang.String getExtraJavacopts(int index);", "public ZipExtraField getExtraField(final ZipShort type) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c35bc23b-cd1d-468b-b68e-692eafa99687\");\n if (extraFields != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1b755abf-52e3-4078-bdc6-5e4f6d2c1b92\");\n for (final ZipExtraField extraField : extraFields) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"a06856ff-f7ac-4fa2-a2ea-3a766b8fd17b\");\n if (type.equals(extraField.getHeaderId())) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"cf217f83-0921-4e72-8141-ee4971b0fc6f\");\n return extraField;\n }\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"b03a283c-6bc4-4892-b1c9-06986a4697b2\");\n return null;\n }", "public void processMeta(String name, String value) throws BeaconException;", "@Override public java.util.Map getExtra(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.util.Map _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getExtra, _data, _reply, 0);\n_reply.readException();\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_result = _reply.readHashMap(cl);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public String meta(String opt, String key, String value) throws Exception;", "public void setExtraOptions(String extraOptions) {\n this.extraOptions = extraOptions;\n }", "public IConfigAdditionalData provideAdditionalData();", "public Map<String, String> getOrCreateAdditionalData() {\n if (this.getAdditionalData() == null) {\n this.setAdditionalData(new HashMap<String, String>());\n }\n\n return this.getAdditionalData();\n }", "@Override\n\tpublic String getExtraData() {\n\t\treturn null;\n\t}", "KeyValuePair getInfo(int index);", "public abstract void readFromFile(String key, String value);", "public PoiDetailRecExtraMsg(PoiDetailRecExtraMsg other) {\n if (other.isSetExtraDataMap()) {\n Map<String,String> __this__extraDataMap = new HashMap<String,String>();\n for (Map.Entry<String, String> other_element : other.extraDataMap.entrySet()) {\n\n String other_element_key = other_element.getKey();\n String other_element_value = other_element.getValue();\n\n String __this__extraDataMap_copy_key = other_element_key;\n\n String __this__extraDataMap_copy_value = other_element_value;\n\n __this__extraDataMap.put(__this__extraDataMap_copy_key, __this__extraDataMap_copy_value);\n }\n this.extraDataMap = __this__extraDataMap;\n }\n }", "public Bundle getExtras() {\n return mBundle.getBundle(KEY_EXTRAS);\n }", "public Bundle extra() {\n if (mExtra == null)\n mExtra = new Bundle();\n return mExtra;\n }", "public void readConfig(Node nd) {\n\t\tsuper.readConfig(nd);\r\n\t\tNodeList nl = nd.getChildNodes();\r\n\t\torderedMeta = new ArrayList<BinFieldMeta>();\r\n\t\tfor (int i = 0; i < nl.getLength(); i++) {\r\n\t\t\tNode cnd = nl.item(i);\r\n\t\t\tif (cnd.getNodeType() == Node.TEXT_NODE\r\n\t\t\t\t\t|| cnd.getNodeType() == Node.COMMENT_NODE)\r\n\t\t\t\tcontinue;\r\n\t\t\tBinFieldMeta meta = null;\r\n\t\t\tif (cnd.getNodeName().equals(\"field\")\r\n\t\t\t\t\t|| cnd.getNodeName().equals(\"derivedField\")) {\r\n\t\t\t\tmeta = (BinFieldMeta)getFieldMeta(cnd.getAttributes()\r\n\t\t\t\t\t\t.getNamedItem(\"name\").getNodeValue());\r\n\t\t\t\torderedMeta.add(meta);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addOtherInfo(String key, Object value) {\n this.otherInfo.put(key, value);\n }", "public byte[] getLocalFileDataExtra() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"0a848c50-13a5-41b9-817e-28d7235fee87\");\n final byte[] extra = getExtra();\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1f7ca2fd-527c-4d39-9a26-89a6c51e4dca\");\n return extra != null ? extra : EMPTY;\n }", "private static Integer readRegister(RegisgerName_Value<String, Integer> pair)\n\t{\n\t\tif (pair != null && registerFile.containsKey(pair.getKey()))\n\t\t{\n\t\t\treturn registerFile.get(pair.getKey());\n\t\t}\n\t\treturn null;\n\t}", "public void setExtra(ListaAttributi extra) {\r\n String oldExtra = this.extra;\r\n this.extra = extra;\r\n propertyChangeSupport.firePropertyChange (\"extra\", oldExtra, extra);\r\n }", "public Marble getExtraMarket(){\n return market.getExtra();\n }", "protected String getExtraOptionsParameter() {\n if (extraOptions != null && extraOptions.length() != 0) {\n return extraOptions;\n } else {\n return null;\n }\n }", "@Schema(description = \"This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \")\n public Object getAdditionalParam() {\n return additionalParam;\n }", "HashMap<String, String> getAdditionalDescriptions();", "public void setAdditionalInfo(String additionalInfo) {\r\n this.additionalInfo = additionalInfo;\r\n }", "public E processExtraData(JsonObject object, E e)\n {\n final JsonElement mass = object.get(\"mass\");\n if (mass != null)\n {\n if (mass.isJsonPrimitive())\n {\n e.mass = mass.getAsInt();\n }\n else\n {\n throw new IllegalArgumentException(\"Invalid mass value \" + mass + \" when reading \" + object);\n }\n }\n\n final JsonElement creativeTab = object.get(\"showInCreativeTab\");\n if (creativeTab != null)\n {\n if (creativeTab.isJsonPrimitive())\n {\n e.showInCreativeTab = creativeTab.getAsBoolean();\n }\n else\n {\n throw new IllegalArgumentException(\"Invalid showInCreativeTab value \" + creativeTab + \" when reading \" + object);\n }\n }\n\n final JsonElement contentGroup = object.get(\"contentGroup\");\n if (contentGroup != null)\n {\n if (contentGroup.isJsonPrimitive())\n {\n e.contentGroup = contentGroup.getAsString();\n }\n else\n {\n throw new IllegalArgumentException(\"Invalid content group value \" + contentGroup + \" when reading \" + object);\n }\n }\n return e;\n }", "@NonNull\n final public Map<String, Object> getExtras() {\n return new HashMap<String, Object>(mExtras);\n }", "@Nullable\n private synchronized KeyPair readKeyPair() throws GeneralSecurityException, IOException {\n final String methodTag = TAG + \":readKeyPair\";\n\n Logger.v(methodTag, \"Reading Key entry\");\n try {\n final KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE);\n keyStore.load(null);\n\n final Certificate cert = keyStore.getCertificate(KEY_STORE_CERT_ALIAS);\n final Key privateKey = keyStore.getKey(KEY_STORE_CERT_ALIAS, null);\n\n if (cert == null || privateKey == null) {\n Logger.v(methodTag, \"Key entry doesn't exist.\");\n return null;\n }\n\n return new KeyPair(cert.getPublicKey(), (PrivateKey) privateKey);\n } catch (final RuntimeException e) {\n // There is an issue in android keystore that resets keystore\n // Issue 61989: AndroidKeyStore deleted after changing screen lock type\n // https://code.google.com/p/android/issues/detail?id=61989\n // in this case getEntry throws\n // java.lang.RuntimeException: error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long\n // handle it as regular KeyStoreException\n throw new KeyStoreException(e);\n }\n }", "public void setAvailableExtraData(List<String> extraDataKeys) {\n/* 502 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static String getExtraString(Activity context, String key) {\n \tString param = \"\";\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.getString(key);\n \t}\n \treturn param;\n\t}", "public String get(String key) {\n\t\t//get this file's text\n\t\tString text = FileIO.read(this.getPath());\n\t\tString value = null;\n\t\ttry {\n\t\t\t//try matching the pattern: key : value\\n \n\t\t\tPattern pattern = Pattern.compile(key+\" : (.*?)\\n\");\n\t\t\t\n\t\t\tMatcher matcher = pattern.matcher(text);\n\t\t\tmatcher.find();\n\t\t\t\n\t\t\t//get the value\n\t\t\tvalue = matcher.group(1);\n\t\t\t\n\t\t}catch(Exception e) {/*do nothing*/}\n\t\t\n\t\treturn value;\n\t}", "public IConfigAdditionalData provideFormattedAdditionalData(WorldInfo worldInfo);", "private void validateExtra() {\n\t\tif (getArguments()!=null)\n\t\t{\n\t\t\tentity = (NoteEntity)getArguments().getSerializable(\"NOTE\");\n\t\t}\n\t}", "@Override\n public RavenJObject getAdditionalData() {\n return additionalData;\n }", "private static void\n extraWrite (final Map.Entry <String, VersionedValue> entry, State self)\n {\n self.putString (entry.getKey ());\n self.putNumber4 (entry.getValue ().getVersion ());\n self.putString (entry.getValue ().getValue ());\n }", "public String getExistingData(String key) throws IOException {\n\t\tFileReader fs = new FileReader(\"/Users/rohan.rana/Desktop/Appium_Test/resource/Data.properties\");\n\t\tProperties p = new Properties();\n\t\tp.load(fs);\n\t\treturn p.getProperty(key);\n\t}", "private void readKeyDataToIdentifyTransactions(){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(keyFile));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif((line.startsWith(\"#\")) || (line.equals(\"\")))\n\t\t\t\t\tcontinue;\n\t\t\t\telse{\n\t\t\t\t\tString transacName = line.split(\";\")[0];\n\t\t\t\t\tchar transacType = line.split(\";\")[1].charAt(0);\n\t\t\t\t\ttypeTransData.put(transacName,transacType);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! \"+ keyFile +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"Please try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t}", "public void addExtraHeader(final String name, final String value) {\n extraHeaders.put(name, value);\n }", "public abstract Object getMetadata(String key);", "private Map<Integer, List<Pair<String, Integer>>> getAdditionalInformation() {\n Cursor cursor = mContentResolver.query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, QUERY_PROJECTION_PHONE, null, null, null);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.CONTACT_ID);\n int phoneIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n int typeIndex = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE);\n\n Map<Integer, List<Pair<String, Integer>>> numbers = new HashMap<Integer, List<Pair<String, Integer>>>();\n\n while (cursor.moveToNext()) {\n int id = cursor.getInt(idIndex);\n if (!numbers.containsKey(id)) {\n // create a new entry\n numbers.put(id, new LinkedList<Pair<String, Integer>>());\n }\n\n numbers.get(id).add(new Pair<String, Integer>(cursor.getString(phoneIndex), cursor.getInt(typeIndex)));\n }\n\n return numbers;\n }", "public void addAsFirstExtraField(final ZipExtraField ze) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4c28d4a6-8986-40c6-b210-d044aab8251a\");\n if (ze instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3d9f9c08-e83a-436a-a8e6-86f86bd970af\");\n unparseableExtra = (UnparseableExtraFieldData) ze;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c35acbb6-3608-4438-9a3b-2e13d04a75a3\");\n if (getExtraField(ze.getHeaderId()) != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"11874c15-028a-440f-8a51-54f6de7d8834\");\n removeExtraField(ze.getHeaderId());\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1eda37ab-9698-47a7-98da-b090770a9fd5\");\n final ZipExtraField[] copy = extraFields;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"52861454-df58-45a4-a4ea-fadccf33506e\");\n final int newLen = extraFields != null ? extraFields.length + 1 : 1;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"bd7052b3-7eb3-4bec-8203-290549716189\");\n extraFields = new ZipExtraField[newLen];\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"f4f61f84-b9ec-4ec0-b697-37d032a7a8fb\");\n extraFields[0] = ze;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"86004d7e-add5-4495-b688-e71892b6f3ee\");\n if (copy != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4e30f42c-8c61-4810-b892-2d8b24ce71f8\");\n System.arraycopy(copy, 0, extraFields, 1, extraFields.length - 1);\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"74b18f9f-5af2-497f-a1b9-1aaa00af7a4f\");\n setExtra();\n }", "private void readPreferences() {\r\n \t\tSharedPreferences sp = getSharedPreferences(SPN, MODE_PRIVATE);\r\n \t\t// set listener to this\r\n \t\tsp.registerOnSharedPreferenceChangeListener(this);\r\n \t\t// read shared preferences to get data file\r\n \t\tdataFile = sp.getString(res.getString(R.string.pref_data_file_key),\r\n \t\t\t\tnull);\r\n \t\tif (localLOGV) {\r\n \t\t\tLog.i(TAG, \"Data file is \" + dataFile);\r\n \t\t}\r\n \t\tif (dataFile == null)\r\n \t\t\treturn;\r\n \t\t// read if data file is compressed\r\n \t\tgzipFile = sp.getBoolean(res.getString(R.string.pref_data_file_gzip),\r\n \t\t\t\tfalse);\r\n \t}" ]
[ "0.60533524", "0.594448", "0.59120893", "0.589055", "0.58814114", "0.5792684", "0.57637924", "0.57552207", "0.5739021", "0.57279646", "0.57115287", "0.5702961", "0.5662434", "0.56248856", "0.5588117", "0.5588117", "0.55722696", "0.55641633", "0.5562154", "0.5540853", "0.55321795", "0.55200374", "0.5459269", "0.54530877", "0.54232424", "0.54055357", "0.539625", "0.53764075", "0.53243464", "0.5255573", "0.5246077", "0.5229064", "0.5197418", "0.51957554", "0.5192453", "0.5180908", "0.5178643", "0.5151242", "0.51420623", "0.510939", "0.510939", "0.51074535", "0.50878894", "0.5048897", "0.5033493", "0.5027867", "0.5026941", "0.500593", "0.49980882", "0.49748403", "0.4969133", "0.49532792", "0.4902671", "0.49014935", "0.48871553", "0.48732543", "0.48714128", "0.48618785", "0.48274776", "0.48205167", "0.48187938", "0.481862", "0.4816089", "0.48125732", "0.48035315", "0.47983754", "0.4797994", "0.4778344", "0.47778255", "0.47610053", "0.47513306", "0.47472453", "0.47062078", "0.4692665", "0.46914336", "0.46816224", "0.4678224", "0.46739733", "0.46692997", "0.46647787", "0.4662622", "0.4653754", "0.46348622", "0.4631576", "0.4623665", "0.46234003", "0.46190107", "0.46090272", "0.46087405", "0.46081793", "0.46015972", "0.45914572", "0.45852566", "0.45730144", "0.45687157", "0.45686686", "0.45678988", "0.45640245", "0.45602724", "0.45595583" ]
0.7072825
0
Read a floating point keyvalue pair.
public void read(FloatKvp floatKvp) { float floatValue = valBuffer.getFloat(floatKvp.getFieldOffset()); floatKvp.setValue(floatValue); floatsMap.put(floatKvp.getKeyNum(), floatKvp.getValue()); logger.log(floatKvp.getLogString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float readFloat();", "double getDouble(String key) throws KeyValueStoreException;", "public float getMandatoryFloat(String key) throws ConfigNotFoundException;", "String floatRead();", "public Float getFloat(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Float) extGet(key);\n\t}", "public float getFloat(String key, float defaultValue);", "public abstract float read_float();", "public Float getFloat(String key, Float defaultValue);", "public Float getFloatData(String key) {\n return pref.getFloat(key, 0);\n }", "public float getFloat(String key)\n {\n return getFloat(key, 0);\n }", "public static double readFloat() {\n return Float.parseFloat(readString());\n }", "double readDouble();", "public Float getFloat(String key)\n\t{\n\t\tDouble d = getDouble(key);\n\t\tif(d == null)\n\t\t\treturn null;\n\t\treturn d.floatValue();\n\t}", "private native float Df1_Read_Float(String plcAddress) throws Df1LibraryNativeException;", "public float readFloat() throws IOException {\n return in.readFloat();\n }", "double readDouble() throws IOException;", "@Nullable\r\n public Float getFloat(String key) {\r\n return getFloat(key, null);\r\n }", "public float readFloat() {\n return Float.parseFloat(readNextLine());\n }", "void put(String key, double value) throws StorageException, ValidationException, KeyValueStoreException;", "public abstract double read_double();", "public float getFloat(String key) {\n\t\tfloat defaultValue = 0;\n\t\tif (getDefault(key) != null)\n\t\t\tdefaultValue = (Float) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tfloat value;\n\t\ttry {\n\t\t\tvalue = Float.parseFloat(sp);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tsetFloat(key, defaultValue);\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}", "public static double getFloat(Tag tag){\n makeInstance();\n return settingsFile.getFloat(tag);\n }", "public float getFloat(short dictionaryKey) {\n\t\treturn floatsMap.get(dictionaryKey);\n\t}", "float readFloat() {\n try {\n return in.readFloat();\n } catch (IOException ex) {\n return DisasmError();\n }\n }", "public Float F(String key) throws AgentBuilderRuntimeException {\n\t\treturn getFloat(key);\n\t}", "public float f(String key) throws AgentBuilderRuntimeException {\n\t\treturn getFloat(key).floatValue();\n\t}", "public float getVal() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 8);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 8);\n\t\t}\n\t}", "public abstract double readAsDbl(int offset);", "public float readFloatPrefs(String prefName) {\n return sPrefs.getFloat(prefName, 0);\n }", "public double getDouble(String key) {\n\t\treturn Double.parseDouble(get(key));\n\t}", "float readFloat(int start)\n {\n int bits = readInt(start);\n\n return Float.intBitsToFloat(bits);\n }", "@Override\n public float getFloat(String key, float defaultVal) {\n return mSharedPreferences.getFloat(key, defaultVal);\n }", "public static float getFloatProperty(String key) {\r\n\t\treturn getFloatProperty(key, 0);\r\n\t}", "public Iterable<Float> getFloats(String key);", "float getValue();", "float getValue();", "float getValue();", "double getDouble(String key, double defaultValue);", "@Test\n public void test_GetDouble() {\n Assert.assertEquals(\"Values werent the same\", 0.98765432123456789D, SecureEnvironment.getDouble(\"test_key_double\"), 0.00000000000000001D);\n }", "public double getDouble(String key)\n {\n return getDouble(key, 0);\n }", "Double getFieldFloat(VcfEntry vcfEntry) {\n\t\tif (name.equals(\"QUAL\")) return vcfEntry.getQuality();\n\n\t\tString value = getFieldString(vcfEntry);\n\t\tif (value == null) return (Double) fieldNotFound(vcfEntry);\n\t\treturn Gpr.parseDoubleSafe(value);\n\t}", "public void saveFloat(String key,float value)\n {\n preference.edit().putFloat(key,value).apply();\n }", "public void put(String key, float value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "private void _testLeadingPeriodFloat(String valueStr, double value, int bytesPerRead)\n throws Exception\n {\n\n JsonFactory f = new JsonFactory();\n String JSON = valueStr;\n AsyncReaderWrapper p = createParser(f, JSON, bytesPerRead);\n try {\n p.nextToken();\n p.currentText();\n fail(\"Should have thrown an exception for doc <\"+JSON+\">\");\n } catch (JsonParseException e) {\n verifyException(e, \"Unexpected character ('.'\");\n verifyException(e, \"expected a valid value\");\n } finally {\n p.close();\n }\n\n // and then verify it's ok when enabled\n f = JsonFactory.builder()\n .enable(JsonReadFeature.ALLOW_LEADING_DECIMAL_POINT_FOR_NUMBERS)\n .build();\n p = createParser(f, JSON, bytesPerRead);\n assertToken(JsonToken.VALUE_NUMBER_FLOAT, p.nextToken());\n assertEquals(value, p.getDoubleValue());\n assertEquals(valueStr.trim(), p.currentText());\n p.close();\n }", "void writeEntry(String key, Double value, Unit unit, boolean mandatory) throws IOException;", "public double readDouble() throws NumberFormatException {\r\n\t\treturn Double.parseDouble(scanner.nextLine());\r\n\t}", "@Test\n public void test_TCM__float_getFloatValue() {\n Attribute attr = new Attribute(\"test\", \"1.00000009999e+10f\");\n float flt = 1.00000009999e+10f;\n try {\n assertTrue(\"incorrect float conversion\",\n attr.getFloatValue() == flt);\n } catch (DataConversionException e) {\n fail(\"couldn't convert to float\");\n }\n\n // test an invalid float\n\n attr.setValue(\"1.00000009999e\");\n try {\n attr.getFloatValue();\n fail(\"incorrect float conversion from non float\");\n } catch (DataConversionException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n }\n\n }", "public float leerFloat() throws IOException\r\n {\r\n return maestro.readFloat(); \r\n }", "public Double getDouble(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Double) extGet(key);\n\t}", "String doubleRead();", "public float getFloat(String key, float fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getFloat(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return -1;\n Object obj = data.get(key);\n try\n {\n return Float.parseFloat(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "public float getFloat(String plcAddress) throws Df1LibraryNativeException\n\t{\n\t\treturn Df1_Read_Float(plcAddress);\n\t}", "public abstract float getasFloat(int tuple, int val);", "void writeEntry(String key, double value, Unit unit, boolean mandatory) throws IOException;", "public float readFloat() {\n\t\tif(!isInit) return 0F;\n\t\tfloat result = 0F;\n\t\tisListening = true;\n\t\twriteLine(\"Waiting for Float input...\");\n\t\twhile(isListening) {\n\t\t\ttry {\n\t\t\t\tresult = Float.parseFloat(inputArea.getText());\n\t\t\t} catch(NumberFormatException nfe) {\n\t\t\t\tresult= 0F;\n\t\t\t}\n\t\t}\n\t\tinputArea.setText(\"\");\n\t\twriteLine(\"Input: \" + result);\n\t\treturn result;\n\t}", "public static double getDouble(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Double.parseDouble(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as a double.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}", "public float readFloat() throws IOException {\n\n\t\tif (read(bb, 0, 4) < 4) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\tint i = bb[0] << 24 | (bb[1] & 0xFF) << 16 | (bb[2] & 0xFF) << 8\n\t\t\t\t| (bb[3] & 0xFF);\n\t\treturn Float.intBitsToFloat(i);\n\n\t}", "public Double getDouble(String key, Double defaultValue);", "double floatField(String name, boolean isDefined, double value,\n FloatSpecification spec) throws NullField, InvalidFieldValue;", "public static void setDoubleForKey(String key, double value) {\n SharedPreferences settings = ((Activity) sContext)\n .getSharedPreferences(CELibHelper.PREFS_NAME, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putFloat(key, (float) value);\n editor.commit();\n }", "double getFloatingPointField();", "public double readDouble() throws IOException {\n return in.readDouble();\n }", "Double getFreeFloat();", "public static Float parseJsonTogetValue(Response response,String key) {\n\t\tJsonPath js= new JsonPath(response.asString());\n\t\treturn js.get(key);\n\t}", "double getDouble(String key) {\n double value = 0.0;\n try {\n value = mConfigurations.getDouble(key);\n } catch (JSONException e) {\n sLogger.error(\"Error retrieving double from JSONObject. @ \" + key);\n }\n return value;\n }", "void setDouble(String key, double val);", "public float getFloat() throws NoSuchElementException,\n\t NumberFormatException\n {\n\tString s = tokenizer.nextToken();\n\treturn Float.parseFloat(s);\n }", "public abstract float getValue();", "public float approach_x_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 41, 4))); }", "public Double getDouble(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.DOUBLE)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), Double.class);\n\t\treturn (Double)value.value;\n\t}", "public double getDouble(String name) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Float value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).doubleValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Double.parseDouble((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Float value required, but found: \" + val);\n\t\t}\n\t}", "public void read () throws IOException, ClassNotFoundException {\n BufferedReader reader = FileManager.getReader\n (JerboaProperties.getString(\"KeyFeatureContainer.filename\"));\n double kThreshold = JerboaProperties.getDouble(\"KeyFeatureContainer.keyThreshold\",0.0);\n double fThreshold = JerboaProperties.getDouble(\"KeyFeatureContainer.featureThreshold\",0.0);\n\n String line;\n String[] tokens;\n double x;\n line = reader.readLine();\n tokens = line.split(\"\\\\t\");\n \n sf = Double.parseDouble(tokens[2]);\n\n while ((line = reader.readLine()) != null) {\n tokens = line.split(\"\\\\t\");\n if (tokens.length == 2) {\n if ((! filterKeys) || kTable.containsKey(tokens[0])) {\n x = Double.parseDouble(tokens[1]);\n if (x >= kThreshold)\n kTable.put(tokens[0],x);\n else if (filterKeys)\n kTable.remove(tokens[0]);\n }\n } else {\n x = Double.parseDouble(tokens[1]);\n if (x >= fThreshold) {\n kfTable.put(tokens[0],x);\n fTable.put(tokens[0],Double.parseDouble(tokens[2]));\n }\n }\n }\n }", "public float readFloat()\r\n/* 447: */ {\r\n/* 448:460 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 449:461 */ return super.readFloat();\r\n/* 450: */ }", "double readDouble()\n throws IOException {\n return Double.longBitsToDouble( readLong() );\n }", "public float approach_x_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 40, 4))); }", "public static double getDouble(Key key) {\n return getDouble(key, 0);\n }", "public abstract void read_float_array(float[] value, int offset, int\nlength);", "static double readDouble() throws Exception {\n\t\treturn Double.parseDouble(readString());\n\t}", "@Override\n public void saveFloat(String key, float value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putFloat(key, value);\n prefs.commit();\n }", "public Pair(String state, double value) {\r\n\t\tthis.key = state;\r\n\t\tthis.val = value;\r\n\t}", "Double getFieldFloat(VcfGenotype vcfGenotype) {\n\t\tString value = getFieldString(vcfGenotype);\n\t\tif (value == null) return (Double) gtFieldNotFound(vcfGenotype);\n\t\treturn Gpr.parseDoubleSafe(value);\n\t}", "public static float readFloat()\n \n {\n float f=0.0f;\n String wort=\"xxxx\";\n try {\n wort=eingabe.readLine();\n f=Float.valueOf(wort).floatValue() ;\n } catch(IOException e1) {\n System.out.println(\"Eingabefehler, bitte noch einmal!\");\n f=readFloat();\n } catch(NumberFormatException e2) {\n if(wort.equals(\"\"))\n System.out.println(\"Bitte etwas eingeben, noch einmal:\");\n else {\n System.out.print(\"Fehler beim Format, \");\n System.out.println(\"bitte noch einmal!\");}\n f=readFloat();\n }\n return f;\n }", "public\n double getProperty_double(String key)\n {\n if (key == null)\n return 0.0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0.0;\n\n double ret_double = 0.0;\n try\n {\n Double workdouble = new Double(val);\n ret_double = workdouble.doubleValue();\n }\n catch(NumberFormatException e)\n {\n ret_double = 0.0;\n }\n\n return ret_double;\n }", "private native void Df1_Write_Float(String plcAddress,float value) throws Df1LibraryNativeException;", "public double getVariableValue(){\n\t\tObject valueKey = getEntries().keySet().stream().findFirst().orElseGet(()->{return 0d;});\n\t\tif (valueKey instanceof Double){\n\t\t\treturn (Double) valueKey;\n\t\t}\n\t\ttry {\n\t\t\tdouble value = Double.parseDouble(valueKey+\"\");\n\t\t\treturn value;\n\t\t}\n\t\tcatch (NumberFormatException ex){\n\t\t\treturn 0d;\n\t\t}\n\t}", "public Float getFloat(String attr) {\n return (Float) super.get(attr);\n }", "private final float get_FLOAT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos()) {\n byte[] bytes = new byte[4];\n dataBuffer_.getBytes(columnDataPosition_[column - 1], bytes);\n return FloatingPoint.getFloat_hex(bytes, 0);\n// return dataBuffer_.getFloat(columnDataPosition_[column - 1]);\n } else {\n return dataBuffer_.getFloatLE(columnDataPosition_[column - 1]);\n// return FloatingPoint.getFloat(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }\n }", "public static _float parse(javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n _float object = new _float();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n object.set_float(java.lang.Float.NaN);\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.microsoft.com/2003/10/Serialization/\",\n \"float\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.set_float(org.apache.axis2.databinding.utils.ConverterUtil.convertToFloat(\n content));\n } else {\n object.set_float(java.lang.Float.NaN);\n\n reader.getElementText(); // throw away text nodes if any.\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public float getFloat(String property)\n\tthrows PropertiesPlusException\n\t{\n\t\tString value = getProperty(property);\n\t\tif (value == null)\n\t\t\tthrow new PropertiesPlusException(property+\" is not defined.\");\n\n\t\ttry\n\t\t{\n\t\t\treturn Float.valueOf(value);\n\t\t}\n\t\tcatch (NumberFormatException ex)\n\t\t{\n\t\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%s = %s cannot be converted to type double\", property, value));\n\t\t}\n\t}", "public static HashMap readVF(String mapF) throws IOException{\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(mapF)));\n\t\tString line = input.readLine();//pair\n\t\tHashMap map = new HashMap();\n\t\twhile(line!=null){\n\t\t\tString vector = input.readLine();\n\t\t\tmap.put(line.substring(1), vector);\n\t\t\tline = input.readLine();\n\t\t}\n\t\tinput.close();\n\t\treturn map;\n\t}", "public static final float getFloat(ClassFile cf, short cpiIndex) {\n FloatInfo fi = (FloatInfo) cf.getCpInfo(cpiIndex);\n return Float.intBitsToFloat(fi.bytes);\n }", "public double readDouble() throws IOException {\n\n\t\tif (read(bb, 0, 8) < 8) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\tint i1 = bb[0] << 24 | (bb[1] & 0xFF) << 16 | (bb[2] & 0xFF) << 8\n\t\t\t\t| (bb[3] & 0xFF);\n\t\tint i2 = bb[4] << 24 | (bb[5] & 0xFF) << 16 | (bb[6] & 0xFF) << 8\n\t\t\t\t| (bb[7] & 0xFF);\n\n\t\treturn Double.longBitsToDouble(((long) i1) << 32\n\t\t\t\t| ((long) i2 & 0x00000000ffffffffL));\n\t}", "private static Double getDoubleProperty(String key) {\n String value = PROPERTIES.getProperty(key);\n // if the key is not found, Properties will return null and we should return a default value\n if (value == null) {\n return 0.0;\n }\n return Double.parseDouble(value);\n }", "private static void ProcessObsValData(byte[] data) throws Exception{\n\t\tFloatType ft = new FloatType(0xFF000270);\n\t\t//System.out.println(\" byteValue: \" + getHexString(data));\n\t\tSystem.out.println(\" Value: \" + ft);\n\t}", "@Test\n public void testParseFloat() {\n FloatSpec floatSpec = new FloatSpec();\n floatSpec.setDefaultValue(0f);\n dataTypeParser.setDataTypeSpec(floatSpec);\n dataTypeParser.parse();\n FloatSpec parsedFloatSpec = (FloatSpec) dataTypeParser.getDataTypeSpec();\n\n assertNull(parsedFloatSpec.getMinValue());\n assertNull(parsedFloatSpec.getMaxValue());\n }", "Double getValue();", "public static final Double getDouble(ClassFile cf, short cpiIndex) {\n DoubleInfo di = (DoubleInfo) cf.getCpInfo(cpiIndex);\n return Double.longBitsToDouble(((long) di.highBytes << 32) | (0xffffffffL & di.lowBytes));\n }", "public static float getValueFloat()\n {\n return Util.valueFloat;\n }", "private double readDouble() throws IOException {\n\t\treturn (isBigEndian ? ioReadDouble() : Double.longBitsToDouble(readLELong()));\n\t}", "public static double readByte() {\n return Byte.parseByte(readString());\n }" ]
[ "0.69298047", "0.6726086", "0.6725017", "0.67062366", "0.6580367", "0.6552954", "0.65268844", "0.64156556", "0.63893473", "0.63575715", "0.63470227", "0.62929934", "0.61938834", "0.6184861", "0.61250377", "0.6042877", "0.6014297", "0.6011375", "0.5998156", "0.59719026", "0.5963862", "0.5954907", "0.5930029", "0.5896426", "0.5894567", "0.58424795", "0.58264095", "0.58131284", "0.5780735", "0.57404226", "0.57343113", "0.57201344", "0.57051635", "0.5667457", "0.56542635", "0.56542635", "0.56542635", "0.5649697", "0.5643458", "0.56265146", "0.5615604", "0.5607701", "0.55832136", "0.5578315", "0.55766267", "0.5552562", "0.55207044", "0.5512835", "0.55128163", "0.5507311", "0.5502388", "0.5500556", "0.5479429", "0.5468599", "0.5460246", "0.5458066", "0.5453587", "0.54534435", "0.5448275", "0.5448009", "0.5443793", "0.5437778", "0.5435582", "0.5432613", "0.5429081", "0.5415786", "0.54095846", "0.5401308", "0.53741616", "0.53710943", "0.5368558", "0.53673536", "0.5361176", "0.5358001", "0.53466284", "0.532535", "0.53221834", "0.529445", "0.52928674", "0.52865845", "0.52844524", "0.52832144", "0.5274109", "0.52710646", "0.52642816", "0.52626485", "0.52579856", "0.52522326", "0.52505267", "0.5248086", "0.52444905", "0.5230471", "0.52283883", "0.5224056", "0.5202297", "0.5199288", "0.51987535", "0.51975304", "0.5193688", "0.51925844" ]
0.65155077
7
Read an integer keyvalue pair.
public void read(IntKvp intKvp) { int m_Int = valBuffer.getInt(intKvp.getFieldOffset()); intKvp.setValue(m_Int); intsMap.put(intKvp.getKeyNum(), intKvp.getValue()); logger.log(intKvp.getLogString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getInt(K key) throws ClassCastException;", "int getInt(String key);", "int getInt(String key) throws KeyValueStoreException;", "int getInt( String key, int def);", "public Integer getIntegerData(String key) {\n return pref.getInt(key, 0);\n }", "public int getInteger(String key) {\r\n try {\r\n return Integer.decode(getString(key)).intValue();\r\n }\r\n catch (Exception e) {\r\n return 0;\r\n }\r\n }", "public int getIntValue(String keyName)\n {\n return Integer.parseInt(getValue(keyName));\n }", "public static int readInt() {\n return Integer.parseInt(readString());\n }", "String intRead();", "public int getInt(String key)\n {\n return getInt(key, 0);\n }", "public static int getInt(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as an integer.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}", "public int getInt(String key) {\n return Integer.parseInt(mMap.get(key));\n }", "public static int getInt(String key, int i) {\n\t\tString token = getSystemString(key);\n\t\tif (token == null) {\n\t\t\treturn i;\n\t\t}\n\t\treturn Integer.parseInt(token);\n\t}", "public int getInt(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for integer configuration parameter: \" + key);\n\t\t}\n\t}", "public int readInt() throws IOException {\n return in.readInt();\n }", "public int readInt() throws IOException;", "private int getKey(final DataInputStream in) throws IOException {\n int inkey = Integer.parseInt(in.readUTF());\n System.out.println(inkey);\n return inkey;\n }", "public int getInt(String key, int defaultValue);", "int readInt() throws IOException;", "public int readInt();", "static int readInt() throws Exception {\n\t\treturn Integer.parseInt(readString());\n\t}", "protected synchronized int getIntegerValue(String tag) {\n int returnInt = 0;\n if (actualProperties != null) {\n returnInt = Integer.decode(actualProperties.getProperty(tag, \"0\"));\n }\n return returnInt;\n }", "int getInt(String key, int defaultValue);", "public Integer getInteger(String key, Integer defaultValue);", "private int getValue(final String name, final String key) {\n\t\treturn Integer.parseInt(bundleConstants.getString(name + SEPERATOR + key));\n\t}", "public Integer getInt(String key)\n\t{\n\t\tLong l = getLong(key);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.intValue();\n\t}", "public int getInt(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? ((Long)value).intValue() : 0);\n }", "public static Integer getInteger(String inKey) {\r\n Object o = getProperties().get(inKey);\r\n\r\n if (o == null) {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getInteger: \" + inKey + \", result null\");\r\n }\r\n return null;\r\n }\r\n\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getInteger: \" + inKey + \", result \" + o);\r\n }\r\n if (o instanceof Integer) {\r\n return (Integer) o;\r\n }\r\n if (!(o instanceof String)) {\r\n throw new IllegalArgumentException(\"Config property: \" + inKey\r\n + \" is not an Integer or String: \" + o.getClass());\r\n }\r\n try {\r\n return new Integer((String) o);\r\n } catch (Exception e) {\r\n LOG.warn(\"Not an integer value: \" + o + \" for property \" + inKey);\r\n return null;\r\n }\r\n }", "public int getInteger(String key) {\n\t\tint defaultValue = 0;\n\t\tif (getDefault(key) != null)\n\t\t\tdefaultValue = (Integer) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(sp);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}", "public Integer getInteger(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Integer) extGet(key);\n\t}", "int readInt();", "public int readInt() {\n return ((int) readLong());\n }", "public static int getInt() throws IOException {\r\n String s = getString();\r\n return Integer.parseInt(s);\r\n }", "public int getInt(String key) throws AgentBuilderRuntimeException {\n\t\treturn getInteger(key).intValue();\n\t}", "public int getIntegerProperty(String key) {\n\t\treturn Integer.parseInt(this.getProperty(key));\n\t}", "void setInt(String key, int val);", "public Integer readIntegerFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your number:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString number = null;\r\n\t\tnumber = br.readLine();\r\n\t\treturn new Integer(number);\r\n\t}", "public static int getInt() throws IOException {\n String s = getString();\n return Integer.parseInt(s);\n }", "public int getInt( String key )\n {\n int value = 0;\n try\n {\n if ( config != null )\n {\n value = config.getInt( key );\n LOG.debug( \"getInt name [{}] value [{}]\", key, value );\n }\n else\n {\n LOG.warn( \"getInt invalid config, can't read prop [{}]\", key );\n }\n }\n catch (org.apache.commons.configuration.ConversionException e)\n {\n LOG.debug( \"getInt can't read prop [{}], exception [{}]\", key, e );\n }\n return value;\n }", "private static int getIntegerProperty(String key) {\n String value = PROPERTIES.getProperty(key);\n // if the key is not found, Properties will return null and we should return a default value\n if (value == null) {\n return 0;\n }\n return Integer.parseInt(value);\n }", "@Override\n public final int readVarint32() throws IOException {\n return (int) readVarint64();\n }", "Object readValue();", "String get(Integer key);", "public int getMandatoryInt(String key) throws ConfigNotFoundException;", "public int getInt(String key) {\n int value = 0;\n try {\n value = mConfigurations.getInt(key);\n } catch (JSONException e) {\n sLogger.error(\"Error retrieving integer from JSONObject.\");\n }\n return value;\n }", "public int getIntegerProperty(String key) {\n String val = getProperty(key);\n return (null == val ? 1 : Integer.parseInt(val));\n }", "Integer getValue();", "Integer getValue();", "public Integer getInt(String key) throws JsonException {\r\n\t\tObject object = get(key);\r\n\t\tInteger result = PrimitiveDataTypeConvertor.toInteger(object);\r\n\t\tif (result == null) {\r\n\t\t\tthrow PrimitiveDataTypeConvertor.exceptionType(key, object, \"Integer\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public int s2i(String key) throws AgentBuilderRuntimeException {\n\t\tint result = 0;\n\t\ttry {\n\t\t\tresult = Integer.parseInt(str(key));\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new AgentBuilderRuntimeException(e);\n\t\t} catch (AgentBuilderRuntimeException e) {\n\t\t\tthrow e;\n\t\t}\n\t\treturn result;\n\t}", "private int getInt() {\n intBuffer.rewind();\n archive.read(intBuffer);\n intBuffer.flip();\n return intBuffer.getInt();\n }", "public int getPropertyInt(String key);", "public int get(int key) {\n return 1;\n }", "public int readInt(String prompt);", "E read(K id);", "public static int getInt() throws IOException {\n\t\nString s = getString();\nreturn Integer.parseInt(s);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the integer in the string as an Int.\n\t\n}", "public int getInt(String name) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Integer value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).intValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Integer.parseInt((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Integer value required, but found: \" + val);\n\t\t}\n\t}", "public\n int getProperty_int(String key)\n {\n if (key == null)\n return 0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0;\n\n int ret_int = 0;\n try\n {\n Integer workint = new Integer(val);\n ret_int = workint.intValue();\n }\n catch(NumberFormatException e)\n {\n ret_int = 0;\n }\n\n return ret_int;\n }", "public int readInt() {\n return Integer.parseInt(readNextLine());\n }", "private int getEntryFieldInt(int item, OFFSET offset) {\n switch (offset) {\n case KEY_LENGTH:\n // return two low bytes of the key length index int\n return (entries[item + offset.value] & KEY_LENGTH_MASK);\n case KEY_BLOCK:\n // offset must be OFFSET_KEY_BLOCK, return 2 high bytes of the int inside key length\n // right-shift force, fill empty with zeroes\n return (entries[item + offset.value] >>> KEY_BLOCK_SHIFT);\n case VALUE_LENGTH:\n return (entries[item + offset.value] & VALUE_LENGTH_MASK);\n case VALUE_BLOCK:\n return (entries[item + offset.value] >>> VALUE_BLOCK_SHIFT);\n default:\n return entries[item + offset.value];\n }\n }", "public int getInteger(short dictionaryKey) {\n\t\treturn intsMap.get(dictionaryKey);\n\t}", "public Integer getInt(String attr) {\n return (Integer) super.get(attr);\n }", "public static int readInt1(Context context, String fileName, String key) {\n if (context == null) return -1;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n return sharedPreferences.getInt(key, -1);\n }", "private static Integer getInteger(BufferedReader reader) throws IOException{\n Integer result=null;\n while(result==null) {\n try {\n result = Integer.parseInt(reader.readLine().trim());\n } catch (NumberFormatException e) {\n throw new NumberFormatException(\"You should feed integer for this input.\");\n }\n }\n return result;\n }", "public static int readInt(){\n\t\tSystem.out.println();\n\t\tstringInput = readInput();\n\t\ttry{\n\t\t\tintInput = Integer.parseInt(stringInput);\n\t\t}\n\t\tcatch (NumberFormatException ex) {\n\t\t System.err.println(\"Not a valid number: \" + stringInput);\n\t\t}\n\t\treturn intInput; \t\t\n\t}", "public int read(int i);", "public int getAsInt(String key) {\n return getAsInt(key, 0);\n }", "public IntegerKey(final int number) {\n super(Integer.class);\n this.number = number;\n }", "private int read_int(RandomAccessFile file) throws IOException {\n int number = 0;\n for (int i = 0; i < 4; ++i) {\n number += (file.readByte() & 0xFF) << (8 * i);\n }\n return number;\n }", "private int getIntegerProperty(ParameterList key, int defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"The input parameter (\" + key.name + \") was not found\");\n }\n else if(!keyPresent || strValue.equals(\"\")){\n loadedParametersLog.append(key.name).append(\"=\").append(defaultValue).append(\" (DEFAULT)\\n\");\n return defaultValue;\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return Integer.parseInt(strValue);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(e.getMessage() + \"\\nThe input parameter (\" + key.name + \") could not be converted to int.\");\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }", "public int readValue() { \n\t\treturn (port.readRawValue() - offset); \n\t}", "public int get(int key) {\n return data[key % KEY];\n }", "public int readMapHeader() throws IOException {\n return in.readInt();\n }", "private static int readInt(InputStream is) throws IOException {\n int a = is.read();\n int b = is.read();\n int c = is.read();\n int d = is.read();\n return a | b << 8 | c << 16 | d << 24;\n }", "public static Integer readInteger(DataInputStream dis) throws IOException {\r\n\t\tif(dis.readBoolean())\r\n\t\t\treturn new Integer(dis.readInt());\r\n\t\treturn null;\r\n\t}", "public int get(int key) {\n return store[key]; // get the value for the key\n }", "public static int readInteger(String prompt) throws IOException {\r\n\t\tint value = 0;\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.print(prompt + \" _>\");\r\n\t\t\t\tvalue = Integer.valueOf(reader.readLine()).intValue();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.err.println(ex.getLocalizedMessage());\r\n\t\t\t\tthrow ex;\r\n\t\t\t} catch (NumberFormatException ex) {\r\n\t\t\t\tSystem.err.println(\"Conversion Error: \" + ex.getLocalizedMessage());\r\n\t\t\t\treturn readInteger(\"Try again: \" + prompt);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "public int getInt(String name)\r\n throws NumberFormatException\r\n {\r\n return Integer.parseInt(getString(name));\r\n }", "private int read(int width) throws JSONException\n {\n try\n {\n int value=this.bitreader.read(width);\n if(probe)\n {\n log(value,width);\n }\n return value;\n }\n catch(Throwable e)\n {\n throw new JSONException(e);\n }\n }", "public static int getInt(Tag tag){\n makeInstance();\n return settingsFile.getInt(tag);\n }", "public int readInt(){\n\t\tif(sc.hasNextInt()){\n\t\t\treturn sc.nextInt();\n\t\t}\n\t\tsc.nextLine();\n\t\treturn -1;\n\t}", "public static int getInt(Integer value)\r\n\t{\r\n\t\treturn getInt(value, 0);\r\n\t}", "public int getValue(String name) {\n String path = ITEMS_PATH + name + \".json\";\n HashMap<String, Integer> item = null;\n Gson gson = new Gson();\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(path));\n Type type = new TypeToken<HashMap<String, Integer>>() {\n }.getType();\n item = gson.fromJson(bufferedReader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return item.get(\"value\");\n }", "public final int getInt32(int i) {\n if (isAvailable(i, 4)) {\n return this.data.getInt(i);\n }\n return -1;\n }", "public final int getInt(final String tagToGet) {\n try {\n return Integer.parseInt(getStr(tagToGet));\n } catch (final Exception t) {\n return 0;\n }\n }", "public Integer getInteger(String key) {\n if (!jsonData.has(key))\n return null;\n try {\n return jsonData.getInt(key);\n } catch (Exception ex) {\n return null;\n }\n }", "private native short Df1_Read_Integer(String plcAddress) throws Df1LibraryNativeException;", "public static Integer getInteger(String key)\n\t\t\tthrows MissingResourceException {\n\t\treturn Integer.valueOf(resourceBundle.getString(key));\n\t}", "public static int getIntForKey(String key)\n\t{\n\t\treturn PreferencesModel.instance().getUserIntPref(key, -1);\n\t}", "public static int getIntProperty(String key) {\r\n\t\treturn getIntProperty(key, 0);\r\n\t}", "public int readInt() throws IOException {\n int token = fTokenizer.nextToken();\n if (token == StreamTokenizer.TT_NUMBER)\n return (int) fTokenizer.nval;\n\n String msg = \"Integer expected in line: \" + fTokenizer.lineno();\n throw new IOException(msg);\n }", "public static int readInt(Context context, String fileName, String key) {\n if (context == null) return 0;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n return sharedPreferences.getInt(key, 0);\n }", "private static Integer readRegister(RegisgerName_Value<String, Integer> pair)\n\t{\n\t\tif (pair != null && registerFile.containsKey(pair.getKey()))\n\t\t{\n\t\t\treturn registerFile.get(pair.getKey());\n\t\t}\n\t\treturn null;\n\t}", "public static int getInt(String value)\r\n\t{\r\n\t\treturn getInt(value, 0);\r\n\t}", "public int read_int32() throws IOException {\n byte bytes[] = read_bytes(4);\n\n return bytesToInt32(bytes, Endianness.BIG_ENNDIAN);\n }", "IntegerValue getValueObject();", "public static Integer getInteger(String key, String consumer) {\n systemPropertyQueried(key, consumer);\n return Integer.getInteger(key);\n }", "IntegerValue createIntegerValue();", "IntegerValue createIntegerValue();", "public int read() {\n return (readInt());\n }" ]
[ "0.6836465", "0.6807015", "0.6783385", "0.64856374", "0.6449843", "0.6411111", "0.6271749", "0.6264691", "0.62314314", "0.62300926", "0.61873686", "0.6115583", "0.6082002", "0.60729486", "0.6053647", "0.60404146", "0.60376364", "0.6032201", "0.6030878", "0.60283595", "0.60077494", "0.60036594", "0.5988846", "0.5969847", "0.5963219", "0.5963167", "0.590924", "0.59040666", "0.5897606", "0.5889446", "0.58686274", "0.5858327", "0.584991", "0.5829237", "0.58289605", "0.58234614", "0.58005464", "0.5795151", "0.5792847", "0.57785034", "0.57747406", "0.5746123", "0.5740058", "0.5737065", "0.57218987", "0.57216775", "0.57115453", "0.57115453", "0.5695611", "0.5684739", "0.567966", "0.5652572", "0.5650297", "0.56185347", "0.56135535", "0.56128", "0.56063163", "0.5576176", "0.55590796", "0.5553295", "0.5552642", "0.5542435", "0.5534278", "0.552734", "0.55255", "0.55187786", "0.5500935", "0.549743", "0.549109", "0.54857725", "0.54816383", "0.5465585", "0.5454546", "0.5451462", "0.54455703", "0.544128", "0.54294837", "0.54293245", "0.5423617", "0.54166", "0.5409883", "0.54082936", "0.5402287", "0.5395257", "0.5392003", "0.5387572", "0.5385389", "0.5382208", "0.5378348", "0.5378031", "0.5376169", "0.5358105", "0.5357001", "0.5351949", "0.53516257", "0.53472817", "0.5343158", "0.5339348", "0.5339348", "0.5333178" ]
0.6228646
10
Read a short integer keyvalue pair.
public void read(ShortKvp shortKvp) { short shortValue = valBuffer.getShort(shortKvp.getFieldOffset()); shortKvp.setValue(shortValue); shortsMap.put(shortKvp.getKeyNum(), shortKvp.getValue()); logger.log(shortKvp.getLogString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "short readShort();", "public abstract short read_short();", "short readShort() throws IOException;", "abstract int readShort(int start);", "public short readShort() throws IOException;", "String shortRead();", "public short readShort() {\n return ((short) readLong());\n }", "public short getShort(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (short)((Long)value).intValue() : 0);\n }", "private short readShort(SeekableStream stream)\n throws IOException {\n if (isBigEndian) {\n return stream.readShort();\n } else {\n return stream.readShortLE();\n }\n }", "public short getShort(String key)\n {\n return getShort(key, (short) 0);\n }", "private int getShort() {\n shortBuffer.rewind();\n archive.read(shortBuffer);\n shortBuffer.flip();\n return (int) shortBuffer.getShort();\n }", "protected int readShort(BinaryDataReader dataReader) throws IOException\n\t{\n\t\t// convert tag value to long offset for reading large buffer\n\t\tlong offset = ((long) this.value) & 0xffffffffL;\n\n\t\tlong pos0 = dataReader.getFilePointer();\n\t\tdataReader.seek(offset);\n\t\tint result = dataReader.readShort();\n\t\tdataReader.seek(pos0);\n\t\treturn result;\n\t}", "Short getValue();", "int processFirstShort(int index) {\n\t\t// process the first Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index);\n\t}", "public abstract short read_ushort();", "public abstract void read_short_array(short[] value, int offset, int\nlength);", "int processSecondShort(int index) {\n\t\t// process the second Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index + 1);\n\t}", "public short readVarShort() throws IOException {\n return readVarShort(7);\n }", "public static double readShort() {\n return Short.parseShort(readString());\n }", "public short readShort() throws IOException {\n\n\t\tif (read(bb, 0, 2) < 2) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\tshort s = (short) (bb[0] << 8 | (bb[1] & 0xFF));\n\t\treturn s;\n\t}", "public Short getShort(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Short) extGet(key);\n\t}", "int processFourthShortForShort(int index, int keyLength) {\n\t\t// process the fourth Short integer in the Key Entry Set\n\t\tif(keyLength == 1) {\n\t\t\t// SET KeyValueOffset = GeoKeyDirectory + GeoKeyOffset + 6\n\t\t\treturn (int) keyEntrySet.get(index+3);\n\t\t} else {\n\t\t\t// SET KeyValueOffset = GeoKeyDirectory + (KeyValueOffset * 2)\n\t\t\treturn (int) keyEntrySet.get(keyLength);\n\t\t}\n\t}", "public static final short readShort(InputStream in) throws IOException {\n byte[] buff = new byte[2];\n StreamTool.readFully(in, buff);\n return getShort(buff, 0);\n }", "public short readShort()\r\n/* 399: */ {\r\n/* 400:412 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 401:413 */ return super.readShort();\r\n/* 402: */ }", "public short s(String key) throws AgentBuilderRuntimeException {\n\t\treturn getShort(key).shortValue();\n\t}", "@Test\n public void testReadWriteShort() {\n System.out.println(\"readShort\");\n ByteArray instance = new ByteArray();\n \n instance.writeShort((short) 12, 0);\n instance.writeShort((short) 15, 2);\n instance.writeShort((short) 13, instance.compacity());\n \n assertEquals(12, instance.readShort(0));\n assertEquals(15, instance.readShort(2));\n assertEquals(13, instance.readShort(instance.compacity() - 2));\n \n instance.writeShort((short) 14, 2);\n assertEquals(14, instance.readShort(2));\n }", "public short getShort(String name) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).shortValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Short.parseShort((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but found: \" + val);\n\t\t}\n\t}", "void writeShort(int v) throws IOException;", "void writeShort(short value);", "short decodeShort();", "public short getValue() {\n return value;\n }", "public Short S(String key) throws AgentBuilderRuntimeException {\n\t\treturn getShort(key);\n\t}", "public Short _parseShort(JsonParser jVar, DeserializationContext gVar) throws IOException {\n JsonToken l = jVar.mo29328l();\n if (l == JsonToken.VALUE_NUMBER_INT) {\n return Short.valueOf(jVar.mo29336B());\n }\n if (l == JsonToken.VALUE_STRING) {\n String trim = jVar.mo29334t().trim();\n if (trim.length() == 0) {\n return (Short) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Short) _coerceTextualNull(gVar, this._primitive);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n int a = NumberInput.m23779a(trim);\n if (_shortOverflow(a)) {\n return (Short) gVar.mo31517b(this._valueClass, trim, \"overflow, value cannot be represented as 16-bit value\", new Object[0]);\n }\n return Short.valueOf((short) a);\n } catch (IllegalArgumentException unused) {\n return (Short) gVar.mo31517b(this._valueClass, trim, \"not a valid Short value\", new Object[0]);\n }\n } else if (l == JsonToken.VALUE_NUMBER_FLOAT) {\n if (!gVar.mo31509a(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) {\n _failDoubleToIntCoercion(jVar, gVar, \"Short\");\n }\n return Short.valueOf(jVar.mo29336B());\n } else if (l == JsonToken.VALUE_NULL) {\n return (Short) _coerceNullToken(gVar, this._primitive);\n } else {\n if (l == JsonToken.START_ARRAY) {\n return (Short) _deserializeFromArray(jVar, gVar);\n }\n return (Short) gVar.mo31493a(this._valueClass, jVar);\n }\n }", "public short getValue() {\n return value;\n }", "@Test\n public void testShort() {\n assertEquals(\"32767\", hiveTypeToJson(new MyHiveType(new ShortWritable(Short.MAX_VALUE), shortTypeInfo)));\n }", "@Override\n\tpublic short readScalarShort() throws IOException {\n\t\treturn 0;\n\t}", "public short readShortNonBlock() {\n return ((short) readLongNonBlock());\n }", "public static _short parse(javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n _short object = new _short();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n object.set_short(java.lang.Short.MIN_VALUE);\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.microsoft.com/2003/10/Serialization/\",\n \"short\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.set_short(org.apache.axis2.databinding.utils.ConverterUtil.convertToShort(\n content));\n } else {\n object.set_short(java.lang.Short.MIN_VALUE);\n\n reader.getElementText(); // throw away text nodes if any.\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public short getShort(int pos) {\n return Tuples.toShort(getObject(pos));\n }", "public int read(short[] s) throws IOException {\n\t\treturn read(s, 0, s.length);\n\t}", "public short getShort(int index)\r\n/* 328: */ {\r\n/* 329:342 */ ensureAccessible();\r\n/* 330:343 */ return _getShort(index);\r\n/* 331: */ }", "@Override\r\n\tpublic short getShort(int pos) {\n\t\treturn buffer.getShort(pos);\r\n\t}", "int processThirdShort(int index) {\n\t\t// process the third Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index + 2);\n\t}", "private native short Df1_Read_Integer(String plcAddress) throws Df1LibraryNativeException;", "public short getShortA() {\n\t\tint i = (payload.get() & 0xFF) << 8 | payload.get() - 128 & 0xFF;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "private final short get_SMALLINT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos())\n return dataBuffer_.getShort(columnDataPosition_[column - 1]);\n else\n return dataBuffer_.getShortLE(columnDataPosition_[column - 1]);\n// return SignedBinary.getShort(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }", "public short getShort(short dictionaryKey) {\n\t\treturn shortsMap.get(dictionaryKey);\n\t}", "public int readUnsignedShort() throws IOException {\n\n\t\tif (read(bb, 0, 2) < 2) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\treturn (bb[0] & 0xFF) << 8 | (bb[1] & 0xFF);\n\t}", "Short getShort(int col_num) throws ConnException;", "public short readShortLE()\r\n/* 817: */ {\r\n/* 818:826 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 819:827 */ return super.readShortLE();\r\n/* 820: */ }", "int readS16LE()\n throws IOException, EOFException;", "public short readAsShort(int nrBits) {\n return readAsShort(bitPos, nrBits, ByteOrder.BigEndian);\n }", "public short getElement_data(int index1) {\n return (short)getUIntBEElement(offsetBits_data(index1), 8);\n }", "public short getLEShort() {\n\t\tint i = payload.get() & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public static final short getShort(ClassFile cf, short cpiIndex) {\n IntegerInfo ii = (IntegerInfo) cf.getCpInfo(cpiIndex);\n return (short) ii.bytes;\n }", "void setValue(Short value);", "void setShort(int index, short value) throws SQLException;", "public short getShort(int addr) throws ProgramException {\n return (short) getLittleEndian(addr, Short.BYTES);\n }", "public short readVarShort(int optimal) throws IOException {\n int[] varShortDepths = {optimal, 16};\n final int type = (int) this.read(1).toLong();\n return (short) this.read(varShortDepths[type]).toLong();\n }", "public short getShort(int columnIndex) throws SQLException\n {\n return m_rs.getShort(columnIndex);\n }", "protected static final int parseUnsignedShort(ByteArrayInputStream stream) throws EOFException\n {\n return (EASMessage.parseUnsignedByte(stream) << 8) | EASMessage.parseUnsignedByte(stream);\n }", "public short key();", "static Value<Short> parseShort(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Short.parseShort(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "public short getShort(int columnIndex) throws SQLException {\n\n try {\n debugCodeCall(\"getShort\", columnIndex);\n return get(columnIndex).getShort();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "int getInt(String key);", "public static UnsignedShort parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n UnsignedShort object = new UnsignedShort();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.microsoft.com/2003/10/Serialization/\",\n \"unsignedShort\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.setUnsignedShort(org.apache.axis2.databinding.utils.ConverterUtil.convertToUnsignedShort(\n content));\n } else {\n reader.getElementText(); // throw away text nodes if any.\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "int readS16BE()\n throws IOException, EOFException;", "public final int getSignedShort(final boolean endianess) throws IOException {\r\n b3 = 0;\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n b3 = ( (tagBuffer[bPtr] & 0xff) << 8) | (tagBuffer[bPtr + 1] & 0xff);\r\n } else {\r\n b3 = ( (tagBuffer[bPtr + 1] & 0xff) << 8) | (tagBuffer[bPtr] & 0xff);\r\n }\r\n\r\n if ( (b3 & 0x0080) != 0) {\r\n b3 = b3 | 0xff00;\r\n }\r\n\r\n bPtr += 2;\r\n\r\n return b3;\r\n }", "public static short parseHexShort(CharSequence seq) {\n short result = 0;\n int last = seq.length() - 1;\n if (last > 3) {\n throw new NumberFormatException(\"Too many characters (> 8) for an \"\n + \"int in '\" + seq + \"'\");\n }\n if (Strings.startsWith(seq, \"0x\")) {\n seq = seq.subSequence(2, seq.length());\n }\n for (int i = last, j = 0; i >= 0; i--, j += 4) {\n int val = charToNybbl(seq.charAt(i));\n val <<= j;\n result |= val;\n }\n return result;\n }", "short getP( byte[] buffer, short offset );", "public static int encodeAsInt(short high, short low) {\n\n // Store the first short value in the highest 16 bits of the int\n int key = high | 0x00000000;\n key <<= 16;\n\n // Store the second short value in the lowest 16 bits of the int\n int lowInt = low & 0x0000FFFF;\n key |= lowInt;\n\n return key;\n\n }", "public short getShort(String key, short fallback)\n {\n if (key.contains(\".\"))\n {\n String[] pieces = key.split(\"\\\\.\", 2);\n DataSection section = getSection(pieces[0]);\n return section == null ? fallback : section.getShort(pieces[1], fallback);\n }\n\n if (!data.containsKey(key)) return fallback;\n Object obj = data.get(key);\n try\n {\n return Short.parseShort(obj.toString());\n }\n catch (Exception ex)\n {\n return fallback;\n }\n }", "int readS16LE(String name)\n throws IOException, EOFException;", "public static short getShort(byte[] buffer, int index, int len) {\n switch (len) {\n case 0: return (short) 0xFFFF;\n case 1: return (short) (0xFFFFFF00 | _getByte(buffer, index, 1));\n case 2: return _getShort(buffer, index, 2);\n default: throw new IllegalArgumentException(\"len is out of range: \" + len);\n }\n }", "public abstract void read_ushort_array(short[] value, int offset, int\nlength);", "public short getShort(String name, short defaultValue) {\n\t\tObject val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).shortValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Short.parseShort((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but found: \" + val);\n\t\t}\n\t}", "int getInt( String key, int def);", "public final short getInt16(int i) {\n if (isAvailable(i, 2)) {\n return this.data.getShort(i);\n }\n return -1;\n }", "public int readUnsignedShort()\r\n/* 405: */ {\r\n/* 406:418 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 407:419 */ return super.readUnsignedShort();\r\n/* 408: */ }", "public short toShort()\n\t{\n\t\treturn (short)this.ordinal();\n\t}", "protected final short getShort(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getShort(tableData, cursor+offset);\n }", "long readLong();", "public int getInteger(short dictionaryKey) {\n\t\treturn intsMap.get(dictionaryKey);\n\t}", "short getDP1( byte[] buffer, short offset );", "public short getLEShortA() {\n\t\tint i = payload.get() - 128 & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public void onReadShortBegin(ICPU cpu, int addr) {\n\t}", "public static byte getA(final short key)\n {\n return (byte) ((key >> SHIFT) & BITS);\n }", "public abstract int read_ulong();", "public Integer getInt(K key) throws ClassCastException;", "String intRead();", "private native void Df1_Write_Integer(String plcAddress,short value) throws Df1LibraryNativeException;", "public short getElement_entries_id(int index1) {\n return (short)getUIntElement(offsetBits_entries_id(index1), 8);\n }", "public Short getShort(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).shortValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null) {\n return Short.parseShort(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }", "public short getInteger(String plcAddress) throws Df1LibraryNativeException\n\t{\n\t\treturn Df1_Read_Integer(plcAddress);\n\t}", "public Short getShortAttribute();", "int readS16BE(String name)\n throws IOException, EOFException;", "public short toShort() {\n return this.toShortArray()[0];\n }", "String longRead();", "public String getShort() {\n return m_short;\n }", "protected void _setShort(int index, int value)\r\n/* 435: */ {\r\n/* 436:449 */ HeapByteBufUtil.setShort(this.array, index, value);\r\n/* 437: */ }" ]
[ "0.75523454", "0.738216", "0.7175734", "0.7132395", "0.70980847", "0.70129824", "0.6937123", "0.69338125", "0.67425734", "0.66384983", "0.65976954", "0.6514071", "0.650024", "0.6422567", "0.64049864", "0.6360216", "0.63597363", "0.63535535", "0.63380414", "0.62592643", "0.62310886", "0.62019515", "0.60936296", "0.6056891", "0.6028286", "0.60168207", "0.60166264", "0.59973633", "0.5984644", "0.59839666", "0.59652704", "0.5952821", "0.59075093", "0.5889617", "0.5885029", "0.586738", "0.5836436", "0.58140236", "0.58137673", "0.58062464", "0.5797009", "0.5792576", "0.5782027", "0.5770518", "0.57295656", "0.57108796", "0.57048786", "0.56690335", "0.5658056", "0.5654247", "0.56358284", "0.5601543", "0.558187", "0.55734026", "0.557195", "0.5571349", "0.556243", "0.55432", "0.5533764", "0.55265445", "0.55220246", "0.551055", "0.54976714", "0.5485663", "0.5477242", "0.54766804", "0.54707485", "0.5467201", "0.54652834", "0.54074425", "0.54010695", "0.53919035", "0.5390655", "0.53854364", "0.53690696", "0.5354488", "0.53416467", "0.5341454", "0.533554", "0.53344107", "0.5333932", "0.53152144", "0.53097296", "0.5301869", "0.5293222", "0.5287255", "0.5286944", "0.5274043", "0.52725077", "0.5272327", "0.5272044", "0.52661365", "0.52629113", "0.524991", "0.52491355", "0.52487904", "0.5248774", "0.5248202", "0.5243923", "0.5229849" ]
0.65345556
11
TODO Acc1 double balance, int accNumber, met deposit, met withdraw, toString TODO Acc2 double withdrawLimit TODO Acc3 double minBalace TODO Bank name, accounts, metoda creare oricariu tip si adaugare
public static void main(String[] args) { // write your code here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }", "public account(){\n this.accNo = 000;\n this.id = 000;\n this.atype = \"\";\n this.abal = 0.00;\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tLocale.setDefault(Locale.US);\r\n\t\t\r\n\t\t/*Account ac = new Account();\r\n\t\t 1-Manter essa instancia no inicio geraria erros pois os construtores pedem inicialização na CLASS account */\r\n\t\t\r\n\t\tAccount ac;//Declaramos acima pois será necessário utilizar fora do escopo dos construtores\r\n\t\t\r\n\t\tdouble deposit;\r\n\t\tSystem.out.print(\"Enter account number: \");\r\n\t\tint number=sc.nextInt();//2-Com isso devo criar novas variaveis \r\n\t\tSystem.out.print(\"Enter account holder: \");\r\n\t\tString holder=sc.next();\r\n\t\tSystem.out.print(\"Is the initial deposit(y/n)? \");\r\n\t\tchar response = sc.next().charAt(0);\r\n\t\tif (response=='y') {\r\n\t\t\tSystem.out.print(\"Enter initial deposite value: \");\r\n\t\t\tdeposit = sc.nextDouble();\r\n\t\t\tac = new Account(number,holder, deposit);/*Ponto de inicio do construtor pois ao escolher iniciar \r\n\t\t\tcom deposito ele inicia o metodo com parametos definidos*/\r\n\t\t} \r\n\t\telse {\r\n\t\t ac = new Account(number,holder);/*Poderia colocar o 0 no lugar do deposito mas como isso poderia gerar algum erro,a boa prática \r\n\t\t é fazer um outro metodo sobrecarga*/ \r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.printf(\"Account Data: %n\"+ac);\r\n\t\r\n\t\tSystem.out.println(\"Enter a deposit value:\");\r\n\t\tdeposit = sc.nextDouble();\r\n\t\tac.depositar(deposit); //Esse parametro objinstanciada.metodo(parametro) garante que o dado esta sendo armazendo no metodo\r\n\t\t\r\n\t\tSystem.out.printf(\"Updated Data: %n\"+ac);\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\t\r\n System.out.println();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter a withdraw value:\");\r\n\t\tdeposit = sc.nextDouble();\r\n\t\tac.saca(deposit);\r\n\t\t\r\n\t\tSystem.out.printf(\"Updated Data: %n\"+ac);\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tsc.close();\r\n\r\n\t\t\r\n\t}", "public Account(String name, double balance){\n\n this.name = name;\n\n if (balance > 0.0 )\n this.balance = balance;\n }", "Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }", "public String toString(){//method of return card number and balance\r\n return \"Card no:\" +number+\" has a balance of: \"+balance; \r\n }", "public String toString()\r\n\t{\r\n\t return \"Accnt nbr \"+getAcctNbr()+\" has balance of $\"+twoDigits.format(getBalance());\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint ch;\n\t\tAccount acc[]=new Account[10];\n\t\tfor(int i=0;i<acc.length;i++) {\n\t\t\tacc[i]=new Account();\n\t\t}\n\t\tint control=0,temp=0;\n\t\twhile(control<10) {\n\t\tSystem.out.println(\"Press the choosen option: \\n 1.Add new Account \\n 2.Display details of all account holder. \\n 3.Deposit Amount \\n 4. Withdraw Amount \\n 5.Exit \\n Enter your choice:\");\n\t\tch=sc.nextInt();\n\t\tswitch(ch) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Enter account no,name and balance:\");\n\t\t\tint accno;\n\t\t\tString accname;\n\t\t\tdouble accbal;\n\t\t\taccno=sc.nextInt();\n\t\t\taccname=sc.next();\n\t\t\taccbal=sc.nextDouble();\n\t\t\tacc[temp].insert(accno,accname,accbal);\n\t\t\tSystem.out.println(\"Values Enteres!\");\n\t\t\ttemp++;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"The details are:\");\n\t\t\tfor(int i=0;i<temp;i++) {\n\t\t\t\tSystem.out.println(acc[i].getno()+\" \"+acc[i].getname()+\" \"+acc[i].getbal());\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint accnum;\n\t\t\tdouble accamt;\n\t\t\tSystem.out.println(\"Enter account number and amount:\");\n\t\t\taccnum=sc.nextInt();\n\t\t\taccamt=sc.nextDouble();\n\t\t\tfor(int i=0;i<temp;i++) {\n\t\t\t\tif(acc[i].getno()==accnum) {\n\t\t\t\t\tSystem.out.println(\"Total Amount: \"+acc[i].deposit(accamt));\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tint accnumb;\n\t\t\tdouble accamot;\n\t\t\tSystem.out.println(\"Enter account number and amount:\");\n\t\t\taccnumb=sc.nextInt();\n\t\t\taccamot=sc.nextDouble();\n\t\t\tfor(int i=0;i<temp;i++) {\n\t\t\t\tif(acc[i].getno()==accnumb) {\n\t\t\t\t\tSystem.out.println(\"Total Amount: \"+acc[i].withdraw(accamot));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcontrol++;}\n\t}", "@Override\n public String toString()//to show data\n {\n return \"the balance = \" + balance + \"\\n the account_number = \" + account_number + \"\\n\";\n }", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\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\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }", "public Object creditEarningsAndPayTaxes()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setInitialCash : \" + \"Agent\");\r\n/* 144 */ \tgetPriceFromWorld();\r\n/* 145 */ \tgetDividendFromWorld();\r\n/* */ \r\n/* */ \r\n/* 148 */ \tthis.cash -= (this.price * this.intrate - this.dividend) * this.position;\r\n/* 149 */ \tif (this.cash < this.mincash) {\r\n/* 150 */ \tthis.cash = this.mincash;\r\n/* */ }\t\r\n/* */ \r\n/* 153 */ \tthis.wealth = (this.cash + this.price * this.position);\r\n/* */ \r\n/* 155 */ \treturn this;\r\n/* */ }", "public void printAccountInfo(){\n System.out.printf(\"%5d %-20s %8.2f\\n\",accountNum,customerName,balance);\n }", "public String toString() {\n\t\treturn accNum + \" $\" + balance + \" \" + rate + \" \" + numWithdraws;\n\t}", "public String toString(){\r\n //your code here\r\n return(\"Withdrawal of: $\" + amount + \"Date: \" + date + \"from account: \" + account);\r\n }", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "public interface Account {\n\t\n//\t\n//\t\tMoney money;\n//\t\tInterestRate interestRate;\n//\t\tPeriod interestPeriod;\n\t\t\n\t\tpublic int deposit(int depositAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()+depositAmmount;\n//\t\t}\n\t\t\n\t\tpublic int withdrawl(int withdrawAmmount);\n//\t\t{\n//\t\t\treturn money.getMoney()-withdrawAmmount;\n//\t\t}\n\t\t\n\t\tpublic int getBalance();\n//\t\t{\n//\t\t\treturn money.getMoney()*interestRate.getInterestRate()*interestPeriod.getPeriod()/100;\n//\t\t}\n\t}", "public Account(String firstName, String lastName, String SSN,\n String email, String password, String cardNum, String accId,\n double gpa, String schoolName, HashMap<String, Transaction> pendingTransactions,\n HashMap<String, Transaction> completedTransactions) {\n //Map<String, Transaction> dailyTransactions) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.SSN = SSN;\n this.cardNum = cardNum;\n this.email = email;\n this.password = password;\n this.accId = accId;\n dailyLimit = 50.00;\n accCreditLimit = 1000.00;\n creditUsed = getCreditUsed();\n this.gpa = gpa;\n cashBackRate = gpa / 2;\n this.schoolName = schoolName;\n this.pendingTransactions = pendingTransactions;\n this.completedTransactions = completedTransactions;\n this.cashBackToDate = 0.0;\n //this.dailyTransactions = dailyTransactions;\n }", "public fechBalance() {\n initComponents(); \n \n bd=new coneccionBD();\n acum1=0;\n acum2=0;\n acum3=0;\n acum4=0;\n acum5=0;\n padreNivel=\"\";\n }", "Account(String name, double balance)\r\n\t{\r\n\t\t\r\n\t\tthis.name = name; //assign name to the instance variable name \r\n\t\t\r\n\t\t// validate that the balance is greater that 0.0; if it is not,\r\n\t\t// instance variable balance keeps its default value 0.0\r\n\t\tif(balance > 0.0) // if balance is valid\r\n\t\t\tthis.balance = balance; // assign balance to the instance variable balance\t\t\t\t\t\r\n\t}", "public String toString () {\r\n // write out amount of cash\r\n String stuffInWallet = \"The total amount of Bills in your wallet is: $\" + getAmountInBills() + \"\\n\" +\r\n \"The total amount of Coins in your wallet is: $\" + getAmountInCoins() + \"\\n\";\r\n\r\n // add in the charge (credit and debit) cards\r\n // for each element in the chargeCards list, calls its toString method\r\n for ( int i = 0; i < chargeCards.size(); i++ ) {\r\n stuffInWallet += chargeCards.get( i ) + \"\\n\";\r\n }\r\n\r\n for ( int i = 0; i < idCards.size(); i++ ) {\r\n stuffInWallet += idCards.get( i ) + \"\\n\";\r\n }\r\n\r\n return stuffInWallet;\r\n }", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "public StudentSavingsAccount(double bal, String name) {\n\n \t\tsuper(bal, name);\n// \t super();\n// \t setName(name);\n// \t setBalance(bal);\n \t overdraftsBeforeFee = 3;\n \t System.out.println(\"double, String constructor called [StudentSavingsAccount]\");\t\n\n }", "public static void main(String[] args) {\n BankAccount Yaoming = new BankAccount(0, \"blobfis@h\");\n BankAccount Hoshi = new BankAccount(2348123, \"Seventeen\");\n BankAccount Pewpew = new BankAccount(1245, \" \");\n\n System.out.println(Yaoming.getBalance());\n System.out.println(Hoshi.getAccountID());\n // System.out.println(Yaoming.getPassword());\n Yaoming.setPassword(\"donkey\");\n // System.out.println(Yaoming.getPassword());\n System.out.println(Yaoming.deposit(53.43));\n System.out.println(Yaoming.getBalance());\n if ( Yaoming.deposit(-100) ) System.out.println(\"Deposit successful!\");\n else {System.out.println(\"Deposit failed!\");}\n System.out.println();\n\n // System.out.println(Pewpew.getPassword());\n System.out.println(Pewpew.getBalance());\n System.out.println(Pewpew.deposit(2147823.23));\n System.out.println(Pewpew.withdraw(9999999));\n System.out.println(Pewpew.withdraw(-1231784.23));\n System.out.println(Pewpew.withdraw(0.23));\n System.out.println(Pewpew.getBalance());\n System.out.println();\n\n System.out.println(Hoshi.toString());\n System.out.println(Yaoming.toString());\n System.out.println(Pewpew.toString());\n System.out.println();\n\n BankAccount Sophia = new BankAccount(123456, \"meowmeow\");\n BankAccount Funky = new BankAccount(7890, \"woofwoof\");\n Sophia.deposit(7500);\n System.out.println(Sophia.getBalance());\n System.out.println(Funky.getBalance());\n System.out.println(Sophia.transferTo(Funky, 500, \"meowmeow\")); //should be true\n System.out.println(Funky.transferTo(Sophia, 1000, \"woofwoof\")); //should be false\n System.out.println(Funky.transferTo(Sophia, 300, \"hehehe\")); //should be false\n System.out.println(Sophia.getBalance()); //should be 7000.0\n System.out.println(Funky.getBalance()); //should be 500.0\n\n }", "public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }", "private void outputAccounts(){\r\n float total = 0;\r\n Collections.sort(theAccounts);\r\n for(Account aAccount:theAccounts){\r\n System.out.println(aAccount.toString());\r\n total += aAccount.getPremiumBonds();\r\n }\r\n\r\n System.out.println(\"Mediem\");\r\n calculateMediem();\r\n\r\n System.out.println(\"Mean:\");\r\n calculateMean(total);\r\n\r\n System.out.println(\"Mode:\");\r\n calculateMode();\r\n\r\n System.out.println(\"Range\");\r\n calculateRange();\r\n }", "public static void withdrawMoney(ATMAccount account) throws FileNotFoundException {\r\n\r\n\t\t// File initialization\r\n\t\taccountsdb = new File(\"accountsdb.txt\");\r\n\t\t// #ADDED THE 2-D ARRAY\r\n\t\tString[][] accountInfo = null;\r\n\r\n\t\tif (accountsdb.exists()) {\r\n\t\t\taccountsdbReader = new Scanner(accountsdb);\r\n\t\t\tint y = 0;\r\n\t\t\twhile (accountsdbReader.hasNextLine()) {\r\n\t\t\t\ty++;\r\n\t\t\t\taccountInfo = new String[y][4];\r\n\t\t\t\taccountsdbReader.nextLine();\r\n\t\t\t}\r\n\t\t\taccountsdbReader.close();\r\n\t\t}\r\n\r\n\t\tdouble withdrawAmount;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Enter the amount you want to withdraw:\");\r\n\t\t\twithdrawAmount = userInput.nextDouble();\r\n\t\t\tif (account.getBalance() < 0 || withdrawAmount > account.getBalance()) {\r\n\t\t\t\tSystem.out.println(\"Insufficient balance!\");\r\n\t\t\t} else {\r\n\t\t\t\taccount.setWithdraw(withdrawAmount);\r\n\t\t\t}\r\n\r\n\t\t} while (withdrawAmount < 0);\r\n\r\n\t\tString s = \"\";\r\n\t\tif (accountsdb.exists()) {\r\n\t\t\tint y = 0;\r\n\t\t\taccountsdbReader = new Scanner(accountsdb);\r\n\r\n\t\t\twhile (accountsdbReader.hasNextLine()) {\r\n\t\t\t\ts = accountsdbReader.nextLine();\r\n\t\t\t\tStringTokenizer spl = new StringTokenizer(s, \" \");\r\n\t\t\t\tfor (int x = 0; x != 4; x++) {\r\n\t\t\t\t\taccountInfo[y][x] = spl.nextToken();\r\n\r\n\t\t\t\t}\r\n\t\t\t\ty++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tint line = -1;\r\n\t\ttry {\r\n\r\n\t\t\tint accID;\r\n\t\t\tfor (int y = 0; y != accountInfo.length; y++) {\r\n\t\t\t\taccID = Integer.parseInt(accountInfo[y][0]);\r\n\t\t\t\tif (accID == account.getID())\r\n\t\t\t\t\tline = y;\r\n\r\n\t\t\t}\r\n\t\t\taccountInfo[line][2] = \"\" + account.getBalance();\r\n\t\t\tSystem.out.println(\"Withdrawing...\");\r\n\t\t\tSystem.out.println(\"New Balance: \" + accountInfo[line][2]);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tPrintWriter scrubFile = new PrintWriter(accountsdb);\r\n\t\t\tscrubFile.write(\"\");\r\n\t\t\tscrubFile.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileWriter fileWriter = new FileWriter(accountsdb, true);\r\n\t\t\tBufferedWriter fileBuffer = new BufferedWriter(fileWriter);\r\n\t\t\tPrintWriter fileOutput = new PrintWriter(fileBuffer);\r\n\t\t\tfor (int i = 0; i != accountInfo.length; i++) {\r\n\t\t\t\tfileOutput.println(accountInfo[i][0] + \" \" + accountInfo[i][1] + \" \" + accountInfo[i][2] + \" \"\r\n\t\t\t\t\t\t+ accountInfo[i][3]);\r\n\t\t\t}\r\n\r\n\t\t\tif (fileOutput != null) {\r\n\t\t\t\tfileOutput.close();\r\n\t\t\t}\r\n\t\t\tif (fileBuffer != null) {\r\n\t\t\t\tfileBuffer.close();\r\n\t\t\t}\r\n\t\t\tif (fileWriter != null) {\r\n\t\t\t\tfileWriter.close();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\taccountsdbReader.close();\r\n\r\n\t}", "public static void depositMoney(ATMAccount account) throws FileNotFoundException {\r\n\t\taccountsdb = new File(\"accountsdb.txt\");\r\n\t\t//Use of two dimensional array to account for line number\r\n\t\tString[][] accountInfo = null;\r\n\r\n\t\tif (accountsdb.exists()) {\r\n\t\t\taccountsdbReader = new Scanner(accountsdb);\r\n\t\t\tint y = 0;\r\n\t\t\twhile (accountsdbReader.hasNextLine()) {\r\n\t\t\t\ty++;\r\n\t\t\t\taccountInfo = new String[y][4];\r\n\t\t\t\taccountsdbReader.nextLine();\r\n\t\t\t}\r\n\t\t\taccountsdbReader.close();\r\n\t\t}\r\n\r\n\t\tdouble depositAmount;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Enter the amount you want to deposit:\");\r\n\t\t\tdepositAmount = userInput.nextDouble();\r\n\t\t\tif (depositAmount < 0) {\r\n\t\t\t\tSystem.out.println(\"You cannot deposit a negative amount!\");\r\n\t\t\t}\r\n\r\n\t\t} while (depositAmount < 0);\r\n\t\taccount.setDeposit(depositAmount);\r\n\t\tSystem.out.println(\"Your deposit has been made.\");\r\n\r\n\t\tSystem.out.println(accountInfo.length);\r\n\r\n\t\tString s = \"\";\r\n\t\tif (accountsdb.exists()) {\r\n\t\t\tint y = 0;\r\n\t\t\taccountsdbReader = new Scanner(accountsdb);\r\n\r\n\t\t\twhile (accountsdbReader.hasNextLine()) {\r\n\t\t\t\ts = accountsdbReader.nextLine();\r\n\t\t\t\tStringTokenizer spl = new StringTokenizer(s, \" \");\r\n\t\t\t\tfor (int x = 0; x != 4; x++) {\r\n\t\t\t\t\taccountInfo[y][x] = spl.nextToken();\r\n\r\n\t\t\t\t}\r\n\t\t\t\ty++;\r\n\t\t\t}\r\n\t\t}\r\n/**\t\t\t\t\t\t\t\t\t\t\t VALIDATION PROOF\r\n *\t\tSystem.out.println(\"Line #1\" + \"\\n Index #0: \" + accountInfo[0][0] + \"\\t Index #1: \" + accountInfo[0][1]\r\n *\t\t\t\t+ \"\\t Index #2: \" + accountInfo[0][2] + \"\\t Index #3: \" + accountInfo[0][3]);\r\n *\t\tSystem.out.println(\"Line #2\" + \"\\n Index #0: \" + accountInfo[1][0] + \"\\t Index #1: \" + accountInfo[1][1]\r\n *\t\t\t\t+ \"\\t Index #2: \" + accountInfo[1][2] + \"\\t Index #3: \" + accountInfo[1][3]);\r\n *\t\tSystem.out.println(\"Line #3\" + \"\\n Index #0: \" + accountInfo[2][0] + \"\\t Index #1: \" + accountInfo[2][1]\r\n *\t\t\t\t+ \"\\t Index #2: \" + accountInfo[2][2] + \"\\t Index #3: \" + accountInfo[2][3]);\r\n *\t\tSystem.out.println(\"Line #4\" + \"\\n Index #0: \" + accountInfo[3][0] + \"\\t Index #1: \" + accountInfo[3][1]\r\n *\t\t\t\t+ \"\\t Index #2: \" + accountInfo[3][2] + \"\\t Index #3: \" + accountInfo[3][3]);\r\n *\t\t\t\t\r\n */\r\n\t\tint line = -1;\r\n\t\ttry {\r\n\r\n\t\t\tint accID;\r\n\t\t\tfor (int y = 0; y != accountInfo.length; y++) {\r\n\t\t\t\taccID = Integer.parseInt(accountInfo[y][0]);\r\n\t\t\t\tif (accID == account.getID())\r\n\t\t\t\t\tline = y;\r\n\r\n\t\t\t}\r\n\t\t\taccountInfo[line][2] = \"\" + account.getBalance();\r\n\t\t\tSystem.out.println(\"Depositing...\");\r\n\t\t\tSystem.out.println(\"New Balance: \" + accountInfo[line][2]);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Account was not found in database array!\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tPrintWriter scrubFile = new PrintWriter(accountsdb);\r\n\t\t\tscrubFile.write(\"\");\r\n\t\t\tscrubFile.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileWriter fileWriter = new FileWriter(accountsdb, true);\r\n\t\t\tBufferedWriter fileBuffer = new BufferedWriter(fileWriter);\r\n\t\t\tPrintWriter fileOutput = new PrintWriter(fileBuffer);\r\n\t\t\tfor (int i = 0; i != accountInfo.length; i++) {\r\n\t\t\t\tfileOutput.println(accountInfo[i][0] + \" \" + accountInfo[i][1] + \" \" + accountInfo[i][2] + \" \"\r\n\t\t\t\t\t\t+ accountInfo[i][3]);\r\n\t\t\t}\r\n\r\n\t\t\tif (fileOutput != null) {\r\n\t\t\t\tfileOutput.close();\r\n\t\t\t}\r\n\t\t\tif (fileBuffer != null) {\r\n\t\t\t\tfileBuffer.close();\r\n\t\t\t}\r\n\t\t\tif (fileWriter != null) {\r\n\t\t\t\tfileWriter.close();\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\taccountsdbReader.close();\r\n\r\n\t}", "public saccoAccount (int account_num, double initial_balance) \r\n {\r\n\r\n account = account_num;\r\n balance = initial_balance;\r\n\r\n }", "@Override\r\n\tpublic double withdrawlDao(double money) throws EwalletException {\n\t\tif(money<temp.getCustBal()) {\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttry {\r\n\t\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Withdrawn :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\t} catch (Exception 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\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" Low Balance :( \");\r\n\t\t\treturn temp.getCustBal();\r\n\t}", "public Masary_Error CheckBillType(String BTC, double CusAmount, String CustId, double serv_balance, double masry_balance, double billamount, double fees, Main_Provider provider, double deductedAmount) {\n Masary_Error Status = new Masary_Error();\n try {\n Masary_Bill_Type bill_type = MasaryManager.getInstance().getBTC(BTC);\n double trunccusamount = Math.floor(CusAmount);\n// double deductedAmount = MasaryManager.getInstance().GetDeductedAmount(Integer.parseInt(CustId), Integer.parseInt(BTC), CusAmount, provider.getPROVIDER_ID());\n if ((deductedAmount > serv_balance) || deductedAmount == -1) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-501\", provider);\n } else if (!bill_type.isIS_PART_ACC() && CusAmount < billamount) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-502\", provider);\n } else if (!bill_type.isIS_OVER_ACC() && CusAmount > billamount && billamount != 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-503\", provider);\n } else if (!bill_type.isIS_ADV_ACC() && billamount == 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-504\", provider);\n } else if (!bill_type.isIS_FRAC_ACC() && (CusAmount - trunccusamount) > 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-505\", provider);\n } else if ((CusAmount > masry_balance) || deductedAmount == -2 || deductedAmount == -3 || deductedAmount == -4) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-506\", provider);\n } else {\n Status = MasaryManager.getInstance().GETMasary_Error(\"200\", provider);\n }\n } catch (Exception ex) {\n\n MasaryManager.logger.error(\"Exception \" + ex.getMessage(), ex);\n }\n\n return Status;\n }", "double getBalance();", "double getBalance();", "private String statementForAccount(Account account) {\n\tStringBuilder statement = new StringBuilder(\"\");\n\n //Translate to pretty account type\n switch(account.getAccountType()){\n case CHECKING:\n statement.append(\"Checking Account\\n\");\n break;\n case SAVINGS:\n statement.append(\"Savings Account\\n\");\n break;\n case MAXI_SAVINGS:\n statement.append(\"Maxi Savings Account\\n\");\n break;\n }\n\n //Now total up all the transactions\n double total = 0.0;\n for (Transaction transaction : account.getTransactions()) {\n statement.append(\" \" + (transaction.getAmount() < 0 ? \"withdrawal\" : \"deposit\") + \" \" + toDollars(transaction.getAmount()) + \"\\n\");\n total += transaction.getAmount();\n }\n statement.append(\"Total \" + toDollars(total));\n return statement.toString();\n }", "@Override\r\n\t public String toString()\r\n\t {\r\n\t\t return (\"Account ID: \"+ getId() + \" Balance: \"+ getBalance() +\" Date Created: \"+getDateCreated() + \"\\n\");\r\n\t }", "public String toString(){\n\t\t return id+\" \"+name+\" \"+balance;\r\n\t}", "public Account(String name, Double balance, String accNum){\n\t\tthis.name = name;\n\t\taccountNumber = accNum;\n\t\tthis.balance = balance;\n\t}", "public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }", "public abstract String withdrawAmount(double amountToBeWithdrawn);", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public String displayAccount() {\r\n\t return id+\",\"+name+\",\"+balance+\",\"+email+\",\"+dateOfOpening;\r\n }", "public static void main(String[] args) {\n SavingAccount savings = new SavingAccount(1112, 200);\r\n CheckingAccount checking = new CheckingAccount(1113, 200, -200);\r\n\r\n //account.setAnnualInterestRate(4.5);\r\n savings.setAnnualInterestRate(4.5);\r\n checking.setAnnualInterestRate(4.5);\r\n\r\n\r\n //account.withdraw(250);\r\n //account.deposit(30);\r\n //System.out.println(account.toString());\r\n\r\n\r\n\r\n\r\n checking.withdraw(250);\r\n checking.deposit(30);\r\n System.out.println(checking.toString());\r\n\r\n savings.withdraw(2504);\r\n savings.deposit(30);\r\n System.out.println(savings.toString());\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "public String toString()\n {\n return \"Name=\"+accountHolderName+\", \\n Type=\"+accountType+\", \\n Balance=\"+accountBalance+\", \\n Branch=\"+getBankBranch()+ \" \\n BANK Name=\"+getBankName()+ \"\\n IFSC=\"+getBankIfsc() ;\n }", "public static String addBill(String account, String amount, String duedate){\n return \"insert into current_bills(cb_account,cb_bill,cb_duedate,cb_paid,cb_late) values('\"+account+\"'\"+\",'\"+amount+\"'\"+\",'\"+duedate+\"',0,0)\";\n }", "public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }", "public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "public Account(String newAcctNo, String newCID, String newType, double newBalance) {\n\t\tacctNo = newAcctNo + \"\"; \n\t\tcid = newCID;\n type = newType;\n\t\tbalance = newBalance;\n\t}", "public static void main(String[] args) {\n\t\tString accNumber,accHolderName;\r\n\t\t double balance;\r\n\t\t double minimumBalance;\r\n\t\t int lockingPeriod;\r\n\t\tString detail;\r\n Scanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter account details:\");\r\n\t\tdetail=sc.nextLine();\r\n\t\taccountBO ab=new accountBO();\r\n\t\tab.getAccountDetail( detail);\r\n\t\t \r\n\t\tfixedAccount fa=new fixedAccount();\r\n\t\tfa.setAccNumber(accNumber);\r\n\t\tfa.setBalance(minimumBalance);\r\n\t\tfa.setAccHolderName(accHolderName);\r\n\t\tfa.setBalance(minimumBalance);\r\n\t\tfa.setLockingPeriod(lockingPeriod);\r\n\t\t\r\n\t\tSystem.out.format(\"%-20s %-10s %-20s %-20s %s\\n\",\"Account Number\",\"Balance\",\"Account holder name\",\"Minimum balance\",\"Locking period\");\r\n\t\tSystem.out.println(fa.getAccNumber()+\"\\t\"+fa.getBalance()=\"\\t\"+fa.getAccHolderName()+\"\\t\"+fa.getMinimumBalance()+\"\\t\"+fa.getLockingPeriod());\r\n\t}", "@Override\r\n\tpublic double showbalanceDao() {\n\t\t\r\n\t\treturn temp.getCustBal();\r\n\t}", "public static void main(String[] args) {\n BankAccount bankAccount = new BankAccount(11211, 0, \"adam smith\", \"[email protected]\", \"9090980980\");\n BankAccount tim = new BankAccount(\"tim\", \"[email protected]\", \"9090980980\");\n System.out.println(\"Account Number = \" + tim.getAccountNumber());\n System.out.println(\"Balance = \"+ tim.getBalance());\n System.out.println(\"Customer Name = \" + bankAccount.getCustomerName());\n System.out.println(\"Email = \" + bankAccount.getEmailAddress());\n System.out.println(\"Phone Number = \" + bankAccount.getPhoneNumber());\n System.out.println(\"deposit = \"+ bankAccount.getDeposit(90));\n System.out.println(\"new balance = \"+ bankAccount.getWithdrawal(200));\n }", "public Account(int id, String name, double balance){\n this(id, balance);\n this.name = name;\n }", "private void listBalances() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\tBankAccount2 gil = new BankAccount2(\"Gil\",500);\n\tBankAccount2 joe = new BankAccount2(\"Joe\",1000);\n\tBankAccount2 fred = new BankAccount2(\"Fred\",2000);\n\tBankAccount2 sally = new BankAccount2(\"Sally\",2500);\n\tArrayList<BankAccount2> accountList= new ArrayList<>();\n\taccountList.add(gil);\n\taccountList.add(joe);\n\taccountList.add(fred);\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tSystem.out.println(Account.getAccount());\n\t}\n\taccountList.add(sally);\n\t\n\tdouble highBal = 0;\n\tString info = \" \";\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tSystem.out.println(\"The account with the highest balance once Sally is added is: \"+info);\n\taccountList.remove(sally);\n\t\n\thighBal = 0;\n\tinfo = \" \";\n\tfor(BankAccount2 Account:accountList)\n\t{\n\t\tif(Account.getBalance() > highBal)\n\t\t{\n\t\t\thighBal = Account.getBalance();\n\t\t\tinfo = Account.getAccount();\n\t\t}\n\t}\n\t\n\tSystem.out.println(\"The account with the highest balance once Sally is removed is: \"+ info);\n\t\n\t\n\t}", "public Bank(long accNumber, float accBalance) {\n\t\tsuper();\n\t\tthis.accNumber = accNumber;\n\t\tthis.accBalance = accBalance;\n\t}", "private double getBalance() { return balance; }", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public static void main(String[] args)\n {\n final String DISPLAYMESSAGE = \"Please enter your account number (int), account type (char), minimum balance, and current balance: \";\n \n final double SAVINGSINTREST = 0.04;\n final double CHECKINGSERVICEFEE = 25;\n final double SAVINGSSERVICEFEE = 10;\n double minimumBalance, currentBalance, checkingIntrestRate, serviceCharge;\n \n int accountNumber;\n \n char accountType;\n \n boolean checking = false;\n boolean savings = true;\n boolean applyFee = false;\n \n checkingIntrestRate = 0;\n \n //\n Scanner accountInfo = new Scanner(System.in);\n \n System.out.println(DISPLAYMESSAGE);\n accountNumber = accountInfo.nextInt();\n accountType = accountInfo.next().charAt(0);\n accountType = Character.toLowerCase(accountType);\n minimumBalance = accountInfo.nextDouble();\n currentBalance = accountInfo.nextDouble();\n //System.out.printf(\"Account Number: %0d\", accountNumber);\n \n // \n switch (accountType)\n {\n case 'c':\n checking = true;\n System.out.println(\"Account Number: \" + accountNumber);\n System.out.println(\"Account type: \" + accountType);\n \n\n if ((minimumBalance + 5000) > currentBalance)\n {\n checkingIntrestRate = 0.03;\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * checkingIntrestRate));\n currentBalance = currentBalance + (currentBalance * checkingIntrestRate);\n \n }\n else\n {\n checkingIntrestRate = 0.05;\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * checkingIntrestRate));\n currentBalance = currentBalance + (currentBalance * checkingIntrestRate);\n }\n \n break;\n \n case 's':\n savings = true;\n System.out.println(\"Account Number: \" + accountNumber);\n System.out.println(\"Account type: \" + accountType);\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * SAVINGSINTREST));\n currentBalance = currentBalance + (currentBalance * SAVINGSINTREST);\n\n\n break;\n \n default:\n System.out.println(\"Invalid account type!\");\n \n }\n \n if (minimumBalance > currentBalance)\n { \n if (accountType == 'c')\n {\n System.out.printf(\"Your account balance has fallen below the $%.0f minimum balance %n\", minimumBalance);\n System.out.printf(\"You have been charged a $%.2f Service Fee %n\", CHECKINGSERVICEFEE);\n currentBalance = (currentBalance - CHECKINGSERVICEFEE);\n System.out.printf(\"Your current balance is $%.2f%n\", currentBalance);\n \n }\n else\n {\n System.out.printf(\"Your account balance has fallen below the $%.0f minimum balance %n\", minimumBalance);\n System.out.printf(\"You have been charged a $%.2f Service Fee %n\", SAVINGSSERVICEFEE);\n currentBalance = (currentBalance - SAVINGSSERVICEFEE);\n System.out.printf(\"Your current balance is $%.2f%n\", currentBalance);\n }\n }\n \n \n \n \n }", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "private void returnDeposit(String paymentInfo) {\n }", "public Money getTotalBalance();", "public static void main(String[] arguments)\n {\n BankAccount accountNum1 = new BankAccount();\n BankAccount accountNum2 = new BankAccount(1233203, 105.51, \"Betty\");\n BankAccount accountNum3 = new BankAccount(6542345, 33.11, \"Veronica\"); \n \n // Test the two String Method\n System.out.println(\"*** Does the toStringMethod work?\");\n System.out.println(\"First account : \" + accountNum1); \n System.out.println(\"Second account : \" + accountNum2); \n System.out.println(\"Third account : \" + accountNum3); \n System.out.println();\n \n // Do the get() method work?\n System.out.println(\"*** Does the get() methods work?\");\n System.out.println(accountNum2.getName() + \" has $\" + accountNum2.getBalance() +\n \" in account number \" + accountNum2.getID() + \".\"); \n System.out.println();\n\n // Can we change the account name\n System.out.println(\"*** Does the set() methods work?\");\n System.out.println(\"Second account Before : \" + accountNum2); \n accountNum2.setName(\"Archie\");\n System.out.println(\"Second account After : \" + accountNum2); \n\n // Can we change the account name\n System.out.println();\n System.out.println(\"*** Does the changeBalance() methods work?\");\n System.out.println(\"Third account Before : \" + accountNum3); \n accountNum3.changeBalance(10.10);\n System.out.println(\"Third account After : \" + accountNum3); \n accountNum3.changeBalance(-50);\n System.out.println(\"Third account After : \" + accountNum3); \n \n }", "public double getBal() {\n\t\t return balance;\r\n\t }", "public Bank(String name, int accs){\n bankAccounts = new Account[accs];\n bankName = name;\n maxAccounts = accs;\n currAccounts = 0; //empty\n }", "@Override\r\n\tpublic double getBalance() {\n\t\treturn (super.getBalance()+cashcredit);\r\n\t}", "public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}", "public static void main(String[] args) {\n\t\tAccount a = new Account(\"윤영주\");\r\n\t\t\ta.total=a.save(12000,\"알바비\",\"2017.04.01\");\r\n\t\t\ta.print();\r\n\t\t\ta.total += a.withdraw(5000,\"편의점\",\"2017.04.11\");\r\n\t\t\ta.print();\r\n\t\t\ta.total += a.save(30000,\"용돈\",\"2017.04.20\");\r\n\t\t\ta.print();\r\n\t}", "public static void main(String[] args) {\n int acc1 = 123456;\n // Password is also declared as pass1\n int pass1 = 2003;\n // Initial balance of acc1 or account\n int balance = 10000;\n Scanner sc = new Scanner(System.in);\n\n try {\n for (int n = 1; n > 0; n++) {\n System.out.println(\"Enter Account nos.\");\n int acc = sc.nextInt();\n System.out.println(\"Entered Account number : \" + acc);\n\n System.out.println(\"Enter Password\");\n int pass = sc.nextInt();\n System.out.println(\"Entered Password : \" + pass);\n\n\n if (acc1 == acc) {\n if (pass == pass1) {\n System.out.println(\"Account Found\");\n System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n System.out.println(\"Select type :-\");\n System.out.println(\"For Saving A/c press 1\");\n System.out.println(\"For Current A/c press 2\");\n\n int type1 = sc.nextInt();\n if (type1 == 1) {\n System.out.println(\"Welcome to your Saving Account\");\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^############################^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n System.out.println();\n System.out.println(\"Select operations you have to perform :\");\n System.out.println(\"For Balance Inquiry press 3\");\n System.out.println(\"For Deposit Cash press 4\");\n System.out.println(\"For Withdrawl Cash press 5\");\n int entered_op = sc.nextInt();\n\n if (entered_op == 3) {\n System.out.println(\"Current balance in your Saving A/c is \" + balance);\n } else if (entered_op == 4) {\n System.out.println(\"Enter Deposit amount :\");\n int deposit_amu = sc.nextInt();\n int update_bal = balance + deposit_amu;\n System.out.println(\"Your balance is :\" + update_bal);\n } else if (entered_op == 5) {\n System.out.println(\"Enter Withdrawl amount :\");\n int withdrawl_amu = sc.nextInt();\n int update_with = balance - withdrawl_amu;\n if (update_with >= 0) {\n System.out.println(\"Balance is :\" + update_with);\n } else {\n System.out.println(\"Balance is not negative\");\n }\n } else {\n System.out.println(\"Select Valid Operation\");\n }\n } else if (type1 == 2) {\n System.out.println(\"Welcome to your Current Account\");\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^^^############################^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\");\n System.out.println();\n\n // Operations are not mentioned for current account\n System.out.println(\"OPERATIONS ARE NOT MENTIONED FOR CURRENT ACCOUNT MODIFIED IN FUTURE\");\n\n } else {\n System.out.println(\"Invalid type\");\n }\n\n\n } else {\n System.out.println(\"Invalid Password\");\n }\n }\n System.out.println(\"Want to continue press any number but if not then press 0\");\n int num = sc.nextInt();\n if (num == 0) {\n break;\n }\n }\n }catch (InputMismatchException e){\n System.out.println(\"Enter valid number\");\n }\n\n\n\n\n\n\n\n\n }", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "public Bank(double cash, double interest)\r\n {\r\n super(cash);\r\n this.interest = interest;\r\n }", "public String toString() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n return firstName + lastName + \"\\n\" + cardNum + \"\\n\" + email + \"\\n\" + formatter.format(accCreditLimit);\n }", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "@Test\n\tpublic void AccountCredit_test() { Using HamCrest \t\t\n\t\t// Exercise code to run and test\n\t\t//\n\t\tmiCuenta.setHolder(this.arg1);\n\t\t//\n\t\tmiCuenta.setBalance(this.arg2); \n\t\t//\n\t\tmiCuenta.setZone(this.arg3);\n\t\t//\n\t\tmiCuenta.debit(this.arg4);\n\t\tint Debit = miCuenta.getBalance(); \t\t\t\t\n\t\t// Verify\n\t\tassertThat(this.arg5, is(Debit));\n\t\t\n\t}", "public void addBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() + this.getTemp_d_acc2());\n\t\t}", "public String toString(Account a) {\n StringBuilder s = new StringBuilder();\n s.append((a.getFirstName()) + \" \" + (a.getLastName()) + \", \" + (a.getStreetAddress()) + \".\");\n if (this.getSavingsAccount() != null)\n s.append(\" Savings: \" + a.getSavingsAccount().getBalance());\n if (this.getCheckingAccount() != null)\n s.append(\" Checking: \" + a.getCheckingAccount().getBalance());\n if (this.getMoneyMarketAccount() != null)\n s.append(\" Money Market Balance: \" + a.getMoneyMarketAccount().getBalance());\n if (this.getCreditCardAccount() != null)\n s.append(\" Credit Card Account: \" + a.getCreditCardAccount().getBalance());\n return s.toString();\n }", "abstract void addDepositTransaction(Transaction deposit, Ui ui, String bankType) throws BankException;", "@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}", "public void wire(String accountNumber,int bankNumber, String toAccountNumber, int amount) {\n\t\t\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll, lp, ls, mm, nn;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\tint tolastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tls = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tls.setInt(1, lastBalance);\n\t\tls.setString(2, accountNumber.toString());\n\t\tls.executeUpdate();\n\t\t\n\t\t\n\t\t\n\t\t//to account\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql3 = \"select bankName from bank where bankNumber=?\";\n\t\tll= (PreparedStatement) conn.prepareStatement(sql3);\n\t\tll.setString(1, String.valueOf(bankNumber).toString());\n\t\tResultSet rs3 = ll.executeQuery();\n\t\tString toname = \"\";\n\t\twhile(rs3.next()) { \n\t\t\ttoname=rs3.getString(\"bankName\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString sql4 = \"select balance,userId from \"+toname+\" where accountNumber=?\";\n\t\tpp= (PreparedStatement) conn.prepareStatement(sql4);\n\t\tpp.setString(1, accountNumber.toString());\n\t\tResultSet rs4 = pp.executeQuery();\n\t\tint tonowBalance = 0;\n\t\tString toid = \"\";\n\t\twhile(rs4.next()) { \n\t\t\ttonowBalance=rs4.getInt(\"balance\");\n\t\t\ttoid = rs4.getString(\"userId\");\n\t\t}\n\t\t\n\t\ttolastBalance = tonowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql5 = \"UPDATE \"+toname+\" SET balance=? where accountNumber=?\";\n\t\tlp = (PreparedStatement) conn.prepareStatement(sql5);\n\t\tlp.setInt(1, tolastBalance);\n\t\tlp.setString(2, toAccountNumber.toString());\n\t\tlp.executeUpdate();\n\t\t\n\t\t\n\t\t//log\n\t\tString logs = \"wired : \"+ amount+\" to \"+toAccountNumber+\"/ balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tmm = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tmm.setString(1, logs);\n\t\tmm.executeUpdate();\n\t\tSystem.out.println(\"You wired $\"+String.valueOf(amount));\n\t\t\n\t\tString logs1 = \"get : \"+ amount+\" from \" +accountNumber+ \"/ balance: \"+String.valueOf(tolastBalance);\n\t\tString sql12 = \"insert into \"+toid+\" (log) values (?)\";\n\t\tnn = (PreparedStatement) conn.prepareStatement(sql12);\n\t\tnn.setString(1, logs1);\n\t\tnn.executeUpdate();\n\t\tSystem.out.println(\"You got $\"+String.valueOf(amount));\n\t\t\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "public String printCalculationInformation(Account account) {\t\t\n\t\treturn \"|| \" + cal.calculateEquity(account) \n\t\t\t\t+ \" || \" + cal.calculateIncome(account) \n\t\t\t\t+ \" || \" + cal.calculateInvertory(account) + \" ||\";\n\t}", "public static void main(String[] args) {\n\t\t\n\tBankAccount acc1 = new BankAccount();\t\n\t\n\t// acc1.name = \"Roger hue\";\n\t// With Encapsulation : public API method\n\tacc1.setName(\"Roger Hue\");\n\tSystem.out.println(acc1.getName());\n\t// acc1.ssn = \"484644646\" ;\n\tacc1.setSSN(\"156418489\");\n\tSystem.out.println(acc1.getSSN());\n\tacc1.accountNumber = \"545465456\";\n\tacc1.setRate();\n\tacc1.balance = 10000;\n\t\n\tacc1.deposit(1500);\n\tacc1.deposit(1500);\n\tacc1.deposit(1500);\n\tacc1.withdraw(2000);\n\t\n\t// Polymorphism through overriding way 2\n\tSystem.out.println(acc1.toString());\n\t\n\t// Polymorphism through overloadnig way 1\n\tBankAccount acc2 = new BankAccount(\"Checking Account\");\n\tacc2.accountNumber = \"0514651651\";\n\tBankAccount acc3 = new BankAccount(\"Savings Account\", 4587.05);\n\t\n\t\n\tSystem.out.println(\"Your balance is: $\" + acc3.balance);\n\t/*\n\t// DEMO for inheritance\n\tCDAccount cd1 = new CDAccount();\n\tcd1.interestRate = \"4.5\";\n\tcd1.balance = 3000;\n\tcd1.name = \"Hello world\";\n\tcd1.accounType = \"CD Account\";\n\tcd1.accountNumber = \"546541651\";\n\tSystem.out.println(cd1.toString());\n\tcd1.compount();\n\t*/\n\t}", "public String toString() {\n\t\treturn (customerName + \" has \" + balance + \" dollars.\");\n\t}", "public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }", "public Account(String owner, int ownerID, int accountID, double growthRate){\n this.owner = owner;\n this.ownerID = ownerID;\n this.accountID = accountID;\n this.growthRate = growthRate;\n \n }", "public CardBalance(Integer dollar, Integer cent) {\n this.dollar = dollar;\n this.cent = cent;\n }", "public static void main(String[] args) {\n \t\t\t Random numGen = new Random();\n \tdouble balance=(numGen.nextDouble()*4000+1000); //random number between 1000 and 5000\n Scanner myScanner = new Scanner( System.in );\n System.out.print(\"Would you like to VIEW your balance, make a DEPOSIT, or WITHDRAW? \");\n String choice= myScanner.next(); //accept user input\n //switch statement depending on what the user wants to do\nswitch (choice){\n case (\"VIEW\"): //view bank account\n System.out.print(\"your balance is $\"+balance); //display ballance\n break;\ncase (\"DEPOSIT\"): //deposit to account\n System.out.print(\"how much would you like to diposit? $\");\n double deposit= myScanner.nextDouble(); //amount user wants to deposit\n if (deposit>0){ //make sure its a valid entry\n double totalDeposit=deposit+balance; //find amount in bank after deposit\n System.out.print(\"Your total balance is \"+totalDeposit);\n }\n else {\n System.out.print(\"That is not a possitive number.\");\n }\n break;\ncase (\"WITHDRAW\"): //withdraw from account\n System.out.print(\"how much would you like to withdraw? $\");\n double withdraw= myScanner.nextDouble(); //how much will be withdrawn\n if (withdraw>0 && withdraw<balance){\n double totalWithdraw=balance-withdraw; //amount left after transacton\n System.out.print(\"Your total balance is $\"+totalWithdraw);\n }\n else{\n System.out.print(\"This amount can not be withdrawn\");\n }\n break;\n default:\nSystem.out.print(\"enter VIEW, DEPOSIT, or WITHDRAW\"); //incase of invalid entery\nreturn;\n}// swich\n}", "public BankAccount1(String str, double initialBalance) {\n\t\tbalance = initialBalance;\n\t\tcustomerName = str;\n\t}", "protected Account(String n, float b) {\n this(n); \n balance = b;\n }", "private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }", "public creditPayment(String nm,String expdate,long no,double paymentAmount)\n{\nname=nm;\nexdate=expdate;\ncardnumber=no;\namount = paymentAmount;\n}", "public CheckingAcoount(String accountHolder, long accountNum, double balance) {\n // super to have parent class constructor !\n super(accountHolder, accountNum, balance);\n }", "public int nextadd(Long id,Long broker_name,Long bankaccountNo, String bankname, String branchname,\r\n\t\tString pancard_no, Long demataccountNo,double balance) throws SQLException {\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into customer_details values(\"+id+\",'\"+pancard_no+\"','\"+bankname+\"','\"+branchname+\"',\"+bankaccountNo+\",\"+demataccountNo+\",\"+broker_name+\")\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into account values(\"+bankaccountNo+\",\"+balance+\")\");\r\n\treturn j;\r\n}", "public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }", "public void createNewAccountWithOpeningBalanceHelper() {\n\t\tparseDateTextFieldHelper();\n\t\tBalance balance = data.createNewAccountWithOpeningBalance();\n\t\tLocalDate date = LocalDate.of(year, month, dayOfMonth);\n\t\tbalance.setDate(date);\n\t\tJTextField amount = data.getTextFieldBalance();\n\t\t// this before was not being set, i thought i set it in expectedResult but\n\t\t// that's a different object!\n\t\tbalance.setAmount(Float.parseFloat(amount.getText()));\n\t\t// I think you can actually just insert the values here instead if using get()\n\t\tBalance resultExpected = new Balance(bankTest, accountTest,\n\t\t\t\tdate.getYear(), date.getMonthValue(), date.getDayOfMonth(),\n\t\t\t\tFloat.parseFloat(amount.getText()), TEST_TXTR_EXTRA_NOTES);\n\t\tassertEquals(resultExpected, balance);\n\t}", "String format(double balance);", "public static void addAccount(String accType, float balance, String fName, String lName, float interest) {\n\t\tStatement stmt;\n\t\ttry {\n\t\t\tstmt = con.getConnection().createStatement();\n\t\t\t// insert the data\n\t\t\t\n\t\t\tjava.sql.Date currentDate = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n\t\t\t\n\t\t\tstmt.executeUpdate(\"INSERT INTO ser322.account \" + \"VALUES (NULL, '\" + accType + \"', \" + balance + \", '\" + currentDate + \"'); \" +\n\t\t\t\"SET @last_id_in_account = Last_INSERT_ID();\" + \n\t\t\t\"INSERT INTO interest_rate VALUES(@last_id_in_account, (SELECT accType FROM account WHERE accID = @last_id_in_account),\" + interest + \");\");\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"[ERROR] - Add Account Error\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tAccountsManager.populateFromSQL();\n\t\tAccountsPanel.refreshTabel(); \n\t \n\n\t}", "static void printAccountBalance(String address){\n }", "public TimeDepositAccount(double interestRate, double balance, int maturityPeriods, double interestPenaltyRate) // constructor\n {\n super(interestRate,balance);\n this.elapsedPeriods=0;\n this.maturityPeriods=maturityPeriods;\n this.interestPenaltyRate = interestPenaltyRate;\n \n \n }" ]
[ "0.7055321", "0.6762537", "0.65604484", "0.64972067", "0.62435216", "0.6242438", "0.6190345", "0.61835706", "0.6139609", "0.61270034", "0.6076816", "0.6049254", "0.6049086", "0.6002803", "0.5994549", "0.5961881", "0.59574306", "0.59399897", "0.593795", "0.59054416", "0.5904488", "0.5888763", "0.587627", "0.5859974", "0.5819733", "0.5811273", "0.5809638", "0.580413", "0.580102", "0.57841575", "0.57724035", "0.5772058", "0.57652354", "0.57652354", "0.57617325", "0.575632", "0.57529825", "0.57499707", "0.5747951", "0.57269526", "0.5723694", "0.5715976", "0.5707443", "0.5699695", "0.56994605", "0.5699196", "0.56985", "0.56957215", "0.5694757", "0.56822926", "0.5678931", "0.56677485", "0.56618613", "0.56565374", "0.56546485", "0.56528", "0.56520927", "0.5644775", "0.56416434", "0.56382763", "0.56371534", "0.5635246", "0.56344396", "0.5632294", "0.56309086", "0.5629883", "0.5618238", "0.5606324", "0.5606136", "0.5606092", "0.5603351", "0.56016475", "0.55972177", "0.5592413", "0.55819875", "0.5578254", "0.55751085", "0.5572348", "0.55719876", "0.5571939", "0.5566187", "0.55659294", "0.55608886", "0.55606073", "0.5559039", "0.554662", "0.5541164", "0.5540995", "0.55393684", "0.55377966", "0.5533749", "0.5531249", "0.5530337", "0.55300003", "0.5525589", "0.55122864", "0.5508295", "0.55031604", "0.55030847", "0.55016184", "0.5499338" ]
0.0
-1
System.out.println("Missile: " + missile.getX() + "/" + missile.getY());
public void delMissile(Missile missile) { boolean remove = missiles.remove(missile); try { missile.finalize(); } catch (Throwable ex) { Logger.getLogger(Object_.class.getName()).log(Level.SEVERE, null, ex); } //System.out.println("Remove: " + remove); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double smilePos(){\r\n\r\n\t\treturn smile.getY();\r\n\r\n\t}", "public String getMissile() {\n return\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BB \\n\" +\n \" BBBB \\n\" +\n \" BBBBBB \\n\" +\n \" BB BB \\n\" +\n \" BB BB \\n\" +\n \" B B \\n\";\n\n }", "public int magicMissile();", "@Override\n public String toString() {\n return \"Ship X:\" + position.x\n + \"\\nShip Y:\" + position.y;\n }", "public float getX(){\n return hitBox.left;\n }", "public String toString() {\n\t\treturn \"Missile Launcher dir = \" + this.getDirection();\n\t}", "public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }", "public int getX(){ return xPosition; }", "@Override\r\n\tpublic void canMissile() {\n\t\tSystem.out.println(\"미사일을 발사 할 수 있습니다.\");\r\n\r\n\t}", "public static Image attackPoint()\n\t{\n\t\treturn attackPoint;\n\t}", "void alien_shoot_missile(Alien alien) {\n Missile missile = alien.shootMissile();\n ImageView alien_missile_image_view;\n switch(alien.missile_type) {\n case ALIEN1:\n alien_missile_image_view = new ImageView(alien1_missile_image);\n break;\n case ALIEN2:\n alien_missile_image_view = new ImageView(alien2_missile_image);\n break;\n default:\n alien_missile_image_view = new ImageView(alien3_missile_image);\n break;\n }\n alien_missile_image_view.setX(missile.x_position);\n alien_missile_image_view.setY(missile.y_position);\n alien_missile_image_view.setFitWidth(alien.missile_width);\n alien_missile_image_view.setFitHeight(alien.missile_height);\n alien_missile_image_views.add(alien_missile_image_view);\n game_pane.getChildren().add(alien_missile_image_view);\n }", "private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }", "@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}", "public Pile getDrawPile(){\n return piles.getDrawPile();\n }", "String getPosX();", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "public float getPosX(){return px;}", "public String toString()\n\t{\n\t\treturn getX()+\" \"+getY();\n\t}", "public int getSpawnX()\n {\n return spawnX;\n }", "String getLawnPosition();", "void shoot_ship_missiles(long now) {\n if (pressed_key_codes.contains(KeyCode.SPACE)) {\n // Rate of fire cannot exceed 2 missiles per second\n if (now - missile_timer > 500000000) {\n missile_audio.play();\n Missile missile = ship.shootMissile();\n ImageView ship_missile_image_view = new ImageView(ship_missile_image);\n ship_missile_image_view.setX(missile.x_position);\n ship_missile_image_view.setY(missile.y_position);\n ship_missile_image_view.setFitWidth(Dimensions.SHIP_MISSILE_WIDTH);\n ship_missile_image_view.setFitHeight(Dimensions.SHIP_MISSILE_HEIGHT);\n ship_missile_image_views.add(ship_missile_image_view);\n game_pane.getChildren().add(ship_missile_image_view);\n missile_timer = now;\n }\n }\n }", "public int getX() { return loc.x; }", "public Rectangle points(){\n\t\treturn shotRect;\n\t}", "public void shotShip() {\r\n score -= 20;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public Missile fire() {\n\t\treturn new NPSMissile(this);\n\t}", "public Answer shoot(){\n if (this.isOccuped()){\n this.ship.hit();\n if (this.ship.hasBeenSunk()){\n\tthis.hasBeenShot = true;\n return Answer.SUNK;\n }\n else{\n\tthis.hasBeenShot = true;\n return Answer.HIT;\n }\n }\n else{\n this.hasBeenShot = true;\n return Answer.MISSED;\n }\n }", "void logShot(UUID shooter, UUID projectile);", "public Missile(Shooter shooter, Point2D.Double start, double speed, double direction)\n {\n this.shooter = shooter;\n this.direction = direction;\n \n location = start;\n \n velocity = new Point2D.Double(-speed*Math.sin(direction), speed*Math.cos(direction));\n }", "public int getX() { return position.x; }", "public String toString() {\r\n\t\treturn getx() + \" \" + gety() + \" \" + getWidth() + \" \" + getHeight() + \" \" + getColor() + \" \" + getXSpeed()+ \" \" + getYSpeed();\r\n\t}", "public int getX() {\r\n return xpos;\r\n }", "public int getTileX()\n\t{\n\t\treturn this.tileX;\n\t}", "@Override\n public String toString() {\n return String.valueOf(position.getX() + \" \" + position.getY() + \" \" + visible + \" \" + speed.getX() + \"\\n\");\n }", "public int gotShot(int x, int y) throws InvalidShotException {\n int hit = 0; //miss \n// System.out.println(\"didMyShipSink: grid[\" + indexX + \"][\" + indexY + \"]'s current shotAt state is: (true)\"\n// + grid[indexX][indexY].getShotAt());\n\n int gridX = x - 1; //0-indexing\n int gridY = y - 1;\n System.out.println(\"Before: \" + grid[gridX][gridY]);\n if (!grid[gridX][gridY].getShotAt()) { //look at your grid, check that cell. hit or miss?\n grid[gridX][gridY].setShotAt(true);\n hit = (grid[gridX][gridY].getHasBoat()) ? HIT_NOT_SUNK : MISS; //if it has a boat, then hit = true.\n if (hit == HIT_NOT_SUNK) {\n hit = didMyShipSink(x, y) ? HIT_AND_SUNK : hit;\n } \n } else {\n throw new InvalidShotException(\"You've already shot this coordinate!\");\n }\n System.out.println(\"After: \" + grid[gridX][gridY]);\n \n switch (hit) {\n case -1: \n System.out.println(\"hit: \" + hit + \" Already been shot!\");\n break;\n case 1: \n System.out.println(\"hit: \" + hit + \" Hit!\");\n break;\n case 2: \n System.out.println(\"hit: \" + hit + \" Hit and sunk!\");\n break;\n default:\n System.out.println(\"hit: \" + hit + \" Miss!\");\n }\n return hit;\n }", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "public HeroMissile(int x,int y, int a, int b)\n {\n _startingX = x;\n _startingY = y;\n _endPointX = a;\n _endPointY = b;\n _currentX = _startingX;\n _currentY = _startingY;\n movingDistance = 1;\n distance = calcDistance(_startingX, _startingY,_endPointX,_endPointY);\n remainingDistance = 0;\n }", "double getBallX();", "@Override\r\n\tpublic String toString(){\r\n\t\treturn \"[\" + this.getX()+ \" \" + this.getY()+ \"]\";\r\n\t}", "double getX() { return pos[0]; }", "public void afficher()\n\t{\n\t\tSystem.out.println(\"Centre du cercle en \" + getPosX() + \", \" + getPosY());\n\t\tSystem.out.println(\"Rayon : \" + getRayon());\n\t}", "public final Double getMile() {\n return mile;\n }", "@Test\n public void testShootAtOcean() {\n assertEquals(\".\", ocean.getShipArray()[0][0].toString());\n assertFalse(\"There isn't an empty sea\", ocean.shootAt(0, 0));\n assertFalse(\"Empty sea is sunk\", ocean.getShipArray()[0][0].isSunk());\n assertEquals(\"-\", ocean.getShipArray()[0][0].toString());\n ocean.print();\n }", "int getX() {\n return xPos;\n }", "@Override\r\n\tboolean shootAt(int row, int column) {\r\n\t\t\r\n\t\t\tthis.getHit()[0]=true;\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t}", "double getXPosition();", "@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}", "public int getX()\r\n {\r\n return xLoc;\r\n }", "public List<Missile> getMissilesOnStage(){\n\t\treturn this.missiles;\n\t}", "@Override\n public String toString()\n {\n return TAG + \"[x:\" + x + \",y:\" + y + \"]\";\n }", "public String toString()\n {\n return \"I am the nice \" + NAME + \", I am now standing on square \" + x + \" , \" + y + \".\";\n }", "private void shoot() {\n }", "private void shoot() {\n }", "String getPosY();", "public int getLocX() {\n return locX;\n }", "int getX_coordinate(){\n return x_coordinate;\n }", "Tile getPosition();", "public Monster(Image image, double health, double damage, int x, int y) {\r\n\t\tthis.image = image;\r\n\t\tthis.health = health;\r\n\t\tthis.damage = damage;\r\n\t\tthis.x = y;\r\n\t\tthis.y = y;\r\n\t}", "public int getDmg(){\r\n return enemyDmg;\r\n }", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "public double monsterPos(){\r\n\r\n\t\treturn monster.getY();\r\n\r\n\t}", "public float getX() { return xCoordinate;}", "public double getPosX(){\n return posX;\n }", "void shoot();", "@Override\n public String toString() {\n return String.format(\"position X is='%s' ,position Y is='%s'\" , positionX , positionY);\n }", "public Missile(SimpleSlickGame _game, int x, int y, int destX, int destY, Entity owner) \r\n\t{\r\n\t\t//the super constructor is called to give the x and y coordinates and call the game to use its variable and \r\n\t\tsuper(_game, x,y);\r\n\t\tsetHitboxRadius(20); \r\n\t\tthis.startX = x;\r\n\t\tthis.startY = y;\r\n\t\tthis.owner = owner;\r\n\t\tthis.destX = destX;\r\n\t\tthis.destY = destY;\r\n\t\tsetLocation(startX, startY);\r\n\t\trecalculateVector(destX, destY);\r\n\t\t\r\n\t\t//Initializes and adds a particle system to the entity\r\n\t\ttry \r\n\t\t{\r\n\n\t\t\tImage particleImg = new Image (\"Particles/particle.png\");\r\n\n\t\t\tparticles = new ParticleSystem(particleImg,150);\r\n\t\t\t\r\n\n\t\t//\tFile xmlFile = new File (\"Particles/fire effect.xml\");\r\n\t\t//\temitter = ParticleIO.loadEmitter(xmlFile);\r\n\t\t\temitter = ParticleIO.loadEmitter(\"Particles/fire effect.xml\");\r\n\n\t\t\temitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n\t\t\t\r\n\t\t\tparticles.addEmitter(emitter);\r\n\t\t\tparticles.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);\r\n\t\t\t\r\n\t\t} catch (SlickException e1) {\r\n\t\t\tSystem.out.println(\"cannot find xml file / particle image\");\r\n\t\t\te1.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Cannot assign xml file to emitter. File might be missing.\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//Adds sound files to the entity\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSound sound = new Sound(\"Sounds/lazer.wav\");\r\n\t\t\tfloat pitch = ((float)game.r.nextInt(200) + 800)/1000;\r\n\t\t\tsound.play(pitch,1f);\r\n\t\t} catch (SlickException e){\r\n\t\t\tSystem.out.println(\"Could not find sound file\");\r\n\t\t}\r\n\t\t\r\n\t\t//Adds sprites to the entity\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmissileImg = new Image(\"Graphics/Fireball.png\");\r\n\t\t\tthis.setSprite(missileImg);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"ERROR: Could not find sprite\");\r\n\t\t}\r\n\t}", "@Override\n public double getLocationX() {\n return myMovable.getLocationX();\n }", "public void shoot(double x, double y) {\n if (magazineCounter > 0 && !reloading) {\n magazineCounter--;\n new WeaponProjectile(new Point2D(x, y), mouseLocation(), projectileSpeed, testing);\n }\n }", "public final double getX() { return location.getX(); }", "static void printMove(Position princessPos, int x, int y) {\r\n\t\tint diffX = princessPos.x - x;\r\n\t\tint diffY = princessPos.y - y;\r\n\t\t\r\n\t\tif (diffX < 0) {\r\n\t\t\tSystem.out.println(LEFT);\r\n\t\t}\r\n\t\telse if (diffX > 0) {\r\n\t\t\tSystem.out.println(RIGHT);\r\n\t\t}\r\n\t\telse if (diffY < 0) {\r\n\t\t\tSystem.out.println(UP);\r\n\t\t}\r\n\t\telse if (diffY > 0) {\r\n\t\t\tSystem.out.println(DOWN);\r\n\t\t}\r\n\t}", "godot.wire.Wire.Vector2 getX();", "public void fire() {\n \tAlienMissile.Slope slps[] = {AlienMissile.Slope.ShallowLeft, \n AlienMissile.Slope.Down,\n AlienMissile.Slope.ShallowRight};\n for (AlienMissile.Slope i : slps) {\n AlienMissile m = new AlienMissile(this, i);\n m.setBounce(true, health/5);\n list.add(m);\n }\n }", "public void drawHit(){\n image(explode[5],posX,posY,10,10);\n }", "public void resta(){\r\n\t\tSystem.out.println(\"Esta es la :\");\r\n\t\tSystem.out.println(this.getX() - this.getY());\r\n\t}", "public int getX() {\n\treturn baseXCoord;\n}", "public int getX(){\n\t\treturn this.x_location;\n\t}", "public double getXPos(){\n return xPos;\n }", "public void asteroidShot()\n\t{\n\t\t//collision can only occur if at least 1 asteroid\n\t\t//and one missile are currently spawned\n\t\tif(gameObj[0].size() > 0 && gameObj[4].size() > 0)\n\t\t{\n\t\t\tint ast = new Random().nextInt(gameObj[0].size());\n\t\t\tint mis = new Random().nextInt(gameObj[4].size());\n\t\t\tgameObj[0].remove(ast);\n\t\t\tgameObj[4].remove(mis);\n\t\t\tscore += 100;\n\t\t\tSystem.out.println(\"A friendly missile has struck an asteroid! +100 points\");\n\t\t}else\n\t\t\tSystem.out.println(\"An asteroid and a friendly missile are not spawned\");\n\t}", "public MissileLauncher getMissileLauncher() {\n\t\treturn this.missileLauncher;\n\t}", "public String toString() {\n/* 6387 */ return \"VolaTile [X: \" + this.tilex + \", Y: \" + this.tiley + \", surf=\" + this.surfaced + \"]\";\n/* */ }", "void move_missiles() {\n // Ship missiles\n ship.moveMissiles();\n for (int i = 0; i < ship_missile_image_views.size(); i++) {\n ship_missile_image_views.get(i).setY(ship.missiles.get(i).y_position);\n }\n\n // Enemy missiles\n Alien.moveMissiles();\n for (int i = 0; i < alien_missile_image_views.size(); i++) {\n alien_missile_image_views.get(i).setY(Alien.missiles.get(i).y_position);\n }\n }", "public int getTileX() {\n\t\treturn tileX;\n\t}", "public double getX() { return x; }", "@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}", "public Pile getExhaustPile(){\n return piles.getExhaustPile();\n }", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "public void getComment() {\n System.out.println(\"The target was at \" + targetDistance + \" meters\");\n System.out.println(\"Your shot went \" + projDistance + \" meters far\"); //displays stats\n System.out.println(\"The projectile was \" + missDistance + \" from the target\");\n if (abs(missDistance) >= 100) {\n System.out.println(\"That was terrible\");\n }\n else if (abs(missDistance) >= 50) {\n System.out.println(\"It's getting closer\"); //various comments depending on how good the shot was\n }\n else if (abs(missDistance) >= 20) {\n System.out.println(\"You're nearly there\");\n }\n else {\n System.out.println(\"SO INTENSE\");\n }\n }", "public Pile getHandPile(){\n return piles.getHandPile();\n }", "public void getCoord(MouseEvent me){\n if(mapImage.getImage()!=null) {\n double xPos = me.getX();\n double yPos = me.getY();\n Main.ps.setTitle(xPos + \" \" + yPos);\n }\n }", "public int getX(){\n return this.position[0];\n }", "@Override\n public String toString() {\n String s = \"(\" + this.getY() + \",\" + this.getX() + \")\";\n return s;\n }", "public double getPositionX() {\n\t\treturn this.tilePositionX;\n\t}", "public int getNumMissiles(){\n return this.nunMissiles;\n }", "public int getSpawnX() \n\t{\n\t\treturn spawnX;\n\t}", "public Rect getTileRect(){\n return this.tileRect;\n }", "public List<Missile> getFriendlyMissilesOnStage(){\n\t\treturn this.friendlyMissiles;\n\t}" ]
[ "0.68464786", "0.6627058", "0.6594945", "0.6291992", "0.62760717", "0.6236907", "0.62074906", "0.6148404", "0.6125204", "0.6114544", "0.60961473", "0.60828805", "0.60772955", "0.60497826", "0.60416645", "0.5999063", "0.5981448", "0.59812963", "0.59633136", "0.5948883", "0.59224373", "0.5922034", "0.59215796", "0.5911678", "0.59071773", "0.58970636", "0.5896317", "0.5853812", "0.58449334", "0.5838296", "0.58377355", "0.58132595", "0.58019716", "0.57870543", "0.5786863", "0.57800627", "0.578001", "0.5757558", "0.5756212", "0.5755709", "0.5754251", "0.5751201", "0.5748816", "0.5748715", "0.57461816", "0.57422644", "0.5732739", "0.5731749", "0.571449", "0.5707743", "0.57057947", "0.57057947", "0.5702875", "0.56822264", "0.5680024", "0.567852", "0.56744474", "0.56725043", "0.5670654", "0.5670654", "0.5670654", "0.5670654", "0.5670654", "0.5670654", "0.56705195", "0.5669468", "0.5666512", "0.56664526", "0.5659543", "0.5648746", "0.5647944", "0.56451195", "0.5635594", "0.5627213", "0.5626328", "0.5625472", "0.56211233", "0.5619319", "0.56155974", "0.5612047", "0.560917", "0.56074697", "0.5607366", "0.5604378", "0.5599266", "0.55983037", "0.5595924", "0.55922157", "0.55749923", "0.55626065", "0.5562528", "0.5562507", "0.5561782", "0.5558764", "0.5558684", "0.5557318", "0.55524206", "0.55515647", "0.554965", "0.5549321" ]
0.5554465
96
Instantiates a default Movement detector.
public MovementDetector(MovementListener movementListener) { this(0.3f, 5000, movementListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void defaultAttackInit() {\n\t\tVector2 temp = new Vector2();\n\n\t\t// CHECK IF MOVING VERTICALLY\n\t\tif (parent.velocity.y < 0) {\n\t\t\ttemp.y = -arrowSpeed;\n\t\t} else if (parent.velocity.y > 0) {\n\t\t\ttemp.y = arrowSpeed;\n\t\t}\n\n\t\t// CHECK IF MOVING SIDEWAYS\n\t\tif (parent.velocity.x < 0) {\n\t\t\ttemp.x = -arrowSpeed;\n\t\t\t// System.out.println(\"FACING LEFT\");\n\t\t} else if (parent.velocity.x > 0) {\n\t\t\ttemp.x = arrowSpeed;\n\t\t}\n\n\t\t// IF NOT MOVING CHECK BY DIRECTION\n\t\tif (velocity.isZero()) {\n\t\t\t// CHECK IF MOVING VERTICALLY\n\t\t\tif (parent.facing == DIRECTION.DOWN) {\n\t\t\t\ttemp.y = -arrowSpeed;\n\t\t\t} else if (parent.facing == DIRECTION.UP) {\n\t\t\t\ttemp.y = arrowSpeed;\n\t\t\t}\n\n\t\t\t// CHECK IF MOVING SIDEWAYS\n\t\t\tif (parent.facing == DIRECTION.LEFT) {\n\t\t\t\ttemp.x = -arrowSpeed;\n\t\t\t\t// System.out.println(\"FACING LEFT\");\n\t\t\t} else if (parent.facing == DIRECTION.RIGHT) {\n\t\t\t\ttemp.x = arrowSpeed;\n\t\t\t}\n\t\t}\n\n\t\t// Initialize Attack\n\t\tdefaultAttack = new Arrow(parent, arrowDamage, temp.x, temp.y);\n\t\tLevelStage.interactables.add(defaultAttack);\n\t}", "private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -1;\n stateOfMovement = 0;\n for(int i = 0; i < 3; i++){\n this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));\n }\n this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));\n currentWeapon = this.weapons.get(0);\n bulletsFired = new ArrayList<>();\n shootingDirection = 1;\n energy = 0;\n sprint = false;\n score = 0;\n roundsWon = 0;\n ready = false;\n audioHandler = new AudioHandler();\n }", "public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD);\t\t}", "public Move() {\r\n\t}", "public void init(){\n hp = DEFAULT_MAX_HEALTH;\n bulletsFired = new ArrayList<>();\n initial_y = -1;\n\n //Sets the byte to identify the state of movement\n //For animation purposes in the renderer\n //0 = stationary\n //1 = jumping\n //2 = moving left\n //3 = jumping left\n //4 = right\n //5 = Jumping right\n //6 = crouching\n //8 = crouching left\n //10 = crouching right\n stateOfMovement = 0;\n }", "public Robot() {\t\n\t\tthis.step = myclass.STD_STEP ; \n\t\tthis.speed = myclass.STD_SPEED ; \n\t\tthis.rightM = new EV3LargeRegulatedMotor(myclass.rightP) ; \n\t\tthis.leftM = new EV3LargeRegulatedMotor(myclass.leftP) ; \n\t}", "public Shooter() {\n setDefaultCommand(new RunCommand(this::stop, this));\n _shooterMotor2.follow(_shooterMotor1);\n _shooterMotor1.setInverted(true);\n _shooterMotor2.setInverted(false);\n\n _shooterMotor1.configFactoryDefault();\n _shooterMotor1.config_kF(0, _kF);\n _shooterMotor1.config_kP(0, _kP);\n _shooterMotor1.setNeutralMode(NeutralMode.Coast);\n }", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public DefaultAutonomous(DriveSubsystem ds,\n ShooterSubSystem ss,\n LEDSubSystem ls,\n XboxController manipulator,\n double distanceInFeet) {\n // Add your commands in the super() call, e.g.\n // super(new FooCommand(), new BarCommand());\n super(new ShooterCommand(ss, ls, manipulator, true, Constants.kShooterSpeedSlow).withTimeout(5),\n new DriveADistanceInFeet(ds, distanceInFeet, true).withTimeout(5));\n }", "public Target()\n\t{\n\t\tx = 2.0;\n\t\ty = 2.0;\n\t\tangle = 0.0;\n\t\tdistance = 0.0;\n\t\tnullTarget=true;\n\t}", "public Shooter() {\n fire1 = new Solenoid(1);\n fire2 = new Solenoid(4);\n returnValve = new Solenoid(3);\n latchSolenoid = new Solenoid(2);\n FFM = true;\n m_enabled = true;\n shooting = false;\n reloading = false;\n initShooter();\n }", "public Animal()\n {\n MOVE_RIGHT = 0;\n MOVE_LEFT = 0;\n MOVE_UP = 0;\n MOVE_DOWN = 0;\n }", "void startMovement();", "private GestionTour() {}", "public void initDefaultCommand() {\n \tclaw = new DoubleSolenoid(RobotMap.CLAW_PNU_1, RobotMap.CLAW_PNU_2);\n \tpunch = new DoubleSolenoid(RobotMap.PUNCH_PNU_1, RobotMap.PUNCH_PNU_2);\n \t\n \tarm = new VictorSP(RobotMap.ARM_MOTOR);\n \t\n \tarmEncode = new Encoder(RobotMap.ARM_ENCODE_1, RobotMap.ARM_ENCODE_2);\n \t\n \t//armEncode.setPIDSourceType(PIDSourceType.kDisplacement);\n \tarmControl = new PIDController(0.01,0,0, armEncode, arm);\n \t\n }", "public void init()\r\n\t{\r\n\t\tm_behaviorName = \"Wander\";\r\n\t\t\r\n\t\t// Punkt auf dem Kreis festlegen\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\tVector2d vect = new Vector2d(rand.nextInt(),rand.nextInt());\r\n\t\t\r\n\t\t// evtl. negative Werte\r\n\t\t\r\n\t\tif (rand.nextInt() > 0.5) vect.setX(vect.getX() * (-1));\r\n\t\tif (rand.nextInt() > 0.5) vect.setY(vect.getY() * (-1));\r\n\t\t\r\n\t\t// Punkt auf dem Kreis festlegen durch Normalisierung u. Skalierung\r\n\t\tvect.normalize(); vect.scale(m_r);\r\n\t\tm_seekPoint = new Point2d(m_pos);\r\n\t\tm_seekPoint = m_seekPoint.add(vect); \r\n\t}", "public DirectionController() {\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n // robot.leftBumper.setPosition(.5);\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n robot.colorDrop.setPosition(0.45);\n robot.align.setPosition(0.95);\n\n // robot.rightBumper.setPosition(.7);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public RobotEngine (){\r\n\t\tthis.fuel = 100;\r\n\t\tthis.recycledMaterial = 0;\r\n\t\tthis.container = new ItemContainer ();\r\n\t\tthis.direction = Direction.NORTH;\r\n\t\tthis.navega = new NavigationModule();\r\n\t}", "public DriveSubsystem() {\n leftFrontMotor = new TalonSRX(RobotMap.leftFrontMotor);\n rightFrontMotor = new TalonSRX(RobotMap.rightFrontMotor);\n leftBackMotor = new TalonSRX(RobotMap.leftBackMotor);\n rightBackMotor = new TalonSRX(RobotMap.rightBackMotor);\n // rightMotor.setInverted(true); \n direction = 0.75;\n SmartDashboard.putString(\"Direction\", \"Shooter side\");\n }", "public GameInput() {\n keyboard = new Keyboard();\n mouse = new Mouse();\n mouseWheel = new MouseWheel();\n }", "public MovementController(Creature owner) {\n super(owner);\n _movementCompleted = null;\n _movementFailed = null;\n _destinationLocation = null;\n _waypoints = new ConcurrentLinkedQueue<>();\n _movementTick = System.currentTimeMillis();\n _movementTask = null;\n _followTarget = null;\n }", "public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}", "@Override\n\tprotected void init() {\n\t\t//Set movementSpeed in px/s\n\t\tmovementSpeed = 100;\n\t\t//Set previousTime to start at the \n\t}", "public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}", "protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }", "public BasicSensor() {}", "private PhysicsEngine() {\n\n }", "public MovingGuest() \n {\n // Deferred to subclasses.\n }", "public PerforceSensor() {\r\n //nothing yet.\r\n }", "public Shooter() {\n servo.set(ShooterConstants.Servo_Down);\n \n \n }", "public Simulator(){}", "public static void init() {\n\t\tdrive = Drive.getInstance();\n\t\toi = OI.getInstance();\n\t\tshooter = Shooter.getInstance();\n\t\tarmservo = ArmServo.getInstance();\n\t\t//pneumatic = Pneumatic.getInstance();\n\t\tarmMotor = ArmMotor.getInstance();\n\t\tramp = RampMotor.getInstance();\n\t\tif(shooter == null) {\n\t\t\tSystem.out.println(\"Shooter in NULL in init\");\n\t\t}\n\t\t\n\t}", "public void setMovement(){\n\t\tfloat distance = GameManager.getInstance().getGameCamera().getWidth();\n\t\tfloat durationTime = distance/this.speed;\n\t\t\n\t\tmoveX = new MoveByModifier(durationTime, -(this.xInicial-this.xFinal), 0);\n\t\t\n\t\tthis.registerEntityModifier(moveX);\n\t}", "public interface MovementParameters {\n\n\t/**\n\t * Value to make the robot steer right on its center\n\t */\n\tstatic final int STEER_RIGHT = -200;\n\t/**\n\t * Value to make the robot steer left on its center\n\t */\n\tstatic final int STEER_LEFT = 200;\n\t/**\n\t * Angular speed of the robot for rotations in degrees / sec\n\t */\n\tstatic final double ANGULAR_SPEED = 5;\n\t/**\n\t * Speed for a single motor\n\t */\n\tstatic final double MOTOR_SPEED = 20;\n\t\n\t/**\n\t * Linear speed of the robot in cm / s\n\t */\n\tstatic final double LINEAR_SPEED = 40;\n\t/**\n\t * Linear acceleration of the robot in cm / s^2\n\t */\n\tstatic final double LINEAR_ACCELERATION = 2;\n\t/**\n\t * Tolerance set to the heading in degrees\n\t */\n\tstatic final float HEADING_TOLERANCE = 1f;\n\t/**\n\t * Minimum distance the robot can reach when is approaching an object\n\t */\n\tstatic final int MIN_DISTANCE = 40;\n}", "protected AutonomousMode() {\n driveMotions = new Vector();\n auxMotions = new Vector();\n }", "private void setUp() {\n move = new MoveSlidingTiles(2, 5, 3, 1);\n }", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "@Override\r\n\tpublic Robot createRobot(int orientation, double initialEnergy)\r\n\t{\r\n\t\tOrientation ori = Orientation.convertIntToOrientation(orientation);\r\n\t\t\r\n\t\tif(Robot.canHaveAsOrientation(ori))\r\n\t\t{\r\n\t\t\tRobot robot = new Robot(null, null, ori, initialEnergy, (double) 20000);\r\n\t\t\tif(robot.canHaveAsEnergy(initialEnergy))\r\n\t\t\t{\r\n\t\t\t\treturn robot;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Monster()\n {\n this.name=\"Noname\";\n this.monsterType=0;\n this.health=0;\n this.maxHealth=0;\n this.monstersWalkDistanceX=0;\n this.monstersWalkDistanceY=0;\n this.resourceReward=0;\n this.monsterSize=0;\n this.whichSide=0;\n this.firstCross=0;\n this.secondCross=2;\n targetable=false;\n this.visible=false;\n\n setDefaultMonsterCords();\n }", "@Override\n public void initialize() {\n shooter.setShooterVelocity(speed);\n }", "protected WorldController() {\n\t\tthis(new Rectangle(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT), \n\t\t\t\tnew Vector2(0,DEFAULT_GRAVITY));\n\t}", "private GameManager() \n\t{\n\t\t\n\t}", "public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "protected void initialize() {\n \tif (state == PistonPositions.Extended) moving = Robot.armPiston.smartExtend();\n \telse Robot.armPiston.smartRetract();\n }", "private FireWeaponScreenFactory() {\n\t}", "public static void initVelocity() {\n }", "@Override\n public void init()\n {\n target.setAbsoluteTolerance(ANGLE_ABSOLUTE_TOLERANCE); // Configure the target's absolute tolerance\n /*\n Limit the speed on the target between these values to prevent overshooting and damage to motors\n Normally we would leave the output range without bounds because we wish for the end affector to reach the setpoint\n as fast as possible, in a constant time, which would mean having an output proportional to it's error, but in this case\n We don't care how long it takes to reach its target, we just want it to get there in one piece */\n //System.out.println(\"INITIALIZING PID CONTROL\");\n target.setOutputRange(-0.15, 0.15);\n\n /* load percent control in because output is simply a percentage */\n target.loadLeftController(\"percent\");\n target.loadRightController(\"percent\");\n }", "public Door() {\n // needs to set defaults\n d20 = new D20();\n d10 = new D10();\n d6 = new D6();\n trapState = false;\n openState = false;\n archwayState = false;\n\n if (d10.roll() == 1) {\n // Is an archways\n archwayState = true;\n trapState = false;\n openState = true;\n } else {\n archwayState = false;\n // Is a door\n if (d20.roll() == 1) {\n\n trapState = true;\n } else {\n trapState = false;\n }\n\n if (d6.roll() == 1) {\n openState = false;\n } else {\n openState = true;\n }\n }\n myTrap = null;\n mySpaceList = new ArrayList<Space>();\n\n doorDescription = getDescription();\n }", "public void initDefaultActors() {\n\t\tactors.add(new Switcher(viewPort, 500));\r\n\t\tactors.add(new Rotator(viewPort, 100, 1, 0, 250));\r\n\t\tactors.add(new Rotator(viewPort, -300, -1.3, 0, 200));\r\n//\t\tactors.add(new MovingBar(viewPort, -500));\r\n//\t\tMovingBar temp = new MovingBar(viewPort, -800); temp.setSpeed(2);\r\n//\t\tactors.add(temp);\r\n//\t\tactors.add(new RotatingBen(viewPort, -1400, viewPort.width/2, 0, 1, 100));\r\n//\t\tactors.add(new RotatingRectangle(viewPort, -1800, viewPort.width/2-80, 0, 1, 160));\r\n//\t\tactors.add(new RotatingDoubleCross(viewPort, -2100, 100));\r\n//\t\t\r\n//\t\tactors.add(new RotatingWhiteBar(viewPort, -3000, viewPort.width/2, 0, 1, 100));\r\n\t\t\r\n\t\t//actors.add(new Rotator(viewPort, -3200, 2, 0, 300));\r\n\t\t//actors.add(new DoubleBar(viewPort, -4000));\r\n\t\t//actors.add(new RotatingSwagRectangle(viewPort, 600, viewPort.width/2-50, 0, 1, 100));\r\n\t\t//actors.add(new movingBar(viewPort, -1000));\r\n\t\t//ColorChanger switch1 = new ColorChanger(50, 1000, this);\r\n\t\t//test.setBoundaries(leftX, rightX, 200, 950);\r\n\t}", "@Override\n public void init() {\n imu = new IMU(hardwareMap, \"imu\");\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n\n left.setDirection(DcMotorSimple.Direction.FORWARD);\n right.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "public Ship(XGame game, Controller ctrl) {\r\n \tRADIUS = 8;\r\n \tlives = 5;\r\n \tspower = 100;\r\n \tshootdelay = 500; // amount of time in milliseconds between bullets\r\n \tbulletlife = 25; \r\n s = new Vector2D();\r\n v = new Vector2D();\r\n d = new Vector2D(2,2); \r\n this.game = game;\r\n this.ctrl = ctrl;\r\n reset(); // move the ship to its start position\r\n }", "private TouchPointManager() {\n }", "protected void initialize() {\n \ttarget = Robot.trackingCamera.getTarget();\n targetX = target[0];\n targetY = target[1];\n \tstopTime = System.currentTimeMillis() + timeOut;\n }", "public Drive() {\r\n leftFrontDrive = new Talon(Constants.DRIVE_LEFT_FRONT);\r\n leftRearDrive = new Talon(Constants.DRIVE_LEFT_REAR);\r\n rightFrontDrive = new Talon(Constants.DRIVE_RIGHT_FRONT);\r\n rightRearDrive = new Talon(Constants.DRIVE_RIGHT_REAR);\r\n \r\n robotDrive = new RobotDrive(\r\n leftFrontDrive,\r\n leftRearDrive, \r\n rightFrontDrive, \r\n rightRearDrive);\r\n \r\n driveDirection = 1.0;\r\n \r\n arcadeYRamp = new CarbonRamp();\r\n arcadeXRamp = new CarbonRamp();\r\n tankLeftRamp = new CarbonRamp();\r\n tankRightRamp = new CarbonRamp();\r\n \r\n ui = CarbonUI.getUI();\r\n }", "public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}", "public Wander() \t\r\n\t{ \r\n\t\tm_pos = new Point2d(30,0); \r\n\t\tm_r = 20; \r\n\t\tm_influence = 1; \r\n\t\tm_seekPoint = new Point2d(0,0);\r\n\t\tm_rate = 10;\r\n\t\tinit();\r\n\t}", "private BubbleGravityBehaviour()\n {\n\n }", "Movement() {\n record=0;\n ID =0 ;\n filedate = \"\";\n lat= new ArrayList<Float>();\n lon = new ArrayList<Float>();\n alt=new ArrayList<Float>();\n day1899=new ArrayList<Float>();\n date=new ArrayList<String>();\n time=new ArrayList<String>();\n stay = new ArrayList<Location>();\n record = 0;\n }", "public Robot(int orientation, Position pos_ini) {\r\n\t\tthis.pos_courante = pos_ini;\r\n\t\tthis.orientation = orientation;\r\n\t\tderniereAction = AUCUNE_ACTION;\r\n\t}", "@Override\n public void init() {\n telemetry.addData(\">\", \"Initializing...\");\n telemetry.update();\n\n // Sensors\n gyro = new Gyro(hardwareMap, \"gyro\");\n if (!gyro.isAvailable()) {\n telemetry.log().add(\"ERROR: Unable to initalize gyro\");\n }\n\n // Drive motors\n tank = new WheelMotorConfigs().init(hardwareMap, telemetry);\n tank.stop();\n\n // Vuforia\n vuforia = new VuforiaFTC(VuforiaConfigs.AssetName, VuforiaConfigs.TargetCount,\n VuforiaConfigs.Field(), VuforiaConfigs.Bot());\n vuforia.init();\n\n // Wait for the game to begin\n telemetry.addData(\">\", \"Ready for game start\");\n telemetry.update();\n }", "public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }", "public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }", "private DefaultListener() {\n }", "public NullGameController()\r\n {\r\n }", "private Monster(String name, String[] types) {\r\n\t\tthis.name = name;\r\n\t\tthis.types = types;\r\n\t\tthis.validateTypes();\r\n\t\tthis.moves = new Move[4];\r\n\t}", "public Camera(){\n // servoPan = new Servo(PAN);\n servoTilt = new Servo(TILT);\n }", "public SmartMove() {\r\n\t\t_graph = new Graph(GameStats._height, GameStats._width);\r\n\r\n\t}", "public GameController() {\n GameLoop.getInstance();\n }", "@Override\n\tpublic void robotInit() {\n\t\tdt = new DriveTrain();\n\t\t//Initialize drive Talons\n\t\tRobotMap.vspLeft = new WPI_TalonSRX(RobotMap.dtLeft);\n\t\tRobotMap.vspRight = new WPI_TalonSRX(RobotMap.dtRight);\n\t\t//Initialize drive slave Victors\n\t\t//RobotMap.slaveLeft = new WPI_VictorSPX(RobotMap.slaveDriveLeft);\n\t\t//RobotMap.slaveRight = new WPI_VictorSPX(RobotMap.slaveDriveRight);\n\t\t//Set drive slaves to follower mode\n\t\t//RobotMap.slaveLeft.follow(RobotMap.vspLeft);\n\t\t//RobotMap.slaveRight.follow(RobotMap.vspRight);\n\t\t//Initialize drive train\n\t\tRobotMap.rd = new DifferentialDrive(RobotMap.vspLeft, RobotMap.vspRight);\n\t\t//Initialize drive joystick\n\t\tRobotMap.stick = new Joystick(RobotMap.joystickPort);\n\t\t//Disabled drive safety\n\t\tRobotMap.vspLeft.setSafetyEnabled(false);\n\t\tRobotMap.vspRight.setSafetyEnabled(false);\n\t\tRobotMap.rd.setSafetyEnabled(false);\n\t\t//Initialize lift Talon\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(5);\n\t\t//Initialize operator controller\n\t\tRobotMap.controller = new Joystick(RobotMap.controllerPort);\n\t\t//Initialize intake Victors\n\t\tRobotMap.intakeVictorLeft = new WPI_VictorSPX(RobotMap.intakeMaster);\n\t\tRobotMap.intakeVictorRight = new WPI_VictorSPX(RobotMap.intakeSlave);\n\t\t//Set right intake Victor to follow left intake Victor\n\t\tRobotMap.intakeVictorRight.follow(RobotMap.intakeVictorLeft);\n\t\t\n\t\tRobotMap.climberVictorLeft = new WPI_VictorSPX(RobotMap.climberLeftAddress);\n\t\tRobotMap.climberVictorRight = new WPI_VictorSPX(RobotMap.climberRightAddress);\n\t\t\n\t\tRobotMap.climberVictorRight.follow(RobotMap.climberVictorLeft);\n\t\t\n\t\tRobotMap.piston = new DoubleSolenoid(RobotMap.inChannel, RobotMap.outChannel);\n\t\t\n\t\tRobotMap.intakeLifter = new WPI_VictorSPX(2);\n\t\t\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(RobotMap.liftTalonAddress);\n\t\t\n\t\tautoChooser = new SendableChooser();\n\t\tautoChooser.addDefault(\"Drive to baseline\" , new DriveToBaseline());\n\t\tautoChooser.addObject(\"Null auto\", new NullAuto());\n\t\tautoChooser.addObject(\"Switch from right\", new SwitchFromRight());\n\t\tautoChooser.addObject(\"Switch from left\", new SwitchFromLeft());\n\t\tautoChooser.addObject(\"PID from left\", new PIDfromLeft());\n\t\tautoChooser.addObject(\"PID from right\", new PIDfromRight());\n\t\tautoChooser.addObject(\"Scale from right\", new ScaleAutoRight());\n\t\tautoChooser.addObject(\"Scale from left\", new ScaleAutoLeft());\n\t\tautoChooser.addObject(\"PID tester\", new PIDTESTER());\n\t\tautoChooser.addObject(\"Joe use this one\", new leftOnly());\n\t\tSmartDashboard.putData(\"Autonomous mode chooser\", autoChooser);\n\t\t\n\t\t//RobotMap.liftVictor.follow(RobotMap.climberTalon);\n\t\t\n\t\tRobotMap.vspLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\tRobotMap.vspRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\t\n\t\tRobotMap.intakeLifted = new DigitalInput(1);\n\t\tRobotMap.isAtTop = new DigitalInput(2);\n\t\tRobotMap.isAtBottom = new DigitalInput(0);\n\t\t\n\t\tRobotMap.vspLeft.configVelocityMeasurementPeriod(VelocityMeasPeriod.Period_100Ms, 1);\n\t\tRobotMap.vspRight.configVelocityMeasurementWindow(64, 1); \n\t\t\n\t\toi = new OI();\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tm_frontRight = new PWMVictorSPX(0);\n\t\tm_frontLeft = new PWMVictorSPX(2);\n\t\tm_backRight = new PWMVictorSPX(1);\n\t\tm_backLeft = new PWMVictorSPX(3);\n\n\t\tx_aligning = false;\n\n\t\tJoy = new Joystick(0);\n\t\tmyTimer = new Timer();\n\n\t\tfinal SpeedControllerGroup m_left = new SpeedControllerGroup(m_frontLeft, m_backLeft);\n\t\tfinal SpeedControllerGroup m_right = new SpeedControllerGroup(m_frontRight, m_backRight);\n\n\t\tm_drive = new DifferentialDrive(m_left, m_right);\n\n\t\tdistanceToTarget = 0;\n\n\t\tcounter = new Counter(9);\n\t\tcounter.setMaxPeriod(10.0);\n\t\tcounter.setSemiPeriodMode(true);\n\t\tcounter.reset();\n\t}", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "public Feedback(){\n\n\t\tleftVL = new DigitalInput(RobotPorts.leftVL);\n\t\trightVL = new DigitalInput(RobotPorts.rightVL);\n\n\t\ttoteDetectorLow = new DigitalInput(RobotPorts.toteDetectorLow);\n\t\ttoteDetectorHigh = new DigitalInput(RobotPorts.toteDetectorHigh);\n\n\t\taccel = new BuiltInAccelerometer();\n\t}", "public DefaultMove(jbt.model.core.ModelTask guard) {\n\t\tsuper(guard);\n\t}", "public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }", "public GetMotorPositionCommand ()\r\n {\r\n }", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "protected GameObject() {\r\n\t\tid = \"na\";\r\n\t\tkey = \"_na\";\r\n\t\tname = \"N/A\";\r\n\t\tdrops = false;\r\n\t\tprotection = 0;\r\n\t\tplaysSound = false;\r\n\t\tattackAttempts = 0;\r\n\t\tattackFrequency = 4;\r\n\t\ttakesTwoCells = false;\r\n\t\tmovementFrequency = 10;\r\n\t\tstate = new Basic(this);\r\n\t\tresetAttackAttempts();\r\n\t\tresetMovementAttempts();\r\n\t}", "@Override\n public void init() {\n\n try {\n\n // Get wheel motors\n wheelMotor1 = hardwareMap.dcMotor.get(\"Wheel 1\");\n wheelMotor2 = hardwareMap.dcMotor.get(\"Wheel 2\");\n\n // Initialize wheel motors\n wheelMotor1.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor2.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor1.setDirection(DcMotor.Direction.FORWARD);\n wheelMotor2.setDirection(DcMotor.Direction.REVERSE);\n robotDirection = DriveMoveDirection.Forward;\n motion = new Motion(wheelMotor1, wheelMotor2);\n\n // Get hook motor\n motorHook = hardwareMap.dcMotor.get(\"Hook\");\n motorHook.setDirection(DcMotor.Direction.REVERSE);\n\n // Get servos\n servoTapeMeasureUpDown = hardwareMap.servo.get(\"Hook Control\");\n servoClimberDumperArm = hardwareMap.servo.get(\"Climber Dumper Arm\");\n servoDebrisPusher = hardwareMap.servo.get(\"Debris Pusher\");\n servoZipLineLeft = hardwareMap.servo.get(\"Zip Line Left\");\n servoZipLineRight = hardwareMap.servo.get(\"Zip Line Right\");\n servoAllClearRight = hardwareMap.servo.get (\"All Clear Right\");\n servoAllClearLeft = hardwareMap.servo.get (\"All Clear Left\");\n\n setServoPositions();\n }\n catch (Exception ex)\n {\n telemetry.addData(\"error\", ex.getMessage());\n }\n }", "static public NewMovement create(AnimatableModelInstance originObject, AnimatableModelInstance targetObject, int duration) {\n\t\t\n\t\tVector3 posT = targetObject.transState.position.cpy();\t\n\t\t\t\n\t\treturn create(originObject.transState, posT.x, posT.y,posT.z, duration);\n\t}", "public ComponentMover() {\n\t}", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "@Override\n public void robotInit() {\n robot = RobotSoftware.getInstance();\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n watcher = new Watcher(robot.leftDistanceStream.getWatchable(\"left dist\"),\n robot.rightDistanceStream.getWatchable(\"right dist\"));\n watcher.outputToDashboard();\n robot.runCompressor.set(false);\n teleop = new TeleopMain(robot);\n toggleCompressor = true;\n teleop.init();\n }", "@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }", "public static void initialize() {\n BroadphaseInterface aabbInterface = new DbvtBroadphase(); //Checks if objects could collide\n CollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration();\n CollisionDispatcher collisionDispatcher = new CollisionDispatcher(collisionConfiguration); //Handles collisions\n ConstraintSolver constraintSolver = new SequentialImpulseConstraintSolver();\n\n world = new DiscreteDynamicsWorld(collisionDispatcher, aabbInterface, constraintSolver, collisionConfiguration);\n world.setGravity(DataTypeHelper.stringToVector3f(PreferenceHelper.getValue(\"gravity\")));\n }", "public CommandLineFSRecognizer() {\n init();\n }", "public MovingPlatform(int x, int y, int width, int height, Map dad) throws IOException\n\t{\n\t\tsuper(x, y, width, height, dad);\n\t\tspeed = 1;\n\t\ttime = 0;\n\t}", "public Follow() {\n\t\tev3 = new Robot();\n\t\tfind = new FindColor(ev3.NAMEFILE);\n\t}", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "private Instantiation(){}", "@Override\n protected void initialize() {\n Robot.leftDriveEncoder.reset();\n Robot.rightDriveEncoder.reset();\n tempTargetDirection = Robot.targetDirection + Robot.navX.getYaw();\n\n\n }", "@Override\n protected void initialize() {\n rightTarget = this.distanceInches + Robot.driveTrain.getRightEncoderDistanceInches();\n leftTarget = this.distanceInches + Robot.driveTrain.getLeftEncoderDistanceInches();\n Robot.driveTrain.tankDrive(0, 0);\n this.direction = distanceInches > 0;\n turnPID.resetPID();\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }", "public TRIP_Sensor () {\n super();\n }", "@Override\n\tpublic IComponent createDefaultDrift(String name, double len) throws ModelException {\n\t\ttry {\n\t\t\treturn clsDriftElem.getConstructor(String.class, double.class).newInstance(name, len);\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| IllegalArgumentException | InvocationTargetException\n\t\t\t\t| NoSuchMethodException | SecurityException e) {\n\t\t\tthrow new ModelException(\"Problem when instantiating drift element\", e);\t\t\t\t\n\t\t}\t\t\n\t}", "public Robot(Case pos, int vitesse){\n \tthis.position=pos;\n \tthis.vitesse=(int) (vitesse/3.6);\n \tthis.enDeplacement=false; \n \tthis.destination=new LinkedList<Direction>();\n }", "public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }" ]
[ "0.59622276", "0.5909196", "0.5746732", "0.57155854", "0.568196", "0.5679384", "0.5632624", "0.558601", "0.5510519", "0.54152167", "0.5405637", "0.5368504", "0.53662837", "0.5319972", "0.531592", "0.5310592", "0.5288379", "0.52850485", "0.5277987", "0.52576727", "0.52512187", "0.5241628", "0.52284145", "0.5221598", "0.5208829", "0.5201175", "0.51891214", "0.517708", "0.517482", "0.5174618", "0.51722574", "0.51716274", "0.51655513", "0.51358694", "0.51357317", "0.51229817", "0.5116904", "0.51166725", "0.5101475", "0.5076865", "0.50708944", "0.5065278", "0.50649667", "0.5060996", "0.50573325", "0.50491995", "0.50347334", "0.5028134", "0.50207025", "0.5020438", "0.5010607", "0.50089586", "0.5007244", "0.5005683", "0.50017107", "0.4999484", "0.49947628", "0.49899042", "0.49877766", "0.49823254", "0.4977148", "0.4968126", "0.49571222", "0.49559674", "0.49514848", "0.4951335", "0.49477893", "0.49433753", "0.4942555", "0.4933506", "0.4930838", "0.4925891", "0.4924937", "0.49181765", "0.4917997", "0.49168944", "0.49118787", "0.49105147", "0.49102902", "0.49086758", "0.49063954", "0.49014258", "0.4900211", "0.48994002", "0.48963", "0.48952603", "0.48934618", "0.4892863", "0.4888089", "0.48869115", "0.48866293", "0.48851797", "0.48821595", "0.4879992", "0.4864682", "0.48623988", "0.48589292", "0.4856334", "0.48508984", "0.4848492" ]
0.67426574
0
logic to detect onMovement or onStationary
@Override protected void onSensorEvent(SensorEvent sensorEvent) { // https://developer.android.com/reference/android/hardware/SensorEvent.html#values float x = sensorEvent.values[0]; float y = sensorEvent.values[1]; float z = sensorEvent.values[2]; /* Logic: If there is no external force on the device, vector sum of accelerometer sensor values will be only gravity. If there is a change in vector sum of gravity, then there is a force. If this force is significant, you can assume device is moving. If vector sum is equal to gravity with +/- threshold its stable lying on table. */ float lastAcceleration = currentAcceleration; currentAcceleration = (float) Math.sqrt(x * x + y * y + z * z); float delta = Math.abs(currentAcceleration - lastAcceleration); if (delta > threshold) { lastMovementDetectedTime = System.currentTimeMillis(); isMoving = true; movementListener.onMovement(); } else { long timeDelta = (System.currentTimeMillis() - lastMovementDetectedTime); if (isMoving && timeDelta > durationBeforeStationaryDeclaration) { isMoving = false; movementListener.onStationary(); } } movementListener.onUpdateAcceleration(sensorEvent.values, delta); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getMovements()\n {\n if(\n Greenfoot.isKeyDown(\"Up\")||Greenfoot.isKeyDown(\"W\")||\n Greenfoot.isKeyDown(\"Down\")||Greenfoot.isKeyDown(\"S\")||\n Greenfoot.isKeyDown(\"Right\")||Greenfoot.isKeyDown(\"D\")||\n Greenfoot.isKeyDown(\"Left\") ||Greenfoot.isKeyDown(\"A\")||\n getWorld().getObjects(Traps.class).isEmpty() == false //car trap engendre un mouvement sans les touches directionnelles\n )\n {\n isMoved = true;\n }\n else{isMoved = false;}\n }", "public boolean isMovement() {\n return isMovementEvent;\n }", "public boolean isOnWhenMovementDetected() {\n return onWhenMovementDetected;\n }", "public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}", "boolean isMoving();", "private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }", "public abstract void handleMovement();", "private boolean isStation(SensorEvent e) {\n for (int[] p : STATION_POSITIONS) {\n if (atSensor(e, p[0], p[1])) {\n return true;\n }\n }\n return false;\n }", "@Override\n public void onStationary() {\n showToast(\"设备停止移动\");\n LogUtil.e(\"stop_move\");\n }", "public int getStateOfMovement(){ return stateOfMovement; }", "@Override\n\tpublic void update_logic()\n\t{\n\t\tArrayList<Double> angleList = new ArrayList<Double>();\n\t\tfor(GameObject item : sightList)\n\t\t{\n\t\t\tangleList.add(ALL.point_direction(x, y, item.getX(), item.getY()));\n\t\t}\n\t\t\n\t\t// only if there is something to run from\n\t\tif (angleList.size() > 0)\n\t\t{\n\t\t\trunFromOthers(angleList);\n\t\t} else {\n\t\t\tmotion_set(direction, 0);\n\t\t}\n\t\t\n\t\t// show a debug message\n\t\tdebugString = Integer.toString(resources);\n\n\t}", "private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}", "public abstract void calculateMovement();", "@Override\n public void onMovement() {\n showToast(\"设备移动\");\n LogUtil.e(\"move\");\n }", "protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }", "public boolean isMoving()\n\t{\n\t\treturn (mode == MotorPort.FORWARD || mode == MotorPort.BACKWARD);\n\t}", "public boolean isProvidesMovement() {\n\t\treturn providesMovement;\n\t}", "public abstract boolean isAllowableMovement(int[] location, double[] direction);", "private void handleMovement() {\n if (movements.isEmpty()) return;\n try {\n switch (movements.peek()) {\n case MOVE_UP:\n game.movePlayer(Direction.N);\n break;\n case MOVE_LEFT:\n game.movePlayer(Direction.W);\n break;\n case MOVE_DOWN:\n game.movePlayer(Direction.S);\n break;\n case MOVE_RIGHT:\n game.movePlayer(Direction.E);\n break;\n }\n } catch (Exception ignored) { }\n }", "private int getMovementState (float dx, float dy) {\n\t\tif (dx == 0.0f && dy == 0.0f) {\n\t\t\treturn SCANNING;\n\t\t} else if (dx > 0) {\n\t\t\treturn (dy == 0) ? WALKING_RIGHT : WALKING_RIGHT_DIAGONAL;\n\t\t} else {\n\t\t\treturn (dy == 0) ? WALKING_LEFT : WALKING_LEFT_DIAGONAL;\n\t\t}\n\t}", "public interface MovementSensor {\r\n\tpublic void driving();\r\n\tpublic void walking();\r\n}", "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}", "private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }", "private boolean isMovement(Command cmd) {\n return Arrays.asList(MOVE_UP, MOVE_DOWN, MOVE_LEFT, MOVE_RIGHT).contains(cmd);\n }", "boolean canMove();", "public boolean isMovementChanged() {\n return movementChanged;\n }", "public Boolean getMovingState()\r\n\t{\r\n\t\tObject[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON);\r\n\t\tif (result[0] == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (result[0].equals(\"False\"))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "@Override\r\n protected boolean pollMovement(Creature creature, long lastPolled) {\r\n if (creature.isFighting())\r\n return false;\r\n\r\n Horde horde;\r\n \r\n if ((horde = WanderingHorde.inHorde(creature)) == null) {\r\n WanderingHorde.logger.warning(String.format(\"Polling movement for satellite AI but it is not in a horde? %s\", creature));\r\n hold(creature);\r\n return false;\r\n }\r\n\r\n if (System.currentTimeMillis() - horde.lastMovement < Options.satelliteMovement) {\r\n // Stop creature from moving randomly.\r\n hold(creature, true);\r\n return false;\r\n }\r\n \r\n Member satellite;\r\n \r\n if ((satellite = horde.isSatellite(creature)) == null) {\r\n WanderingHorde.logger.warning(String.format(\"Satellite is not in horde? %s, %s.\", creature, horde));\r\n hold(creature);\r\n return false;\r\n }\r\n\r\n if (satellite.checkHordeCombat())\r\n WanderingHorde.logger.warning(\"SATELLITE INVOLVED IN COMBAT NOW!\");\r\n \r\n Path path;\r\n \r\n if ((path = satellite.getStatus().getPath()) != null && !path.isEmpty()) {\r\n if (WanderingHorde.logger.isLoggable(Level.FINER))\r\n WanderingHorde.logger.finer(String.format(\"Satellite still pathing, %s.\", satellite));\r\n \r\n return false;\r\n }\r\n \r\n HordePath hp = horde.waypoints.path();\r\n \r\nswitchbreak:\r\n switch (satellite.brain) {\r\n case Idle:\r\n hold(satellite, false);\r\n break;\r\n case WalkingToTarget:\r\n if (satellite.walkingTarget == null || satellite.walkingTarget.isDead()) {\r\n satellite.brain = MemberStatus.WalkingToWaypoint;\r\n satellite.walkingTarget = null;\r\n break;\r\n }\r\n \r\n if (satellite.isWithinDistanceTo(satellite.walkingTarget, 4f)) {\r\n hold(satellite, false);\r\n satellite.setTarget(satellite.walkingTarget.getWurmId(), true);\r\n satellite.attackTarget();\r\n }\r\n else {\r\n int targetDistX = satellite.walkingTarget.getTileX() - satellite.getTileX() - 1;\r\n int targetDistY = satellite.walkingTarget.getTileY() - satellite.getTileY() - 1;\r\n boolean surface = satellite.isOnSurface();\r\n int toX = satellite.getTileX() + targetDistX;\r\n int toY = satellite.getTileY() + targetDistY;\r\n int tile = (surface ? Server.surfaceMesh.getTile(toX, toY) : Server.caveMesh.getTile(toX, toY));\r\n satellite.startPathingToTile(new PathTile(toX, toY, tile, surface, satellite.getFloorLevel()));\r\n }\r\n break;\r\n case WalkingToWaypoint:\r\n if (hp.nearDestination(creature, Options.scatterDistance)) {\r\n satellite.brain = MemberStatus.Scattering;\r\n satellite.scatter(Options.scatterDistance);\r\n break;\r\n }\r\n \r\n if ((path = satellite.getStatus().getPath()) != null && !path.isEmpty())\r\n break;\r\n \r\n LinkedList<PathTile> tiles = hp.get().getPathTiles();\r\n \r\n // gets a tile from the list that's 1 tile behind the anchor if possible.\r\n int start = Math.min(tiles.size() - 1, Math.max(0, hp.index - 1));\r\n \r\n for (int i = start; i >= 0; i--) {\r\n PathTile desTile = tiles.get(i);\r\n TilePos dest = TilePos.fromXY(desTile.getTileX(), desTile.getTileY());\r\n \r\n if (satellite.isWithinTileDistanceTo(dest.x, dest.y, 0, Options.satelliteAdvance)) {\r\n if (!satellite.walkDeviated(desTile.getTileX(), desTile.getTileY(), desTile.getTile(), desTile.isOnSurface(), desTile.getFloorLevel()))\r\n hold(satellite, false);\r\n \r\n break switchbreak;\r\n }\r\n }\r\n \r\n if (satellite.isWithinTileDistanceTo(tiles.getFirst().getTileX(), tiles.getFirst().getTileY(), 0, 0)) {\r\n hold(satellite, false);\r\n break;\r\n }\r\n \r\n satellite.startPathingToTile(tiles.getFirst());\r\n break;\r\n case Scattering:\r\n if ((path = satellite.getStatus().getPath()) != null && !path.isEmpty())\r\n break;\r\n \r\n // Satellite at scatter point, hold movement.\r\n if (satellite.isWithinTileDistanceTo(satellite.scatterdest.getTileX(), satellite.scatterdest.getTileY(), 0, 0)) {\r\n satellite.brain = MemberStatus.Scattered;\r\n \r\n satellite.rotateRandom(satellite.getStatus().getRotation(), WanderingHorde.random.nextInt(300) + 1);\r\n \r\n float oldX = satellite.getPosX() * 10f;\r\n float oldY = satellite.getPosY() * 10f;\r\n float newPosX = (satellite.getTileX() << 2) + WanderingHorde.random.nextFloat() * 4f;\r\n float newPosY = (satellite.getTileY() << 2) + WanderingHorde.random.nextFloat() * 4f;\r\n \r\n satellite.getStatus().setPositionX(newPosX);\r\n satellite.getStatus().setPositionY(newPosY);\r\n satellite.moved((int)(newPosX * 10f - oldX), (int)(newPosY * 10f - oldY), 0, 0, 0);\r\n hold(satellite, false);\r\n break;\r\n }\r\n \r\n satellite.startPathingToTile(satellite.scatterdest);\r\n break;\r\n case Scattered:\r\n hold(satellite, false);\r\n break;\r\n case WaitingOneTurn:\r\n hold(satellite, false);\r\n break;\r\n }\r\n\r\n return false;\r\n }", "public boolean moveOn() {\n\t\t\n\t}", "public boolean GetMove();", "public abstract boolean isBefore(SoSensor s);", "@Override\n public void interpretMotionEvent(MotionEvent event) {\n\n boolean handled = false;\n\n //Getting the puck location\n int pointer_Point = event.getActionIndex();\n int pointer_id = event.getPointerId(pointer_Point);\n final Point global_point = new Point((int) event.getX(), (int) event.getY());\n final Point local_point = getCorrectedPoint(global_point);\n\n //Listen for each case\n switch (event.getActionMasked()) {\n\n case MotionEvent.ACTION_DOWN: //Joystick pressed\n\n if (mEnabled) {\n if (this.robot != null && this.robot.isConnected()) { //Move onli if connected\n\n //Validating whether the puck was moved and pressed or was another part of the layout\n if (puck.getBounds().contains(local_point.x, local_point.y)) {\n draggingPuck = true;\n draggingPuckPointerId = pointer_id;\n handled = true;\n\n //Preparing the speed acording the level\n switch (ACTUAL_DIFICULTY) {\n case EASY:\n this.drive_control.setSpeedScale(this.EASY_BASE_SPEED);\n break;\n case MEDIUM:\n this.drive_control.setSpeedScale(this.MEDIUM_BASE_SPEED);\n break;\n case HARD:\n this.drive_control.setSpeedScale(this.HARD_BASE_SPEED);\n break;\n default:\n this.drive_control.setSpeedScale(this.speed);\n break;\n }\n\n //Indicates the style of control\n this.drive_control.startDriving(this.getContext(), DriveControl.JOY_STICK);\n\n //If noise enabled, starts the uncontrolled movements\n if (isNoiseEnabled)\n if (!isUncontrolledActivated) {\n activateUncontrolledMoves();\n isUncontrolledActivated = true;\n }\n }\n if (mOnStartRunnable != null)\n mOnStartRunnable.run();\n }\n }\n break;\n\n case MotionEvent.ACTION_MOVE: //Joystick move\n if (mEnabled && draggingPuck && draggingPuckPointerId == pointer_id) {//Validating puck pressed\n\n //Adjust drive coordinates for driving\n final Point drive_coord = this.getDrivePuckPosition(local_point);\n actualPoint = drive_coord;\n //Returns an alteratedCoord if breath is out of range\n final int maxX = this.wheel.getBounds().width(); //This represent the max X possible coord on the wheel\n final int maxY = this.wheel.getBounds().height();\n if (isUserControlAct) {//To leave total control to the uncontrolled moves\n Point alteratedCoord;\n if (!isNoiseEnabled) {//If the user decided to not be affected by noise.\n this.drive_control.driveJoyStick(drive_coord.x, drive_coord.y);\n } else {\n if (isInvertedControls) {//Special uncontrolled move case\n alteratedCoord = uncInvertedDriving(drive_coord.x, drive_coord.y, maxX, maxY);\n } else {\n alteratedCoord = this.getAlteredCoord(drive_coord);\n }\n this.drive_control.driveJoyStick(alteratedCoord.x, alteratedCoord.y); //MOVE\n }\n }\n\n //Set the puck position to within the bounds of the wheel\n final Point i = getValidPuckPosition(local_point);\n local_point.set(i.x, i.y);\n this.puck.setPosition(new Point(local_point.x, local_point.y));\n this.invalidate();\n\n if (mOnDragRunnable != null) {\n mOnDragRunnable.run();\n }\n\n handled = true;\n }\n break;\n\n case MotionEvent.ACTION_UP: //Joystick release\n if (draggingPuck && draggingPuckPointerId == pointer_id) { //Validating\n this.resetPuck();\n invalidate();\n\n draggingPuck = false;\n handled = true;\n\n if (isNoiseEnabled) {\n //Will only stop if the current rate don't exceed the ideal rate\n if (USER_CURRENT_BREATH_RATE <= MAX_IDEAL_BREATH_RATE) {\n this.drive_control.stopDriving();\n } else {\n if (ACTUAL_DIFICULTY == EASY) {//In other case, only if is in the easy mode\n this.drive_control.stopDriving();\n } else if (ACTUAL_DIFICULTY == MEDIUM && USER_CURRENT_BREATH_RATE <= (MAX_IDEAL_BREATH_RATE + 4)) {\n //In this case, the robot will only stop if the user is under MAX_IDEAL_BREATH_RATE + 4\n this.drive_control.stopDriving();\n }\n }\n } else {\n this.drive_control.stopDriving();\n }\n isUncontrolledActivated = false;\n\n //In any case, if you return or close the app, the robot will stop instantly\n\n if (mOnEndRunnable != null) {\n mOnEndRunnable.run();\n }\n }\n break;\n\n default:\n break;\n }\n }", "public void movementStrategy() {\n System.out.println(\"Player has chosen\" + this.playerMovement);\n }", "void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }", "public void moving()\n {\n if(onPlatform()&&endPlatform()){\n direction();\n }\n if(onPlatform()&&!endPlatform()){\n changeDirection();\n direction();\n }\n collideMoveLocation(horzVelocity,1);\n //sharaz\n if(isTouching(PushObject.class)){\n changeDirection();\n direction();\n }\n \n \n }", "boolean hasSimspeed();", "public boolean isWalking(){\n if (jumpState < 2)\n return true;\n else\n return false;\n}", "public abstract boolean canMove();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "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 }", "public interface RoboticState {\r\n\t\r\n\tpublic void walk();\r\n\tpublic void cook();\r\n\tpublic void off();\r\n\r\n}", "@Override\n\tpublic void teleopPeriodic() {\n\n\t\tif (!x_aligning && !y_aligning) {\n\t\t\tm_drive.arcadeDrive(Joy.getY(), Joy.getZ() * -1);\n\t\t}\n\n\t\t// Show status of align modes\n\n\t\t// read values periodically\n\t\tarea = ta.getDouble(0.0);\n\n\t\t// post to smart dashboard periodically\n\t\tSmartDashboard.putNumber(\"LimelightX\", tx.getDouble(0.0));\n\t\tSmartDashboard.putNumber(\"LimelightY\", ty.getDouble(0.0));\n\t\tSmartDashboard.putNumber(\"LimelightArea\", area);\n\n\t\tif (Joy.getRawButtonPressed(2)) {\n\t\t\tdistanceToTarget = getDistance();\n\t\t\tSmartDashboard.putNumber(\"Estimated Distance\", distanceToTarget);\n\n\t\t}\n\t\tif (Joy.getRawButtonPressed(5)) {\n\t\t\talignX();\n\t\t}\n\n\t\tif (Joy.getRawButtonPressed(6)) {\n\t\t\talignY();\n\t\t}\n\n\t\tif (Joy.getTriggerPressed()) {\n\t\t\t/*\n\t\t\t * alignDepth = 0; while ( ((Math.abs(tx.getDouble(0.0)) > 1) ||\n\t\t\t * (Math.abs(ty.getDouble(0.0)) > 1)) || (tx.getDouble(0.0) == 0 &\n\t\t\t * ty.getDouble(0.0) == 0) || (alignDepth < 3)) { alignX(); alignY(); alignDepth\n\t\t\t * ++; } System.out.println(\"FULL ALIGN\");\n\t\t\t */\n\n\t\t\tSystem.out.println(lidarTest());\n\t\t}\n\n\t}", "void startMovement();", "@Override\n public boolean isStealthOn() {\n // Try to find a Mek Stealth system.\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_STEALTH)) {\n if (mEquip.curMode().equals(\"On\")) {\n // Return true if the mode is \"On\"\n return true;\n }\n }\n }\n // No Mek Stealth or system inactive. Return false.\n return false;\n }", "protected boolean isFinished() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\n\t\tif(talonNum == 2 && Math.abs(RobotMap.chassisfrontLeft.getEncVelocity()) < 30){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon2FL/SIM\");\n \t\tRobotMap.chassisfrontLeft.set(0);\n \t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 3 && Math.abs(RobotMap.chassisfrontRight.getEncVelocity()) < 30){\n\t\t\tlcd.home();\n \t\tlcd.print(\"Talon3FR/SIM\");\n \t\tRobotMap.chassisfrontRight.set(0);\n \t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 4 && Math.abs(RobotMap.chassisrearLeft.getEncVelocity()) < 30){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon4RL/SIM\");\n \t\tRobotMap.chassisrearLeft.set(0);\n \t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 5 && Math.abs(RobotMap.chassisrearRight.getEncVelocity()) < 30){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon5RR/SIM\");\n \t\tRobotMap.chassisrearRight.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 11 && RobotMap.climberclimbMotor.getOutputCurrent() < 2){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon11Climber/SIM\");\n \t\tRobotMap.climberclimbMotor.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 12 && RobotMap.floorfloorLift.getOutputCurrent() < 2){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon12Floor/SIM\");\n \t\tRobotMap.floorfloorLift.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 13 && RobotMap.acquisitionacquisitionMotor.getOutputCurrent() < 2){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon13acq/SIM\");\n \t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t}", "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}", "private void passSensor(SensorEvent e) throws CommandException, InterruptedException {\n if (e.getStatus() == SensorEvent.ACTIVE) {\n boolean station = isStation(e);\n if (!station) {\n boolean atPart;\n\n // Handles leaving first and second into the third as well as leaving the seventh and eighth into the sixth\n // Also traveling into the sections\n if ((atPart = (atSensor(e, 13, 7) || atSensor(e, 13, 8))) || (atSensor(e, 5, 11) || atSensor(e, 5, 13))) {\n int sec = atPart ? 2 : 4;\n int dir = sec == 2 ? SOUTH : NORTH;\n if (direction == dir) {\n if (atPart)\n release(1);\n if (!tryAcc(sec))\n stopWait(sec);\n if (ticket != -1) release(ticket);\n ticket = sec;\n } else if (atPart && direction == NORTH) {\n release(2);\n if (!tryAcc(1))\n stopWait(1);\n } else\n release(sec);\n processTrackSwitch(e);\n\n // Handles the north entry and leaving of the + intersection\n } else if ((atSensor(e, 9, 5)) || atSensor(e, 6, 6)) {\n if (direction == SOUTH && !tryAcc(1))\n stopWait(1);\n else if (direction == NORTH)\n release(1);\n\n // Handles the entry of the fifth and fourth section\n } else if ((atPart = atSensor(e, 16, 9)) || atSensor(e, 3, 9)) {\n int dir = atPart ? SOUTH: NORTH;\n if (direction == dir) {\n if (tryAcc(3))\n ticket = 3;\n else\n ticket = -1;\n processTrackSwitch(e);\n }\n\n // Handles the entry of the first, second, seventh and eighth\n } else if ((atPart = atSensor(e, 18 ,7)) || atSensor(e, 1, 11)){\n int sec = atPart ? 0: 5;\n int dir = sec == 0 ? NORTH: SOUTH;\n if (direction == dir) {\n if (tryAcc(sec))\n ticket = sec;\n else\n ticket = -1;\n }\n processTrackSwitch(e);\n\n // Handles the passing of the middle double track\n } else if ((atPart = (atSensor(e, 6, 9) || atSensor(e, 6, 10))) || atSensor(e, 13, 9) || atSensor(e, 13, 10)) {\n int sec = direction == NORTH ? 4 : 2;\n if ((atPart && direction == NORTH) || (!atPart && direction == SOUTH)) {\n release(sec);\n } else {\n sec = sec == 2 ? 4: 2;\n if (!tryAcc(sec))\n stopWait(sec);\n if (ticket == 3)\n release(3);\n ticket = sec;\n }\n processTrackSwitch(e);\n }\n\n //If a train arrives at a station this handles the stopping and changing of direction\n } else {\n if (DEBUG) System.err.printf(\"Train %d arrived at station\\n\", id);\n TSimInterface.getInstance().setSpeed(id, 0);\n Thread.sleep(1000 + (20 * Math.abs(speed)));\n if (direction == NORTH)\n direction = SOUTH;\n else\n direction = NORTH;\n speed = -speed;\n TSimInterface.getInstance().setSpeed(id, speed);\n }\n }\n }", "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 }", "protected boolean canTriggerWalking() {\n/* 140 */ return false;\n/* */ }", "private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }", "public abstract boolean sensorFound();", "private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }", "public boolean b(MotionEvent motionEvent) {\n boolean z;\n MotionEvent motionEvent2 = motionEvent;\n int actionMasked = motionEvent.getActionMasked();\n int actionIndex = motionEvent.getActionIndex();\n if (actionMasked == 0) {\n a();\n }\n if (this.m == null) {\n this.m = VelocityTracker.obtain();\n }\n this.m.addMovement(motionEvent2);\n if (actionMasked != 0) {\n if (actionMasked != 1) {\n if (actionMasked != 2) {\n if (actionMasked != 3) {\n if (actionMasked == 5) {\n int pointerId = motionEvent2.getPointerId(actionIndex);\n float x = motionEvent2.getX(actionIndex);\n float y = motionEvent2.getY(actionIndex);\n b(x, y, pointerId);\n int i2 = this.f2760b;\n if (i2 == 0) {\n int i3 = this.f2767i[pointerId];\n int i4 = this.q;\n if ((i3 & i4) != 0) {\n this.s.b(i3 & i4, pointerId);\n }\n } else if (i2 == 2) {\n View a2 = a((int) x, (int) y);\n if (a2 == this.t) {\n b(a2, pointerId);\n }\n }\n } else if (actionMasked == 6) {\n c(motionEvent2.getPointerId(actionIndex));\n }\n }\n } else if (!(this.f2763e == null || this.f2764f == null)) {\n int pointerCount = motionEvent.getPointerCount();\n for (int i5 = 0; i5 < pointerCount; i5++) {\n int pointerId2 = motionEvent2.getPointerId(i5);\n if (e(pointerId2)) {\n float x2 = motionEvent2.getX(i5);\n float y2 = motionEvent2.getY(i5);\n float f2 = x2 - this.f2763e[pointerId2];\n float f3 = y2 - this.f2764f[pointerId2];\n View a3 = a((int) x2, (int) y2);\n boolean z2 = a3 != null && a(a3, f2, f3);\n if (z2) {\n int left = a3.getLeft();\n int i6 = (int) f2;\n int a4 = this.s.a(a3, left + i6, i6);\n int top = a3.getTop();\n int i7 = (int) f3;\n int b2 = this.s.b(a3, top + i7, i7);\n int a5 = this.s.a(a3);\n int b3 = this.s.b(a3);\n if (a5 != 0) {\n if (a5 > 0) {\n }\n }\n if (b3 != 0) {\n if (b3 > 0 && b2 == top) {\n break;\n }\n } else {\n break;\n }\n }\n a(f2, f3, pointerId2);\n if (this.f2760b != 1) {\n if (z2 && b(a3, pointerId2)) {\n break;\n }\n } else {\n break;\n }\n }\n }\n c(motionEvent);\n }\n z = false;\n }\n a();\n z = false;\n } else {\n float x3 = motionEvent.getX();\n float y3 = motionEvent.getY();\n z = false;\n int pointerId3 = motionEvent2.getPointerId(0);\n b(x3, y3, pointerId3);\n View a6 = a((int) x3, (int) y3);\n if (a6 == this.t && this.f2760b == 2) {\n b(a6, pointerId3);\n }\n int i8 = this.f2767i[pointerId3];\n int i9 = this.q;\n if ((i8 & i9) != 0) {\n this.s.b(i8 & i9, pointerId3);\n }\n }\n if (this.f2760b == 1) {\n return true;\n }\n return z;\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n double aX = event.values[0];\n double aY = event.values[1];\n double aZ = event.values[2];\n\n if(!isPowerConnected){\n // Call fall detection method - argument acceleration vector\n fallDetection(new MovementInstance(aX, aY, aZ).getAccelerationVector());\n //Alternate Method - argument MovementInstance object\n// fallDetectionV2(new MovementInstance(aX, aY, aZ));\n }\n else{\n // Call earthquake detection method - argument movement object\n earthquakeDetect(new MovementInstance(aX, aY, aZ));\n }\n }\n }", "private void updateMovement() {\n if (_movementTask == null) {\n return;\n }\n\n if (getOwner().isDead() || _followTarget != null && _followTarget.isDead()) {\n cancelMoveTask2(true);\n return;\n }\n\n // Movement is invalid! Queue a new movement and wait again!\n if (_destinationLocation == null)\n {\n if (_waypoints.peek() != null) {\n _destinationLocation = _waypoints.poll();\n\n if (getOwner().getLocation().getGameSector() != null && getOwner().getLocation().getGameSector().hasActiveNeighbours()) {\n double validatedZ = GeoService.getInstance().validateZ(_destinationLocation.getX(), _destinationLocation.getY(), _destinationLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n if (_destinationLocation != null) {\n _destinationLocation.setZ(validatedZ);\n }\n else {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n _isSectorActive = true;\n }\n else {\n _isSectorActive = false;\n }\n notifySector(true);\n }\n else\n {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n }\n\n if (_destinationLocation != null) {\n // Update current character movement, the location.\n float deltaTime = (System.currentTimeMillis() - _movementTick) / 1000.0f;\n float movementSpeed = getOwner().getActionStorage().getMoveSpeed();\n if (getOwner().getActionStorage().getAction().getActionChartActionT().getApplySpeedBuffType().isMove()) {\n movementSpeed *= (getOwner().getGameStats().getMoveSpeedRate().getMoveSpeedRate() + 1_000_000.0f) / 1_000_000.0f;\n }\n\n Location ownerLocation = getOwner().getLocation();\n\n double movementDirectionX = _destinationLocation.getX() - ownerLocation.getX();\n double movementDirectionY = _destinationLocation.getY() - ownerLocation.getY();\n double movementDirectionZ = _destinationLocation.getZ() - ownerLocation.getZ();\n\n double directionLength = Math.sqrt(Math.pow(movementDirectionX, 2) + Math.pow(movementDirectionY, 2) + Math.pow(movementDirectionZ, 2));\n movementDirectionX /= directionLength;\n movementDirectionY /= directionLength;\n movementDirectionZ /= directionLength;\n\n ownerLocation.setXYZ(\n ownerLocation.getX() + movementDirectionX * movementSpeed * deltaTime,\n ownerLocation.getY() + movementDirectionY * movementSpeed * deltaTime,\n ownerLocation.getZ() + movementDirectionZ * movementSpeed * deltaTime\n );\n\n if (_isSectorActive && !_navigationType.isAir()) {\n double validatedZ = GeoService.getInstance().validateZ(ownerLocation.getX(), ownerLocation.getY(), ownerLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n ownerLocation.setZ(validatedZ);\n }\n\n if (ownerLocation.isValid() && World.getInstance().getWorldMap().updateLocation(getOwner(), ownerLocation.getX(), ownerLocation.getY())) {\n double distanceToPoint = MathUtils.getDistance(ownerLocation, _destinationLocation) - getOwner().getTemplate().getBodySize();\n notifyVehicleMovement();\n\n if (_followTarget != null) {\n distanceToPoint -= _followTarget.getTemplate().getBodySize();\n\n if (!MathUtils.isInRange(_destinationLocation, _followTarget.getLocation(), 150)) {\n _destinationLocation.setLocation(_followTarget.getLocation());\n notifySector(true);\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n } else {\n // Check if we are near another destination, then we will\n // switch to another waypoint instead to continue our journey.\n Location nextWaypoint = _waypoints.peek();\n if (nextWaypoint != null) {\n if (distanceToPoint < 100) {\n _destinationLocation = null;\n }\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n }\n } else {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n }\n }\n _movementTick = System.currentTimeMillis();\n }", "protected void manageMovement(boolean localUpdate, Player player, PacketBuilder packet) {\n int movementUpdateId = (localUpdate && (player.basicSettings().isTeleporting() || player.basicSettings().isMapRegionUpdate())) ? 3\n : (player.getDirections().getSecondDirection() != null ? 2\n : (player.getDirections().getDirection() != null ? 1\n : (player.getMasks().requiresUpdate() ? 0\n : -1)));\n /*\n * put basic movement header in\n */\n packet.putBits(1, movementUpdateId == -1 ? 0 : 1);\n\n if (movementUpdateId != -1) {\n /*\n * tell the client that our player teleported/changeregion, has movement, or is standing still.\n */\n packet.putBits(2, movementUpdateId);\n if (movementUpdateId == 3) {\n /**\n * Apply custom/scrambled bits for Teleport/region change\n */\n handleRegionChange(player, packet);\n } else if (movementUpdateId > 0) {\n /*\n * Write the primary sprite (i.e. walk direction).\n */\n packet.putBits(3, player.getDirections().getDirection().intValue());\n if (movementUpdateId == 2) {\n /*\n * Write the secondary sprite (i.e. run direction).\n */\n packet.putBits(3, player.getDirections().getSecondDirection().intValue());\n }\n /*\n * Write a flag indicating if a block update happened.\n */\n packet.putBits(1, player.getMasks().requiresUpdate() ? 1 : 0);\n }\n }\n }", "public void update() {\n\t\t// shooting and moving! This results in a slower movement, and unit self-targeting.\n\t\tif (action == 3 && !(this instanceof Grenadier) && !(this instanceof Sniper)) { // can't be a tank\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position or reached max distance\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t} else move(xa - xa / 8 * 5, ya - ya / 8 * 5); // SLOWS DOWN MOVEMENT\n\n\t\t\tUnit u = target(); // this is the enemy unit it is targeting.\n\t\t\tif (u != null) {\n\t\t\t\tdir = Math.atan2(u.getY() - y, u.getX() - x);\n\t\t\t\tupdateShooting();\n\t\t\t}\n\t\t}\n\n\t\t// shooting only\n\t\telse if (action == 2) {\n\t\t\tupdateShooting();\n\t\t}\n\t\t\n\t\t// moving only\n\t\telse if (action == 1) {\n\t\t\tif (unitType.equals(\"Assassin\") || unitType.equals(\"Zombie\")) { // these are units that deal with collisions!\n\t\t\t\tunitCollision(); // these three units have methods that specialize in collision\n\t\t\t}\n\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position!\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t\taction = 0;\n\t\t\t} else move(xa, ya); // YOU MUST ROUND TO A CERTAIN NUMBER OF DECIMAL PLACES IN ORDER TO REDUCE CHOPPINESS OF MOVEMENT\n\t\t}\n\t\tupdateAnimation();\n\n\t}", "public boolean isMoving() {\n return moving;\n }", "public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}", "boolean doMove();", "boolean canSnowFallOn();", "void update(){\n if(!data.up.isEmpty() && data.isMoving==false){\r\n if(data.floor<data.up.get(0))\r\n data.state = 1;\r\n else if(data.floor>data.up.get(0))\r\n data.state = -1;\r\n }\r\n else if(!data.down.isEmpty() && data.isMoving==false){\r\n if(data.floor<data.down.get(0))\r\n data.state = 1;\r\n else if(data.floor>data.down.get(0))\r\n data.state = -1;\r\n\r\n } \r\n else if(data.isMoving == false)\r\n data.state = 0;\r\n }", "void updateSensors() {\n\t\tint visionDim = ninterface.affectors.getVisionDim();\n\t\tdouble distance;\n\n\t\t/* Update food vision variables. */\n\t\tfor (int i = 0; i < visionDim; i++) {\n\t\t\t/* Food sensory neurons. */\n\t\t\tdistance = viewingObjectOfTypeInSegment(i,\n\t\t\t\t\tCollision.TYPE_FOOD);\n\t\t\tninterface.affectors.vFood[i]\n\t\t\t\t\t= distance < 0.0 ? 1.0 : 1.0 - distance;\n\n\t\t\t/* Ally sensory neurons. */\n\t\t\tdistance = viewingObjectOfTypeInSegment(i,\n\t\t\t\t\tCollision.TYPE_AGENT);\n\t\t\tninterface.affectors.vAlly[i]\n\t\t\t\t\t= distance < 0.0 ? 1.0 : 1.0 - distance;\n\n\t\t\t/* Enemy sensory neurons. */\n\t\t\tdistance = viewingObjectOfTypeInSegment(i,\n\t\t\t\t\tCollision.TYPE_ENEMY);\n\t\t\tninterface.affectors.vEnemy[i]\n\t\t\t\t\t= distance < 0.0 ? 1.0 : 1.0 - distance;\n\n\t\t\t/* Wall sensory neurons. */\n\t\t\tdistance = viewingObjectOfTypeInSegment(i,\n\t\t\t\t\tCollision.TYPE_WALL);\n\t\t\tninterface.affectors.vWall[i]\n\t\t\t\t\t= distance < 0.0 ? 1.0 : 1.0 - distance;\n\t\t}\n\t}", "void check_alien_direction() {\n // Aliens are moving right, check if aliens will move off screen\n if (Alien.direction == Alien.Directions.RIGHT) {\n double max_x = rightmost_alien_x();\n // Alien1 has largest width, so we use that one to calculate if all aliens will fit\n if (max_x + Dimensions.ALIEN1_WIDTH + Dimensions.X_PADDING > scene_width){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving left, check if aliens will move off screen\n else if (Alien.direction == Alien.Directions.LEFT) {\n double min_x = leftmost_alien_x();\n if (min_x < Dimensions.X_PADDING){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving down, check if they finished moving down\n else if (Alien.direction == Alien.Directions.DOWN &&\n Alien.down_distance_travelled >= Dimensions.ALIEN_VERTICAL_SPACE){\n random_alien_fires(); // After aliens all descend one row, one of the ships fires at the player\n Alien.changeDirections();\n }\n }", "@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "boolean isSetStation();", "private boolean doMovement(double dt) {\n // set the dt\n this.differenceTime = dt;\n\n if (this.keyboard.isPressed(KeyboardSensor.LEFT_KEY)) {\n moveLeft();\n }\n\n if (this.keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n moveRight();\n }\n\n return !this.velocity.isZero();\n }", "public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}", "@Override\n public boolean isMoving() {\n return _movementTask != null && !_movementTask.isDone();\n }", "boolean motorsAreBusy();", "public void action() {\r\n\t\tLCD.drawString(\"Avoid Behavior!\", 0, 7);\r\n\r\n\t\tMapUpdate.updateWithoutObject(0);\r\n\t\tMapUpdate.updateWithObject(StandardRobot.us.getRange());\r\n\r\n\t\tif (StandardRobot.ts.isPressed()) {\r\n\t\t\tStandardRobot.pilot.setTravelSpeed(7);\r\n\t\t\tStandardRobot.pilot.travel(-5);\r\n\t\t\tcounter.countTravel();\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setStateOfMovement(int movementState){stateOfMovement = movementState; }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tif (state.equals(\"teleop\")) {\n\t\t\tlastState = \"teleop\";\n\t\t}\n\t\tstate = \"teleop\";\n\n\t\tif (lastState.equals(\"auton\")) {\n\t\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", false);\n\t\t\t\n\t\t\t//Changes the control Mode back to PercentVbus\n\t\t\t//Should only run once - first interation of teleop\n\t\t\t//And ends auton if running\n\t\t\tif(autonomousCommand != null){\n\t\t\t\tautonomousCommand.cancel();\n\t\t\t}\n\t\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getLeftDriveMotor().set(Constants.MOTOR_STOP);\n\t\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getRightDriveMotor().set(Constants.MOTOR_STOP);\n\t\t}\n\n//\t\tNetworkTables.putStream(Gamepad.primary.getX() || Gamepad.secondary.getX());\n\t\t/*\n\t\t * Primary Controllers Controls\n\t\t */\n\t\t// TODO: confirm right trigger forward, left trigger reverse\n\t\t// Drive controls\n\t\tDrive.drive(-Gamepad.primary.getLeftX(), Gamepad.primary.getTriggers()); \n\t\tDrive.shift(Gamepad.primary.getA(), Gamepad.primary.getY()); // shifting with A low gear and Y high gear\n\t\tDrive.shiftToggle(Gamepad.primary.getLB());\n\t\tDrive.crab(Gamepad.primary.getDPadLeft(), Gamepad.primary.getDPadRight());\n\t\t\n//\t\tif (Gamepad.primary.getDPadLeft()){\n//\t\t\tDrive.goingLeft = true;\n//\t\t\tDrive.crab();\t\t\n//\t\t}else if( Gamepad.primary.getDPadRight()){\n//\t\t\tDrive.goingLeft = false;\n//\t\t\tDrive.crab();\t\t\t\n//\t\t}else if (Drive.crabState > 0){\n//\t\t\tDrive.crab();\n//\t\t}\n\n\t\t\n\t\t// Climb controls\n\t\tClimb.climbStopPrimary(Gamepad.primary.getDPadUp()); // runs climbStop using left on the DPad - Primary\n\t\t// Climb.climbSafetyTogglePrimary(Gamepad.primary.getBack()); //toggles safety if pressed 3 times\n\n\t\t// Gear controls\n\t\tScore.dispenseGear(Gamepad.primary.getB() || Gamepad.secondary.getDPadUp());\n\n\t\t/*\n\t\t * Secondary Controllers Controls\n\t\t */\n\t\t// Intake controls\n\t\tIntake.intake(Gamepad.secondary.getRightButton()); // runs intake with clicking in the Right Joystick on second controller\n\t\tIntake.intakeSpeed(Gamepad.secondary.getRightY()); // Override Y Button\n\t\tIntake.intakeDirection(Gamepad.secondary.getRightX()); // Override Y Button\n\t\tIntake.intakeJam(Gamepad.secondary.getLB()); // Runs the unjamming procedure for a max of 3 seconds per press\n\t\t// Intake.intakeSafety(Gamepad.secondary.getStart()); //Have to press 3 times to toggle the safety\n\t\tIntake.intakeIn(Gamepad.secondary.getA(), Gamepad.secondary.getB(), Gamepad.secondary.getX()); // Toggles Intake running into the robot at full speed\n\t\tIntake.intakeRun(Gamepad.secondary.getRB()); // Runs all stuff for intake in(conveyor and intake motor)\n//\t\tIntake.intakeOut(Gamepad.secondary.getB());\n\t\t// Climb controls\n\t\tClimb.climbStopSecondary(Gamepad.secondary.getDPadRight()); // runs climbStop using left on the DPad - Secondary\n\t\tClimb.climbStartSecondary(Gamepad.secondary.getDPadLeft()); // runs climbStart using right on the DPad Secondary\n\t\tClimb.climbSafetyToggleSecondary(Gamepad.secondary.getBack()); // Have to press 3 times to toggle the safety\n\n\t\t// Gear controls\n\t\t// Score.gearLock(Gamepad.secondary.getStart(),\n\t\t// Gamepad.secondary.getBack());\n\n\t\t// Outtake Controls\n\t\t// Score.outtakeToggle(Gamepad.secondary.getLB());\n\n\t\t// Conveyor Controls\n\n\t\tScore.conveyor(Gamepad.secondary.getLeftButton()); // runs conveyor with clicking in the Left Joystick on second controller\n\t\tScore.conveyorSpeed(Gamepad.secondary.getLeftY());\n\t\tScore.conveyorDirection(Gamepad.secondary.getLeftX());\n\t\tScore.conveyorIn(Gamepad.secondary.getY());\n\n\t\t// Sweeper\n\t\t// Sweeper.sweeperMotion(Gamepad.secondary.getTriggers());\n\n\t\tDash.driveMode();\n\n\t\tSmartDashboard.putString(\"Controls Table\", NetworkTables.getControlsTable().getKeys().toString());\n\t\tSmartDashboard.putString(\"Stream\", NetworkTables.getControlsTable().getString(\"stream\", \"nothing\"));\n\n\t}", "private void calculateMovement() {\r\n \tmovementY = (int)(movementSpeed * Math.sin(Math.toRadians(movementDirection - 90)));\r\n \tmovementX = (int)(movementSpeed * Math.cos(Math.toRadians(movementDirection - 90)));\r\n }", "public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }", "public void move (View view){\n\n if (toyRobotIsActive){//only run code after PLACE is DONE\n\n if (orientation == 0) {//Move while Facing North\n\n if((robot.getTranslationY()/perUnitY*(-1)) >=4) {\n System.out.println(\"Out of Bounds\");//Chk Error in Logs\n errorMessage(\"Out of Bounds\");//Error display to user via Toast\n } else {\n robot.animate().translationYBy(-perUnitY).setDuration(50);\n } //move robot 1 unit\n\n } else if (orientation == 3 || orientation == -1) {//Facing West\n if((robot.getTranslationX()/perUnitX) <= 0) {\n System.out.println(\"Out of Bounds\");\n errorMessage(\"Out of Bounds\");\n } else {\n robot.animate().translationXBy(-perUnitX).setDuration(50);\n }\n\n\n } else if (orientation == 2 || orientation == -2) {//Facing South\n if((robot.getTranslationY()/perUnitY)*(-1) <= 0){\n System.out.println(\"Out of Bounds\");\n errorMessage(\"Out of Bounds\");\n } else {\n robot.animate().translationYBy(perUnitY).setDuration(50);\n }\n\n\n } else if (orientation == 1 || orientation == -3) {//Facing East\n if((robot.getTranslationX()/perUnitX) >=4){\n System.out.println(\"Out of Bounds\");\n errorMessage(\"Out of Bounds\");\n } else {\n robot.animate().translationXBy(perUnitX).setDuration(50);\n }\n }\n } else errorMessage(\"Please place toy robot\"); //button not active if\n }", "public static void trackCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(3000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(200);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(400);\n\t\trightMotor.setSpeed(400);\n\t\tleftMotor.rotate(Navigation_Test.convertAngle(Project_Test.WHEEL_RAD, Project_Test.TRACK, 720), true);\n\t\trightMotor.rotate(-Navigation_Test.convertAngle(Project_Test.WHEEL_RAD, Project_Test.TRACK, 720), false);\n\t}", "abstract public boolean isTurtleCommand();", "@Override\r\n\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\tmGX = event.values[SensorManager.DATA_X];\r\n\t\t\tmGY= event.values[SensorManager.DATA_Y];\r\n\t\t\tmGZ = event.values[SensorManager.DATA_Z];\r\n\t\t\tif(mGX<-2 && me.getexploded()==false)\r\n\t\t\t{\r\n\t\t\t\tme.setdirectionY(parameter.UP);\r\n\t\t\t\tme.setv(parameter.maxspeed);\r\n\t\t\t}\r\n\t\t\telse if (mGX>2 && me.getexploded()==false) \r\n\t\t\t{\r\n\t\t\t\tme.setdirectionY(parameter.DOWN);\r\n\t\t\t\tme.setv(parameter.maxspeed);\r\n\t\t\t}\r\n\t\t\tif(mGY<-2 && me.getexploded()==false)\r\n\t\t\t{\r\n\t\t\t\tme.setdirectionX(parameter.LEFT);\r\n\t\t\t\tme.setv(parameter.maxspeed);\r\n\t\t\t}\r\n\t\t\telse if (mGY>2 && me.getexploded()==false) \r\n\t\t\t{\r\n\t\t\t\tme.setdirectionX(parameter.RIGHT);\r\n\t\t\t\tme.setv(parameter.maxspeed);\r\n\t\t\t}\t\r\n\t\t}", "protected boolean canTriggerWalking()\n {\n return false;\n }", "public boolean isOnFight();", "private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }", "public static int[] isMonsterInSight(Player curr) {\n int[] ans = {-1, -1};\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n String name = curr.getName();\n if (bodyDir == UP) {\n dirs.add(UP);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(DOWN);\n }\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(LEFT);\n }\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(UP);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(RIGHT);\n }\n }\n\n if (dirs == null || dirs.size() == 0)\n return ans; //{-1,-1}\n for (int m = 0; m < players.length; m++) { //skip player if Vehicle is not mind controlled and the player is not a monster\n //skip player if Vehicle is mind controlled and the player is a monster\n if (players[m] == null || players[m].getName().equals(\"NONE\") || curr == players[m] ||\n ((curr instanceof Vehicle && !((Vehicle) (curr)).isMindControlled()) && !(players[m] instanceof Monster)) ||\n ((curr instanceof Vehicle && ((Vehicle) (curr)).isMindControlled()) && (players[m] instanceof Monster)))\n continue;\n int mR = players[m].getRow();\n int mC = players[m].getCol();\n\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 0; r--) { //coastguard, destroyer, fighter planes and artillery have the monsters position known - the monster is not hidden by structures\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length; c++) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 0; c--) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n }\n if (skip)\n continue;\n }\n }\n return ans;\n }", "private void movement()\n {\n if(gameOverBool==false)\n {\n if(Greenfoot.isKeyDown(\"up\"))\n {\n setLocation(getX(), getY()-6);\n setRotation(2);\n } else if (Greenfoot.isKeyDown(\"down\")){\n setLocation(getX(), getY()+6); \n setRotation(8);\n } else{\n setRotation(5);\n } \n }\n }", "public boolean isMoving() {\r\n\t\treturn moving;\r\n\t}", "private void getInput() { \n\t\txMove = 0;\n\t\tyMove = 0;\n\t\tif(handler.getKeyManager().pause) {\n\t\t\tMenuState menu = new MenuState(handler);\n\t\t\tState.setState(menu);\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().pKey) {\n\t\t\tif(gear != 0)\n\t\t\t\tchangeGear(0);\n\t\t}\n\t\tif(handler.getKeyManager().oKey) {\n\t\t\tif(gear != 1 && vector[0] == 0)\n\t\t\t\tchangeGear(1);\n\t\t}\n\t\tif(handler.getKeyManager().iKey) {\n\t\t\tif(gear != 2)\n\t\t\t\tchangeGear(2);\n\t\t}\n\t\tif(handler.getKeyManager().uKey) {\n\t\t\tif(gear != 3 && vector[0] == 0)\n\t\t\t\tchangeGear(3);\n\t\t}\n\t\t\n\t\t\t\n\t\tif(handler.getKeyManager().gas) {\n\t\t\tif(GameState.getGameActive() == 0 || GameState.getGameActive() == 4) {\n\t\t\t\tif(vector[0] < topSpeed && gear != 2 && gear != 0)\n\t\t\t\t\tvector[0] += accel;\n\t\t\t} else if (GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector == 0) {\n\t\t\t\t\tConfigState config = new ConfigState(handler);\n\t\t\t\t\tState.setState(config);\n\t\t\t\t}else if(overSelector == 1) {\n\t\t\t\t\tMenuState menustate = new MenuState(handler);\n\t\t\t\t\tState.setState(menustate);\n\t\t\t\t}else if(overSelector == 2) {\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().gas || gear == 2) {\n\t\t\t\tif(vector[0] > accel)\n\t\t\t\t\tvector[0] -= accel;\n\t\t\t\telse if(vector[0] > 0 && vector [0] <= 5 * accel)\n\t\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().brake || (gear == 0 && vector[0] > 0)) {\n\t\t\tif(vector[0] > 0 && vector[0] - 5 * accel > 0)\n\t\t\t\tvector[0] -= 5 * accel;\n\t\t\telse if(vector[0] > 0)\n\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().left) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tif(vector[1] - dTurn <= 0)\n\t\t\t\t\tvector[1] = (double)(2 * Math.PI);\n\t\t\t\tvector[1] -= dTurn;\n\t\t\t\tif(dTurn < 0.05)\n\t\t\t\t\tdTurn += 0.01;\n\t\t\t\t//System.out.println(\"R\");\n\t\t\t} else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector > 0) {\n\t\t\t\t\toverSelector--;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().left && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().right) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tvector[1] += dTurn;\n\t\t\t\t//System.out.println(dTurn);\n\t\t\t\tif(vector[1] >= (double)(2 * Math.PI))\n\t\t\t\t\tvector[1] = 0;\n\t\t\t}else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector < buttons.length - 1) {\n\t\t\t\t\toverSelector++;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().right && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif((gear == 3) || ((gear == 2 || gear== 0) && prevGear == 3)) {\n\t\t\txMove = (double)(vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(vector[0] * Math.sin(vector[1]));\n\t\t}else if(gear == 1 || ((gear == 2 || gear == 0) && prevGear == 1)) {\n\t\t\txMove = (double)(-vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(-vector[0] * Math.sin(vector[1]));\n\t\t}\n\t}", "@Override\n\tpublic boolean updatePos(Physical_passive map) {\n\t\tupdate_animSpeed();\n\t\t// if (!map.getPhysicalRectangle().contains(getPhysicalShape()))\n\t\t// return false;\n\t\tif (!isDead()) {\n\t\t\tResolveUnreleasedMovements();\n\t\t\tgetWeapon().update();\n\t\t\tupdatePush();\n\t\t\t/*\n\t\t\t * if (!isBlock_down()) { // Por lo visto esto controla el salto if\n\t\t\t * (getJumpTTL() != 0) { moveJump(); } else // Y este 3 es la\n\t\t\t * gravedad., lo paso a un metodo de actor // para decirle q empiece\n\t\t\t * a caer fall(); // ; }\n\t\t\t */\n\t\t\t// Aqui es donde realmente cambiamos la posicion una vez calculado\n\t\t\t// donde va a ir.\n\t\t\t// updateLegsRotation(getSpeed().add(getPosition()));\n\t\t\tgetLegs().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\tsetPosition(getPosition().add(getSpeed().add(getPush())));\n\t\t\tgetTorax().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\t// setPosition(getPosition().add(getSpeed().add(getPush()))); //\n\t\t\t// CAmbiado;\n\t\t\tLine2D line = new Line2D.Float((float) getKillTracer().getTrace().getLine().getX1(),\n\t\t\t\t\t(float) getKillTracer().getTrace().getLine().getY1(), (float) getSpeed().x(),\n\t\t\t\t\t(float) getSpeed().y());\n\t\t\tgetKillTracer().getTrace().setLine(line);\n\t\t\tArrayList<Entity> hits = getKillTracer().getCollision(getMap());\n\t\t\tfor (Entity ent : hits) {\n\t\t\t\tif (ent instanceof Player && ent != this) {\n\t\t\t\t\tPlayer plent = (Player) ent;\n\t\t\t\t\tplent.die();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "@Override\n public void runOpMode () {\n motor1 = hardwareMap.get(DcMotor.class, \"motor1\");\n motor2 = hardwareMap.get(DcMotor.class, \"motor2\");\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n //Wait for game to start (driver presses PLAY)\n waitForStart();\n\n /*\n the overridden runOpMode method happens with every OpMode using the LinearOpMode type.\n hardwareMap is an object that references the hardware listed above (private variables).\n The hardwareMap.get method matches the name of the device used in the configuration, so\n we would have to change the names (ex. motorTest to Motor 1 or Motor 2 (or something else))\n if not, the opMode won't recognize the device\n\n in the second half of this section, it uses something called telemetry. In the first and\n second lines it sends a message to the driver station saying (\"Status\", \"Initialized\") and\n then it prompts the driver to press start and waits. All linear functions should have a wait\n for start command so that the robot doesn't start executing the commands before the driver\n wants to (or pushes the start button)\n */\n\n //run until end of match (driver presses STOP)\n double tgtpower = 0;\n while (opModeIsActive()) {\n telemetry.addData(\"Left Stick X\", this.gamepad1.left_stick_x);\n telemetry.addData(\"Left Stick Y\", this.gamepad1.left_stick_y);\n telemetry.addData(\"Right Stick X\", this.gamepad1.right_stick_x);\n telemetry.addData(\"Right Stick Y\", this.gamepad1.right_stick_y);\n if (this.gamepad1.left_stick_y < 0){\n tgtpower=-this.gamepad1.left_stick_y;\n motor1.setPower(tgtpower);\n motor2.setPower(-tgtpower);\n }else if (this.gamepad1.left_stick_y > 0){\n tgtpower=this.gamepad1.left_stick_y;\n motor1.setPower(-tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x > 0){\n tgtpower=this.gamepad1.left_stick_x;\n motor1.setPower(tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x < 0){\n tgtpower=-this.gamepad1.left_stick_x;\n motor1.setPower(-tgtpower);\n motor2.setPower(-tgtpower);\n }else{\n motor1.setPower(0);\n motor2.setPower(0);\n }\n telemetry.addData(\"Motor1 Power\", motor1.getPower());\n telemetry.addData(\"Motor2 Power\", motor2.getPower());\n telemetry.addData(\"Status\", \"Running\");\n telemetry.update ();\n\n\n /*\n if (this.gamepad1.right_stick_x == 1){\n //trying to make robot turn right, == 1 may be wrong\n motor2.setPower(-1);\n }\n else if (this.gamepad1.right_stick_x == -1){\n //trying to make robot turn left, == -1 may be wrong\n motor1.setPower(-1);\n }\n else {\n\n }\n */\n\n\n /*\n After the driver presses start,the opMode enters a while loop until the driver presses stop,\n while the loop is running it will continue to send messages of (\"Status\", \"Running\") to the\n driver station\n */\n\n\n }\n }", "@Override\r\n\tpublic boolean guardMovement() {\r\n\r\n\t\tif(stop == 0) {\r\n\t\t\tstate = 'G';\r\n\t\t\t\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tint tmp = rand.nextInt(10) + 1;\r\n\t\t\t\r\n\t\t\tif(tmp > 8) { \r\n\t\t\t\tstate = 'g';\r\n\t\t\t\tstop = rand.nextInt(3) + 1;\r\n\t\t\t\tdirection = rand.nextBoolean();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn checkAndMove();\r\n\t\t}\r\n\t\telse \r\n\t\t\tstop--;\r\n\r\n\t\treturn false;\r\n\t}", "private void notifyVehicleMovement() {\n if (getOwner() != null && getOwner().isVehicle() && getOwner().getOwner() != null && getOwner().getOwner().isPlayer()) {\n// getOwner().sendBroadcastPacket(new SMMoveNonPlayer(getOwner()));\n }\n }", "public abstract boolean moveOn(\n double currentX, double currentY, double currentAngle,\n double velX, double velY, double velAngle);", "public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private void handleMovements(GameGUI gui) {\r\n\t\tboolean accelerate = gui.isUpPressed();\r\n\t\tint turn = NO_TURNING;\r\n\t\tif (gui.isLeftPressed()) {\r\n\t\t\tturn++;\r\n\t\t}\r\n\t\tif (gui.isRightPressed()) {\r\n\t\t\tturn--;\r\n\t\t}\r\n\t\tgetPhysics().move(accelerate, turn);\r\n\r\n\t}", "public interface Moves {\n\n /**\n * Applies the move onto a shape when it is on the correct tick.\n *\n * @return the shape with the move applied onto it\n */\n ShapeState apply(int tick);\n\n\n /**\n * Gets the initial tick of which the move is applicable on.\n *\n * @return the initial tick.\n */\n ShapeState getInitialState();\n\n /**\n * Gets the final tick of which the move is applicable on.\n *\n * @return the final tick.\n */\n ShapeState getFinalState();\n\n /**\n * Checks whether the move is finished at a certain time.\n *\n * @param tick the time to be checked.\n * @return whether the move is finished at that time.\n *\n */\n boolean isMoveFinished(int tick);\n\n\n\n}", "public boolean onTouchEvent(MotionEvent event) {\n int action = MotionEventCompat.getActionMasked(event);\n switch (action) {\n\n case MotionEvent.ACTION_DOWN: {\n\n if(CheckIfInside(event.getX(), event.getY())) {\n this.playMoving = true;\n }\n break;\n }\n case MotionEvent.ACTION_MOVE: {\n if (!this.playMoving)\n return true;\n\n if (CheckForLimit(event.getX(), event.getY())) {\n this.x = event.getX();\n this.y = event.getY();\n invalidate();\n ///////////////////////////////////////////////////\n double normalizedX = normalizeAileron(x);\n double normalizedY = normalizeElevator(y);\n TcpClient tcpClient = TcpClient.getInstance();\n tcpClient.sendMessage(\"set controls/flight/aileron \" + normalizedX + \"\\r\\n\");\n tcpClient.sendMessage(\"set controls/flight/elevator \" + normalizedY + \"\\r\\n\");\n }\n break;\n }\n //user input's is finished\n case MotionEvent.ACTION_UP :\n this.playMoving = false;\n returnDefault();\n //call on draw\n invalidate();\n }\n return true;\n }" ]
[ "0.6945696", "0.6674615", "0.64796793", "0.6470737", "0.6446802", "0.6403374", "0.6358317", "0.6350835", "0.62269884", "0.6155993", "0.6132435", "0.6112901", "0.61035156", "0.60900444", "0.6040033", "0.6023451", "0.6007138", "0.59736866", "0.5957824", "0.591459", "0.59083605", "0.58821535", "0.5872569", "0.58543336", "0.58011144", "0.5783535", "0.578212", "0.5780134", "0.5764992", "0.5748908", "0.5732834", "0.5714112", "0.57078266", "0.5692979", "0.56787395", "0.5651517", "0.56488246", "0.5623478", "0.5621806", "0.5621806", "0.5621806", "0.5621806", "0.5621806", "0.5621806", "0.5618557", "0.55977243", "0.5591398", "0.5591359", "0.55830926", "0.5581142", "0.5572798", "0.55697", "0.5569047", "0.55642694", "0.5558846", "0.5551479", "0.5551213", "0.5546482", "0.55416983", "0.5537345", "0.55361253", "0.5535172", "0.55322266", "0.5527965", "0.55248785", "0.55182743", "0.551658", "0.5513213", "0.5504277", "0.55001265", "0.5498798", "0.5490687", "0.5471251", "0.5466729", "0.54623497", "0.546055", "0.5458753", "0.5458338", "0.5454481", "0.5450367", "0.5448326", "0.54456836", "0.54454106", "0.5436144", "0.54321754", "0.54282576", "0.5425153", "0.54234064", "0.5423063", "0.54226524", "0.54224056", "0.5421017", "0.542034", "0.5419233", "0.5415148", "0.5410114", "0.54014266", "0.5396653", "0.5393535", "0.5388316" ]
0.57437474
30
Created by lubiao on 2018/3/1.
public interface LoginService { boolean checkPassWord(UserInfo userInfo, String password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\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\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\n protected void getExras() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\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}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void init() {\n }", "private void init() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\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}", "private UsineJoueur() {}", "public void mo4359a() {\n }", "@Override\n public void initialize() {\n \n }", "Consumable() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void gored() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private Singletion3() {}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}" ]
[ "0.60357547", "0.58328545", "0.5646545", "0.5642386", "0.55832773", "0.55832773", "0.55351985", "0.5502112", "0.55013037", "0.5492427", "0.54605454", "0.54493564", "0.54475665", "0.544432", "0.5442605", "0.54389876", "0.54381514", "0.5437392", "0.5437392", "0.5437392", "0.5437392", "0.5437392", "0.5437392", "0.5436323", "0.5425547", "0.5421417", "0.5417565", "0.54133457", "0.54074776", "0.53798544", "0.5372624", "0.5362997", "0.5355451", "0.5347764", "0.5347764", "0.53439504", "0.5341878", "0.5335656", "0.53355855", "0.5329518", "0.5319338", "0.5318825", "0.5312629", "0.5312629", "0.5312629", "0.5312629", "0.5312629", "0.52864075", "0.5271307", "0.5268911", "0.5268911", "0.52623373", "0.5262073", "0.5261072", "0.525764", "0.525764", "0.525764", "0.5256384", "0.5248835", "0.5238649", "0.5238649", "0.5238649", "0.52379644", "0.52365243", "0.52365243", "0.522926", "0.5226939", "0.52243656", "0.52093524", "0.520766", "0.519102", "0.519102", "0.519102", "0.51714355", "0.5167307", "0.5167307", "0.5167307", "0.5165408", "0.5164553", "0.51584446", "0.5151977", "0.51501733", "0.5142269", "0.51397794", "0.51391464", "0.51170045", "0.51166505", "0.5108799", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098841", "0.5098199", "0.50975543", "0.50975543" ]
0.0
-1
The current cluster state exposed by the discovery layer. Packagevisible for tests.
ClusterState state() { return clusterStateSupplier.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String clusterState() {\n return this.clusterState;\n }", "public ODocument clusterStatus() {\n checkConnected();\n return remote.getClusterStatus(user, password);\n }", "@Override\n public ClusterStatus getCurrentClusterStatus() {\n if (getMemberList().size() > 1) {\n return CLUSTER_FUNCTIONAL;\n }\n // when only one node is connected return degraded\n if (getMemberList().size() == 1) {\n return CLUSTER_DEGRADED;\n }\n // consider all other states as illegal\n return CLUSTER_ILLEGAL;\n }", "public Boolean getClusterCoordinator() {\n return clusterCoordinator;\n }", "public String getCluster() {\n return this.cluster;\n }", "public String getCluster() {\n return this.cluster;\n }", "public String getStatus() {\n try {\n ClusterHealthResponse clusterHealthResponse =\n this.client.admin().cluster().health(new ClusterHealthRequest()).get();\n return clusterHealthResponse.getStatus().name();\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error when obtain cluster health\", e);\n throw new ElasticExecutionException(\"Error when trying to obtain the server status\");\n }\n }", "public KetchLeader.State getState() {\n\t\treturn state;\n\t}", "public com.tangosol.net.Cluster getCluster()\n {\n return __m_Cluster;\n }", "default Map<String, Set<String>> getActiveClusterMap() {\n Map<String, Set<String>> result = new HashMap<>();\n result.put(getLocalNodeName(), getStorage().getClusterNames());\n return result;\n }", "public Boolean getCacheClusterEnabled() {\n return cacheClusterEnabled;\n }", "public TrackerCluster getCluster() {return _cluster;}", "public ClusterConfig getClusterConfig() {\n return cluster;\n }", "@Override\n\tpublic java.lang.String getCluster() {\n\t\treturn _scienceApp.getCluster();\n\t}", "public ClusterSession getClusterSession() {\n return cl;\n }", "public CloudState getCloudState();", "public int[] getCluster() {\r\n return this.clusters[this.clusterIndex];\r\n }", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Cluster getCluster();", "public String discoveryStatus() {\n return this.discoveryStatus;\n }", "boolean hasCluster();", "@Override\n public boolean getIsClusteringKey() {\n return isClusteringKey_;\n }", "@Override\n public boolean getIsClusteringKey() {\n return isClusteringKey_;\n }", "public List<ClusterVersionDetails> availableClusterVersions() {\n return this.availableClusterVersions;\n }", "synchronized public int getNumVisibleClusters() {\n return numVisibleClusters;\n }", "public java.lang.String getCluster() {\n java.lang.Object ref = cluster_;\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 cluster_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n public List<List<Integer>> getStateInfo() {\n List<List<Integer>> currStateConfig = getVisualInfoFromPieces(STATE_INFO_IDENTIFIER);\n return Collections.unmodifiableList(currStateConfig);\n }", "public String getClusterIdentifier() {\n return this.clusterIdentifier;\n }", "public String clusterId() {\n return this.clusterId;\n }", "public String getClusterAddress() {\r\n return clusterAddress;\r\n }", "@java.lang.Override\n public java.lang.String getCluster() {\n java.lang.Object ref = cluster_;\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 cluster_ = s;\n return s;\n }\n }", "public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterBytes() {\n java.lang.Object ref = cluster_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n cluster_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getClusterId() {\n return this.ClusterId;\n }", "@Override\n public boolean getCurrentNodeStatus(InetAddress ia) {\n if (ia.isAnyLocalAddress()) {\n return true;\n }\n // Check if given address is in cluster\n for (Client c : instance.getClientService().getConnectedClients()) {\n if (c.getSocketAddress().getAddress().equals(ia)) {\n return true;\n }\n }\n // reject all other addresses\n return false;\n }", "public ImcSystemState state() {\n\t\treturn state;\n\t}", "public String discoverClusterName() throws ClusterNameDiscoveryException {\n try {\n return AmazonECSAgentIntrospectionUtils.getMetadata().getCluster();\n } catch (Exception e) {\n throw new ClusterNameDiscoveryException(\"Cluster name discovery failed\", e);\n }\n }", "@GetMapping(\"ClusterState\")\n public JSONObject ClusterState(String clusterState) {\n JSONObject jsonObject = new JSONObject();\n IgniteCluster igniteCluster = ignite.cluster();\n switch (clusterState) {\n case \"INACTIVE\":\n igniteCluster.state(ClusterState.INACTIVE);\n break;\n case \"ACTIVE_READ_ONLY\":\n igniteCluster.state(ClusterState.ACTIVE_READ_ONLY);\n break;\n default:\n igniteCluster.state(ClusterState.ACTIVE);\n break;\n }\n jsonObject.put(\"igniteCluster\", igniteCluster);\n jsonObject.put(\"nodes\", igniteCluster.nodes());\n return jsonObject;\n }", "public String getClusterId() {\n return clusterId;\n }", "public List<VPlexClusterInfo> getClusterInfoDetails() throws VPlexApiException {\n s_logger.info(\"Request for complete detailed cluster info for VPlex at {}\", _baseURI);\n return _discoveryMgr.getClusterInfo(false, true);\n }", "@Override\n\tpublic long getClusterId() {\n\t\treturn model.getClusterId();\n\t}", "public interface ClusterSingleton {\n\n enum State {\n /** Component is idle. */\n STOPPED,\n /** Component is starting. */\n STARTING,\n /** Component is active. */\n RUNNING,\n /** Component is stopping. */\n STOPPING\n }\n\n /** Unique name of this singleton. Used for registration. */\n String getName();\n\n /**\n * Start the operation of the component. Initially this method should set the state to STARTING,\n * and on success it should set the state to RUNNING.\n *\n * @throws Exception on startup errors. The component should revert to the STOPPED state.\n */\n void start() throws Exception;\n\n /** Returns the current state of the component. */\n State getState();\n\n /**\n * Stop the operation of the component. Initially this method should set the state to STOPPING,\n * and on return it should set the state to STOPPED. Components should also avoid holding any\n * resource when in STOPPED state.\n */\n void stop();\n}", "public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}", "public final int[] cacheNodeStatus() {\n return new int[]{0,0,0,0,0,0,0,0,0,0};\r\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public CustomClusterManager getClusterManager(){\n return mClusterManager;\n }", "public Cluster getCluster()\n \t{\n \t\treturn mParentCluster;\n \t}", "public String getCacheClusterSize() {\n return cacheClusterSize;\n }", "String getClusterName();", "public com.google.protobuf.ByteString\n getClusterBytes() {\n java.lang.Object ref = cluster_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n cluster_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Long getState() {\n return state;\n }", "public final int getClusterLifetimeWithoutSupportUs() {\n return clusterLifetimeWithoutSupportUs;\n }", "@Override\n public String toString() {\n return String.format(\"----Cluster %s\\n\", this.getId()) +\n String.format(getCellsToString());\n }", "public static boolean isClusterOK() {\n\t\ttry {\n\t\t\tHealthStatus status = getRESTClient().cluster().health().status();\n\t\t\treturn !HealthStatus.Red.equals(status);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(null, e);\n\t\t}\n\t\treturn false;\n\t}", "public interface ClusterControl extends ClusterMetrics {\n\n\t/** \n\t * Used by the master to determine if he is still the master.\n\t * Updates the cluster status last processed timestamp. Cancels\n\t * any usurp actions.\n\t * @param heartBeat true if this message is a heartbeat\n\t */\n\tpublic boolean verifyStatus(boolean heartbeat);\n\t\n\t/**\n\t * Used to send a heartbeat message when no traffic detected.\n\t * Should be configured to send a special message to the main\n\t * cluster thread so the lastProcessed timestamp will be \n\t * updated. \n\t */\n\tpublic void sendHeartbeat();\n\t\n\t/**\n\t * Called when the monitor detects the main thread is not \n\t * processing; stop the soInbound adapter so another instance\n\t * can take over.\n\t */\n\tpublic void stopInbound();\n\t\n\t/**\n\t * Called when a usurper successfully takes over the master\n\t * role; start the soInbound adapter.\n\t */\n\tpublic void startInbound();\n\n\t/**\n\t * Pause the application/instance - if this is a single-source\n\t * application, all instances will be paused; otherwise just\n\t * this instance will be paused.\n\t */\n\tpublic String pause();\n\t\n\t/**\n\t * Resume the application/instance - if this is a single-source\n\t * application, normal master election will occur (if the previous\n\t * master is available, it will most likely resume that role); \n\t * otherwise, just this instance is resumed.\n\t */\n\tpublic String resume();\n\t\n\t/**\n\t * Pause all (non-single-source) application instances. For single-\n\t * source applications, use {@link #pause()}.\n\t * @return\n\t */\n\tpublic String pauseAll();\n\t\n\t/**\n\t * Resume all (non-single-source) application instances. For single-\n\t * source applications, use {@link #resume()}.\n\t * @return\n\t */\n\tpublic String resumeAll();\n\t\n\t/**\n\t * Monitor the state of the master.\n\t */\n\tpublic void doMonitor();\n\n\t/**\n\t * @return the application id.\n\t */\n\tpublic String getApplicationId();\n\n\t/**\n\t * @return a string representing the current status of the application\n\t */\n\tpublic String obtainApplicationStatus();\n /**\n * \n */\n\tpublic int getMessageCount();\n}", "public FinchState getState()\n {\n return finchController.getState();\n }", "public ConnectivityState getState() {\n ConnectivityState stateCopy = this.state;\n if (stateCopy != null) {\n return stateCopy;\n }\n throw new UnsupportedOperationException(\"Channel state API is not implemented\");\n }", "OperationalState operationalState();", "OperationalState operationalState();", "boolean isAllowClusterGet();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public State getState()\n\t\t{\n\t\t\treturn ConferenceInfoDocument.this.getState(endpointElement);\n\t\t}", "public java.lang.String getClusterName() {\n return clusterName;\n }", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public SME_Cluster[] getClusters();", "public String getState() {\n\t\treturn state.toString();\n\t}", "public Boolean enablePrivateCluster() {\n return this.enablePrivateCluster;\n }", "@Override\n public String getState() {\n\n if(this.state == null){\n\n this.state = TestDatabase.getInstance().getClientField(token, id, \"state\");\n }\n\n return state;\n }", "public int getState(){\n\t\treturn state;\n\t}", "public JSONObject zkCliStatus(String clusterAlias) {\n\t\tJSONObject target = new JSONObject();\n\t\tKafkaZkClient zkc = kafkaZKPool.getZkClient(clusterAlias);\n\t\tif (zkc != null) {\n\t\t\ttarget.put(\"live\", true);\n\t\t\ttarget.put(\"list\", SystemConfigUtils.getProperty(clusterAlias + \".zk.list\"));\n\t\t} else {\n\t\t\ttarget.put(\"live\", false);\n\t\t\ttarget.put(\"list\", SystemConfigUtils.getProperty(clusterAlias + \".zk.list\"));\n\t\t}\n\t\tif (zkc != null) {\n\t\t\tkafkaZKPool.release(clusterAlias, zkc);\n\t\t\tzkc = null;\n\t\t}\n\t\treturn target;\n\t}", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public int getState() {\n\t\treturn state;\n\t}", "boolean getIsClusteringKey();", "public int getNumClusters() {\n return clusters.size();\n }", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "public String getClusterLeader() throws RemoteException;", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public String getMonitoringState() {\n StringBuilder sb = new StringBuilder();\n sb.append(queueManager.getMonitoringInfo());\n return sb.toString();\n }", "public String clusterEndpoint() {\n return this.clusterEndpoint;\n }", "public String getClusterName() {\n\t\treturn clusterName;\n\t}", "public NodeState getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }" ]
[ "0.8259337", "0.7785722", "0.71384287", "0.6759736", "0.6708148", "0.6708148", "0.66525143", "0.66356736", "0.66175765", "0.65913594", "0.65530515", "0.6503852", "0.6467015", "0.64472663", "0.6439289", "0.6413823", "0.6404503", "0.63828236", "0.6269859", "0.6203934", "0.620334", "0.6183142", "0.6168901", "0.615935", "0.6108796", "0.60862076", "0.6081647", "0.6079268", "0.60667497", "0.6060931", "0.6048838", "0.6033465", "0.6014528", "0.6011894", "0.5999772", "0.5986326", "0.5971794", "0.5953942", "0.59477764", "0.5924598", "0.5920533", "0.5910255", "0.59098583", "0.5903953", "0.5903953", "0.5903953", "0.5903953", "0.5892882", "0.5882154", "0.5867109", "0.5853645", "0.5843374", "0.5840758", "0.5828388", "0.58069295", "0.5801574", "0.57963336", "0.579392", "0.5791973", "0.5791501", "0.5791501", "0.57905287", "0.57796097", "0.57796097", "0.57796097", "0.57796097", "0.57796097", "0.57796097", "0.57792103", "0.5774448", "0.5772988", "0.5772988", "0.57635355", "0.57596785", "0.5758001", "0.57575965", "0.5750666", "0.57453215", "0.5743335", "0.5743335", "0.5743335", "0.5743335", "0.5743335", "0.5743335", "0.57407427", "0.5739691", "0.57372844", "0.5735118", "0.5729013", "0.5723557", "0.5723557", "0.5723557", "0.5723557", "0.5723557", "0.5721015", "0.5717117", "0.5715181", "0.5712471", "0.5709432", "0.5709432" ]
0.7866073
1
Returns the tasks that are pending.
public List<PendingClusterTask> pendingTasks() { final var currentTimeMillis = threadPool.relativeTimeInMillis(); return allBatchesStream().flatMap(e -> e.getPending(currentTimeMillis)).toList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public ArrayList<Task> listNotStarted() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 0) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "public List<TaskDescription> getActiveTasks();", "public Set<Task> getUnfinishedTasks(){\r\n return unfinished;\r\n }", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "public static List<Task> findAllRunningTasks() {\r\n List<Task> outTasks = new ArrayList<Task>();\r\n List<ITask> iTasks = findAllTasks(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n\r\n for (ITask iTask : iTasks) {\r\n outTasks.add(convertITaskToTask(iTask));\r\n }\r\n return outTasks;\r\n }", "@SuppressWarnings(\"unchecked\")\n public List<Item> getActiveTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item where status = 0\").list();\n session.close();\n return list;\n }", "public List<Order> getPending() {\n\t\treturn orderDao.getPendingToOrder();\n\t}", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }", "public int getTasks() {\r\n return tasks;\r\n }", "public ArrayList<Task> listConcluded() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 100) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "int activeTasks();", "public ArrayList<Task> getVisibleTasks() {\n return this.mTaskStackContainers.getVisibleTasks();\n }", "List<Task> getAllTasks();", "public Task[] getTasks()\n {\n return tasks.toArray(new Task[tasks.size()]);\n }", "public List<Task> getTasks() {\n return this.tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "Set<Task> getAllTasks();", "public ArrayList<Task> getIncompleteTasks() {\n ArrayList<Task> output = new ArrayList<>();\n\n // get a readable instance of the database\n SQLiteDatabase db = getReadableDatabase();\n if (db == null) return output;\n\n // run the query to get all incomplete tasks\n Cursor rawTasks = db.rawQuery(\"SELECT * FROM Tasks WHERE is_complete = 0 ORDER BY due_date ASC;\", null);\n\n // move the cursor to the first result (or skip this section if there are no results)\n if (rawTasks.moveToFirst()) {\n // iterate through results\n do {\n // convert the cursor version of the task to a real Task object and add it to output\n output.add(new Task(rawTasks));\n } while (rawTasks.moveToNext());\n }\n\n // we're done with the cursor and database, so we can close them here\n rawTasks.close();\n db.close();\n\n // return the (possibly empty) list\n return output;\n\n }", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }", "public boolean getSplitInProgressTasks()\r\n {\r\n return (m_splitInProgressTasks);\r\n }", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "public ArrayList<Task> getVisibleTasks() {\n ArrayList<Task> visibleTasks = new ArrayList<>();\n forAllTasks(new Consumer(visibleTasks) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$TaskStackContainers$rQnI0Y8R9ptQ09cGHwbCHDiG2FY */\n private final /* synthetic */ ArrayList f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.TaskStackContainers.lambda$getVisibleTasks$0(this.f$0, (Task) obj);\n }\n });\n return visibleTasks;\n }", "public String[] getJobsWaiting();", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "public ArrayList<Task> getTasks() {\n return tasks;\n }", "public Collection<Node> getTasks(Processor p) {\n return p.getScheduledTasks();\n }", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "public synchronized List<MonitoredTask> getTasks()\n {\n purgeExpiredTasks();\n ArrayList<MonitoredTask> ret = Lists.newArrayListWithCapacity(tasks.size());\n for (@SuppressWarnings(\"unchecked\") Iterator<TaskAndWeakRefPair> it = tasks.iterator(); it.hasNext(); )\n {\n TaskAndWeakRefPair pair = it.next();\n MonitoredTask t = pair.get();\n ret.add(t.clone());\n }\n return ret;\n }", "public Map<String, Integer> getAllReadyTasks() {\n if (!regCenter.isExisted(ReadyNode.ROOT)) {\n return Collections.emptyMap();\n }\n List<String> jobNames = regCenter.getChildrenKeys(ReadyNode.ROOT);\n Map<String, Integer> result = new HashMap<>(jobNames.size(), 1);\n for (String each : jobNames) {\n String times = regCenter.get(ReadyNode.getReadyJobNodePath(each));\n if (!Strings.isNullOrEmpty(times)) {\n result.put(each, Integer.parseInt(times));\n }\n }\n return result;\n }", "public List<File> getTasks() {\n return tasks;\n }", "public boolean getUsedInTasks() {\n return usedInTasks;\n }", "public List<ScheduledTask> getAllPendingTasksByUser(int userId) {\n \t\tSet<String> smembers = jedisConn.smembers(USER_TASKS(String.valueOf(userId)));\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// for each user task id, get the actual task \n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "public List getPendingRequests(PendingRequest pendingRequest);", "Integer getTransactionsPending() {\n\t\tif (transactionMonitor != null) {\n\t\t\treturn transactionMonitor.getPendingTransactions();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "Set<Task> getDependentTasks();", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "public ArrayList<Task> getTaskList() {\n return tasks;\n }", "public String pendingToString() {\n InterruptibleTask interruptibleTask = this.task;\n if (interruptibleTask == null) {\n return super.pendingToString();\n }\n StringBuilder stringBuilder = new StringBuilder(\"task=[\");\n stringBuilder.append(interruptibleTask);\n stringBuilder.append(\"]\");\n return stringBuilder.toString();\n }", "public List<InProgress> findAllInProgress() {\n try {\n return jdbcTemplate.query(\"SELECT id, task_details, finish_date,difficulty,priority FROM in_progress\",\n (rs, rowNum) -> new InProgress(rs.getLong(\"id\"), rs.getString(\"task_details\")\n ,rs.getDate(\"finish_date\"), rs.getString(\"difficulty\"),\n rs.getString(\"priority\") ));\n } catch (Exception e) {\n return new ArrayList<InProgress>();\n }\n }", "public Map<Long, Collection<TaskShortInfo>> findAllPendingTasksForUserAndTeamMembers(User user) {\n return taskRepository.findAllPendingTasksForUserAndTeamMembers(user.getId(), user.getRolesName());\n }", "private int[] getTaskCountByStatus() {\n int[] counts = new int[2];\n int doneCount = 0;\n int toDoCount = 0;\n for (Task t : taskStore) {\n if (t.getIsDone()) {\n doneCount++;\n } else {\n toDoCount++;\n }\n }\n counts[0] = toDoCount;\n counts[1] = doneCount;\n return counts;\n }", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public int getNumTasks() {\n return tasks.size();\n }", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "public String[] getTaskList() {\n String[] tasks = {\"export\"};\n\n return tasks;\n }", "public ArrayList<Task> getTaskList() {\n\t\treturn tasks;\n\t}", "public String[] getPendingPrintJobs()\n {\n return printerSimulator.getPendingPrintJobs();\n }", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public ArrayList<Task> list() {\r\n return tasks;\r\n }", "private Task[][] getTasks() {\n\t\tList<Server> servers = this.scheduler.getServers();\n\t\tTask[][] tasks = new Task[servers.size()][];\n\t\tfor (int i = 0; i < servers.size(); i++) {\n\t\t\ttasks[i] = servers.get(i).getTasks();\n\t\t}\n\t\treturn tasks;\n\t}", "@Override\n\tpublic Collection<TaskStatus> getTaskStatus(){\n \tcheckInitialized();\n \t\n \t@SuppressWarnings(\"unchecked\")\n\t\tCollection<Collection<TaskStatus>> statusTree=Collections.EMPTY_LIST;\n \tfinal MultiTask<Collection<TaskStatus>> mtask;\n \ttry {\n\t\t\t mtask = breeder.executeCallable(new GetTaskStatus(this));\n\t\t\t statusTree = mtask.get();\n \t} catch (ExecutionException ex){\n \t\tlog.fatal(\"Could not get status of tasks for job \"+this.getId(), ex);\n \t} catch(InterruptedException ex) {\n \t\tlog.fatal(\"Could not get status of tasks for job \"+this.getId(), ex);\n \t}\n\t\t\t\n\t\t// Flatten into single collection\n\t\tList<TaskStatus> result = new ArrayList<TaskStatus>((int)(statusTree.size()*this.getThreadCount()));\n\t\tfor(Collection<TaskStatus> statusForNode: statusTree) {\n\t\t\tresult.addAll(statusForNode);\n\t\t}\n\t\t\n\t\treturn result;\n \n\t}", "public int numberOfPendingTasks() {\n return allBatchesStream().mapToInt(Batch::getPendingCount).sum();\n }", "public static boolean addressWaiting(){\n boolean addressedSomething = false;\n removeSet = new HashSet<>();\n for(Instruction i : waitingList){\n if(request(i)){\n //System.out.println(\"Task \" + i.taskNumber + \" had its request completed off the waiting List\" );\n\n removeSet.add(i);\n addressedSomething = true;\n }else{\n //System.out.println(\"Task \" + i.taskNumber + \" could not be completed, remains on waiting list\" );\n }\n }\n\n return addressedSomething;\n }", "public ArrayList<Task> getList() {\n return tasks;\n }", "@Override\n\tpublic List<RequestLoanDevices> getPendingList() {\n\t\treturn requestDao.pendingRequest();\n\t}", "public boolean hasPendingQuestions() {\r\n try {\r\n Task[] tasks = getTasks();\r\n if (tasks == null || tasks.length == 0)\r\n return false;\r\n \r\n for (int i = 0; i < tasks.length; i++) {\r\n if (tasks[i].getPendingQuestions() != null\r\n && tasks[i].getPendingQuestions().length > 0)\r\n return true;\r\n }\r\n \r\n return false;\r\n } catch (ProcessManagerException pme) {\r\n return false;\r\n }\r\n }", "long getExcutorTasksInWorkQueueCount();", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "List<Task> getTaskdetails();", "@Secured({ \"ROLE_ADMIN\" })\r\n\t@RequestMapping(value = { \"/admin/comment-pending\", \"admin/komentar-nacekanju\" }, method = RequestMethod.GET)\r\n\tpublic ResponseEntity<Iterable<Comment>> getAllPending() {\r\n\r\n\t\treturn new ResponseEntity(commentRepository.findByCommentState(CommentState.PENDING), HttpStatus.OK);\r\n\t}", "public String getTasks() {\n StringJoiner result = new StringJoiner(\"\\n\");\n for (int i = 0; i < tasks.size(); i++) {\n Task t = tasks.get(i);\n result.add(String.format(\"%d.%s\", i + 1, t));\n }\n\n return result.toString();\n }", "public List<Task> getTaskForToday() {\n\t\tDate currentDate = DateUtils.truncate(new Date(), Calendar.DATE);\n\n\t\tgetCesarTasksExpiringToday();\n\t\tgetHomeTasksExpiringToday();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.add(Calendar.HOUR, -2);\n\t\tList<Task> tasksPermanentTasks = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndCompletionDateAfterOrCompletionDateIsNullOrderByDoneAsc(false,\n\t\t\t\t\t\tcalendar.getTime());\n\t\tList<Task> tasksTemp = taskRepository\n\t\t\t\t.getTaskByExpireAtTheEndOfTheDayAndDateAndCompletionDateAfterOrderByDoneAsc(true, currentDate,\n\t\t\t\t\t\tcalendar.getTime());\n\t\ttasksPermanentTasks.addAll(tasksTemp);\n\t\treturn tasksPermanentTasks;\n\t}", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "Set<StandbyTask> getStandbyTasks();", "public List<ScheduledTask> fullSchedule() {\n List<ScheduledTask> scheduledTaskList = new LinkedList<>();\n for (ScheduledTask task : this) {\n if (!task.getNode().getId().equals(\"end\")) {\n scheduledTaskList.add(task);\n }\n }\n return scheduledTaskList;\n }", "public List<TaskMaster> retrieveCompletedTaskByProjectId(Long projectId);", "public List<String> getRunningESBTaskList() throws Exception {\n return ntaskManager.getRunningTaskList();\n }", "TaskList getList();", "public static List<Order> getPendingOrders() throws SQLException {\n\t\t\r\n\t\tList<Order> orderList = new ArrayList<>();\r\n\t\t\r\n\t\torderList = OrderDAO.fetchOrder(OrderStatus.Pending);\r\n\t\t\r\n\t\tfor(Order order: orderList){\r\n\t\t\t\r\n\t\t\tSystem.out.println(order);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn orderList;\r\n\t}", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "public List<Task> listTasks(String extra);", "public Set<JenkinsActiveConfiguration> getPendingActiveConfigurations() {\n return pendingActiveConfigurations;\n }", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public List<String> getMembersPendingUuids() {\n\t\treturn null;\n\t}", "public int size()\n {\n return tasks.size();\n }", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }", "public static void printTasks(){\n int totalTime = 0;\n int totalWait = 0;\n for(Task t : taskList){\n\n if(t.isAborted){\n System.out.println(\"TASK \" + t.taskNumber + \" aborted\" );\n }else{\n System.out.println(\"TASK \" + t.taskNumber + \" \" + t.terminateTime + \" \" + t.waitingCount + \" %\" + 100 * ((float)t.waitingCount / t.terminateTime));\n totalTime += t.terminateTime;\n totalWait += t.waitingCount;\n }\n }\n System.out.println(\"TOTAL\" + \" \" + totalTime + \" \" + totalWait + \" %\" + 100 *((float)totalWait / totalTime));\n\n }", "public Task[] getTasks() throws ProcessManagerException {\r\n try {\r\n return Workflow.getTaskManager().getTasks(currentUser, currentRole,\r\n currentProcessInstance);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_GET_TASKS_FAILED\", e);\r\n }\r\n }", "public Cursor getAllTasks()\n {\n Cursor mCursor = db.query(DATABASE_TABLE, new String[]{KEY_ROWID,\n KEY_TASK_SMALLBLIND,\n KEY_TASK_BUTTON,\n KEY_TASK_CUTOFF,\n KEY_TASK_HIJACK,\n KEY_TASK_LOJACK,\n KEY_TASK_UTG2,\n KEY_TASK_UTG1,\n KEY_TASK_UTG},null,null,null,null,null);\n\n\n return mCursor;\n }", "int getTaskIdCount();", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public int getTasksSize() {\n return tasks.size();\n }", "public LinkedBlockingQueue<Run> getCompletedRuns() {\n\t\treturn new LinkedBlockingQueue<Run>(completedRuns);\n\t}", "public TaskList getTasks() {\n\t\t//Creates a copy of the state.\n\t\t//This is needed in order to make it impossible to change state from the outside by manipulating the returned object\n\t\tTaskList temp = new TaskList();\n\t\tsynchronized(taskListState) {\n\t\t\tfor(Task t : taskListState.getList())\n\t\t\t\ttemp.getList().add(t);\n\t\t}\n\t\treturn temp;\n\t}", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "public void listAllTasks() {\n System.out.println(LINEBAR);\n if (tasks.taskIndex == 0) {\n ui.printNoItemInList();\n System.out.println(LINEBAR);\n return;\n }\n\n int taskNumber = 1;\n for (Task t : tasks.TaskList) {\n System.out.println(taskNumber + \". \" + t);\n taskNumber++;\n }\n System.out.println(LINEBAR);\n }" ]
[ "0.7831527", "0.76449364", "0.75268346", "0.7051112", "0.7007736", "0.69968575", "0.68207985", "0.6684706", "0.6647195", "0.6599277", "0.65956455", "0.65585184", "0.654604", "0.65319943", "0.65124464", "0.65063983", "0.6504573", "0.64605683", "0.64562505", "0.64562505", "0.64562505", "0.6451647", "0.64391625", "0.6406494", "0.63702667", "0.6362452", "0.635918", "0.63580406", "0.6353609", "0.63041794", "0.62767535", "0.6269097", "0.62653434", "0.6264837", "0.6262337", "0.62454224", "0.622356", "0.62045276", "0.6191317", "0.61769897", "0.6174895", "0.6137892", "0.6130243", "0.610824", "0.610824", "0.6093919", "0.60669404", "0.6065864", "0.60652906", "0.60477364", "0.60452217", "0.60369927", "0.60346276", "0.6030548", "0.6029173", "0.60065585", "0.5999892", "0.59737366", "0.5956001", "0.59524727", "0.5945743", "0.5942033", "0.5936072", "0.5932324", "0.5927818", "0.5925984", "0.59253865", "0.5915642", "0.5899454", "0.5897661", "0.5893531", "0.5893336", "0.58820325", "0.588061", "0.58743596", "0.5871978", "0.58676094", "0.5831347", "0.5829734", "0.5825902", "0.5794995", "0.57800597", "0.5770327", "0.57551277", "0.5754151", "0.5744393", "0.5739396", "0.5738965", "0.57258075", "0.5716543", "0.57122904", "0.5705359", "0.57043755", "0.5697099", "0.5696111", "0.56928843", "0.56915885", "0.56900376", "0.56677586", "0.5659229" ]
0.7791189
1
Returns the number of currently pending tasks.
public int numberOfPendingTasks() { return allBatchesStream().mapToInt(Batch::getPendingCount).sum(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "public int getNumTasks() {\n return tasks.size();\n }", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "public java.lang.Integer getTaskCount() {\n return taskCount;\n }", "public long getTaskCount() {\r\n\t\treturn taskCount;\r\n\t}", "public final int getPendingCount()\n/* */ {\n/* 508 */ return this.pending;\n/* */ }", "int getTaskIdCount();", "long getExcutorTasksInWorkQueueCount();", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public int getTaskIdCount() {\n return taskId_.size();\n }", "public int getTasksSize() {\n return tasks.size();\n }", "public int countList() {\n return tasks.size();\n }", "public int getCachedTasksSize() {\n return cachedTasks.size();\n }", "public int size()\n {\n return tasks.size();\n }", "public int getCount() {\n return this.tasks.size();\n }", "public int getSize() {\n return tasks.size();\n }", "long getExecutorTaskCount();", "public static int getPendingRequests() {\n\t\treturn writeQueue.size() + requestsBeingSending.intValue();\n\t}", "public String numTasks() {\n return \"Now you have \" + USER_TASKS.size() + \" tasks in the list.\";\n }", "@SimpleFunction(description = \"Gets number of pending\"\n + \"background uploads. Advanced feature.\")\n public int GetNumberPendingUploads() {\n return numPending; \n }", "public int getTasks() {\r\n return tasks;\r\n }", "public int getSize() {\n return this.tasks.size();\n }", "public int getRunnableCount() {\n return queue.size();\n }", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "int activeTasks();", "public int getPausedTaskCount() {\n synchronized (this.lifecycleMonitor) {\n return this.pausedTasks.size();\n }\n }", "public int getCount() {\n\t return taskList.size();\n\t }", "Integer getTransactionsPending() {\n\t\tif (transactionMonitor != null) {\n\t\t\treturn transactionMonitor.getPendingTransactions();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int asyncTaskCount();", "public long getPendingMessageCount() {\n return (long) this.incUpdateQueue.size();\n }", "int getTaskDetailsCount();", "public Integer getInProgressStackInstancesCount() {\n return this.inProgressStackInstancesCount;\n }", "long getExecutorCompletedTaskCount();", "private int[] getTaskCountByStatus() {\n int[] counts = new int[2];\n int doneCount = 0;\n int toDoCount = 0;\n for (Task t : taskStore) {\n if (t.getIsDone()) {\n doneCount++;\n } else {\n toDoCount++;\n }\n }\n counts[0] = toDoCount;\n counts[1] = doneCount;\n return counts;\n }", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "public int sizeOfList(){\n return tasks.size();\n }", "public int getTotalNumberOfSubtasks() {\n\t\treturn totalNumberOfSubtasks;\n\t}", "int getNewlyAvailableQuestsCount();", "int getNumBarriers() {\n return queue.size();\n }", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "public int getTodayCount(){\n\t\tint count = 0;\n\t\tfor ( Task task : m_Tasks ){\n\t\t\tif( task.folder.equals(\"Today\") && !task.done) count++;\n\t\t}\n\t\treturn count;\n\t}", "public int countActive() {\n int result = 0;\n \n synchronized (m_reservableListMutex) {\n final Iterator iterator = m_reservables.iterator();\n \n while (iterator.hasNext()) {\n final Reservable reservable = (Reservable)iterator.next();\n \n if (!reservable.isClosed() && !reservable.isSentinel()) {\n ++result;\n }\n }\n }\n \n return result;\n }", "public Integer getFreeTimes() {\r\n return freeTimes;\r\n }", "public int getNewlyAvailableQuestsCount() {\n return newlyAvailableQuests_.size();\n }", "Long getRunningCount();", "int getDeliveredCount();", "public int getAvailableCount();", "int getNumberOfTasksOnCriticalPath();", "public int getRequests()\n\t{\n\t\tint requests=0;\n\t\tString query=\"select count(*) from requests where status=?\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tps.setString(1, \"Confirm\");\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\trequests=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn requests;\n\t}", "public int getCount() {\n return queue.size();\n }", "int getExecutorActiveCount();", "public int getNewlyAvailableQuestsCount() {\n if (newlyAvailableQuestsBuilder_ == null) {\n return newlyAvailableQuests_.size();\n } else {\n return newlyAvailableQuestsBuilder_.getCount();\n }\n }", "public default int getActiveRequirementCount() {\n\t\tint result = 0;\n\t\tif (getRequirements() != null) {\n\t\t\tfor (Requirement req : getRequirements()) {\n\t\t\t\tif (!req.isArchived()) {\n\t\t\t\t\tresult++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "int numberOfWorkingWorkers();", "public int getRetryWaitingCount() {\r\n return root.getRetryWaitingCount();\r\n }", "public int CompletedCount() {\n \t\treturn jobcomplete.size();\n \t}", "int getProgressCount();", "int getProgressCount();", "int getProgressCount();", "protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}", "public int getCurrentTripsCount() {\n return currentTrips_.size();\n }", "int getEnqueuedBlockRequestsNumber() {\n int count = 0;\n for (StdPeerMessage pm : sendQueue) {\n if (pm.type == StdPeerMessage.REQUEST) {\n count++;\n }\n }\n return count;\n }", "public int getCurrentTripsCount() {\n return currentTrips_.size();\n }", "int getActiveBlockRequestsNumber() {\n return blockRequests.size();\n }", "public int pageCount()\n {\n return (int)Math.ceil((double)getTaskVector().size() /\n (double)getRecordsPerPage());\n }", "public int getTotalWait() {\n return totalWait;\n }", "int getNumberOfTasksDeterminingBuildDuration();", "public String percentCompleteCountQATasks() {\n\t\tint fixed = closedQATasks().count();\n\t\tint total = qaTasks().count();\n\t\t\n return percentCompleteStringFromDouble(((double)fixed/(double)total) * 100);\n\t}", "@Override\n public int getNumIdle() {\n return _pool.size();\n }", "int getRequestsCount();", "int getRequestsCount();", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "public static long getStageTaskCount(String stage)\n {\n return stageQueues_.get(stage).getTaskCount();\n }", "Integer backlogCapacity();", "public int getMaxTasksPerNode() {\n return maxTasksPerNode;\n }", "@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();", "long getRequestsCount();", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "public int getRunningCount() {\r\n return root.getRunningCount();\r\n }", "int getUserQuestJobsCount();", "private synchronized void incrementPending() {\n\t\tpending++;\n\t}", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "public int queueSize() {\n return executor.getQueue().size();\n }", "public final int decrementPendingCountUnlessZero()\n/* */ {\n/* */ int i;\n/* */ \n/* */ \n/* 549 */ while (((i = this.pending) != 0) && \n/* 550 */ (!U.compareAndSwapInt(this, PENDING, i, i - 1))) {}\n/* 551 */ return i;\n/* */ }", "public int getDeliveredCount() {\n return delivered_.size();\n }", "public boolean getUsedInTasks() {\n return usedInTasks;\n }", "public int getAmountDone();", "int getNumBufferedBytes() {\n ChannelBuffer buf;\n int IOQueued;\n for (IOQueued = 0, buf = inQueueHead;\n buf != null; buf = buf.next) {\n IOQueued += buf.nextAdded - buf.nextRemoved;\n }\n return IOQueued;\n }", "public int available() {\n return numAvailable;\n }", "public int getNumberOfCompletedFiles() {\n return numberOfCompletedFiles;\n }", "public int getRequestsCount() {\n return requests_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }" ]
[ "0.8136498", "0.7810209", "0.7672212", "0.7497705", "0.74489117", "0.7431785", "0.7326455", "0.73112524", "0.7268568", "0.7221356", "0.7196939", "0.7188041", "0.7100043", "0.7093277", "0.7082716", "0.7017004", "0.69981813", "0.6984594", "0.69647175", "0.69244707", "0.6909883", "0.6899056", "0.68759376", "0.68606013", "0.68405074", "0.6822064", "0.6812586", "0.6769209", "0.67606956", "0.67235017", "0.669243", "0.6637949", "0.6619404", "0.66127133", "0.6596909", "0.6555312", "0.6532897", "0.6418172", "0.6372883", "0.6335005", "0.6284283", "0.6284283", "0.6284283", "0.6270351", "0.6259547", "0.6250545", "0.6235802", "0.6213918", "0.62127185", "0.6211847", "0.62045044", "0.62018895", "0.61946225", "0.61721784", "0.6157648", "0.6138184", "0.61364484", "0.6123181", "0.6121537", "0.60970837", "0.60970837", "0.60970837", "0.6092588", "0.60916555", "0.60738677", "0.6070229", "0.6052841", "0.60444236", "0.6021506", "0.60212266", "0.60111547", "0.59805614", "0.5978519", "0.5978519", "0.5966083", "0.59657973", "0.59379596", "0.59290826", "0.59286183", "0.5918972", "0.5915222", "0.591328", "0.5901942", "0.5895092", "0.5891168", "0.58873564", "0.58873564", "0.58873564", "0.58805525", "0.5876149", "0.5872385", "0.5867368", "0.5867314", "0.58638275", "0.58634025", "0.5861915", "0.5857072", "0.5854558", "0.5849775", "0.5849775" ]
0.82762927
0
Returns the maximum wait time for tasks in the queue
public TimeValue getMaxTaskWaitTime() { final var oldestTaskTimeMillis = allBatchesStream().mapToLong(Batch::getCreationTimeMillis).min().orElse(Long.MAX_VALUE); if (oldestTaskTimeMillis == Long.MAX_VALUE) { return TimeValue.ZERO; } return TimeValue.timeValueMillis(threadPool.relativeTimeInMillis() - oldestTaskTimeMillis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxWait() {\n\t\treturn this.maxWait;\n\t}", "public static int maxWait(Queue Storage, int m){\n\t\tint wait = 0;\n\t\tfor(int i = 0; i<m; i++){\n\t\t\tJob temp = (Job)Storage.dequeue();\n\t\t\tif(wait < temp.getWaitTime()) wait = temp.getWaitTime();\n\t\t\tStorage.enqueue(temp);\n\t\t}\n\t\treturn wait;\n\t}", "public double maxWait()\r\n {\r\n //find the max value in an arraylist\r\n double maxWait = servedCustomers.get(0).getwaitTime();\r\n for(int i = 1; i < servedCustomers.size(); i++){\r\n if(servedCustomers.get(i).getwaitTime()>maxWait){\r\n maxWait = servedCustomers.get(i).getwaitTime();\r\n }\r\n }\r\n return maxWait;\r\n }", "com.google.protobuf.Duration getMaximumBackoff();", "private int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return Integer.MAX_VALUE;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }", "public int getMaxFreezeTicks ( ) {\n\t\treturn extract ( handle -> handle.getMaxFreezeTicks ( ) );\n\t}", "int getMaximumDelay();", "public int getEleMaxTimeOut(){\r\n\t\t String temp= rb.getProperty(\"eleMaxTimeOut\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "int getMaxConcurrent();", "int getAbsoluteMaximumDelay();", "String getMaximumRedeliveryDelay();", "public long getMaxPoolTime()\n {\n if (_maxPoolTime > Long.MAX_VALUE / 2)\n return -1;\n else\n return _maxPoolTime;\n }", "public int getMaxTasksPerNode() {\n return maxTasksPerNode;\n }", "public Integer getThreadPoolBlockingQueueSize() {\n String tc = getConfig().getProperty(THREAD_POOL_BLOCKING_QUEUE_SIZE).getValue();\n Integer ret = new Integer(DEFAULT_THREAD_POOL_BLOCKING_QUEUE_SIZE);\n if (tc != null){\n try {\n ret = Integer.valueOf(tc);\n } catch (Exception ex){\n ret = new Integer(DEFAULT_THREAD_POOL_BLOCKING_QUEUE_SIZE);\n }\n }\n return ret;\n }", "public long getNextTime() {\r\n if (super.getNextTime() == 0) {\r\n return 0;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n if (!((LockFreeTaskQueueCore) obj).isEmpty()) {\r\n return 0;\r\n }\r\n } else if (obj == EventLoop_commonKt.CLOSED_EMPTY) {\r\n return LongCompanionObject.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null) {\r\n DelayedTask delayedTask = (DelayedTask) delayedTaskQueue.peek();\r\n if (delayedTask != null) {\r\n long j = delayedTask.nanoTime;\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n return RangesKt.coerceAtLeast(j - (timeSource != null ? timeSource.nanoTime() : System.nanoTime()), 0);\r\n }\r\n }\r\n return LongCompanionObject.MAX_VALUE;\r\n }", "public int getTotalWait() {\n return totalWait;\n }", "public Integer getMaxTimerDrivenThreads() {\n return maxTimerDrivenThreads;\n }", "public static int totalWait(Queue Storage, int m){\n\t\tint wait = 0;\n\t\tfor(int i = 0; i<m; i++){\n\t\t\tJob temp = (Job)Storage.dequeue();\n\t\t\twait += temp.getWaitTime();\n\t\t\tStorage.enqueue(temp);\n\t\t}\n\t\treturn wait;\n\t}", "public long getMaximumRetryWaitTime() {\r\n return configuration.getMaximumRetryWaitTime();\r\n }", "public int getMaxRelativeTimeoutMillis(AsyncOperation op);", "public int maxWaitTime(int[][] job , int size) {\n\t\tcheckError(job, size);\n\t\tint maxWait = 0;\n\t\tint[] waitArray = waitTime(job, size);\n\t\tfor(int i=0; i<size; i++) {\n\t\t\tif(maxWait < waitArray[i]) {\n\t\t\t\tmaxWait = waitArray[i];\n\t\t\t}\n\t\t}\n\t\treturn maxWait;\n\t}", "public int getMaxRunTime() {\n return maxRunTime;\n }", "public int getMaxTime() { return _maxTime; }", "Integer backlogCapacity();", "final int getQueueSize() {\n // suppress momentarily negative values\n return Math.max(0, sp - base);\n }", "public Integer getMaxTime() {\n return maxTime;\n }", "public int getWaitedTime() {\n\t\treturn this.waitedTime;\n\t}", "protected int maxTimeout() { return 15*1000*1000; }", "public Long getMaxDelayTime() {\n return this.MaxDelayTime;\n }", "long getExcutorTasksInWorkQueueCount();", "int getQueueSize();", "@Override\n public int getMaxJobsPerAcquisition() {\n return myMaxJobsPerAcquisition;\n }", "public int queueSize() {\n return executor.getQueue().size();\n }", "int getWaitTime();", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "public int getWaitTime()\n\t{\n\t\treturn mMessage.getInt( B1_WAIT_TIME );\n\t}", "public int getTotalWaitTime() {\n return totalWaitTime;\n }", "int getExecutorMaximumPoolSize();", "com.google.protobuf.DurationOrBuilder getMaximumBackoffOrBuilder();", "TimeResource maxDuration();", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "public int getWaitlistSize(){\n\t\treturn waitlistSize;\n\t}", "int getMaximumPoolSize();", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "int longestBreaktime(int waitTime, QNode temp) {\r\n\t \t\r\n\t \tif (this.front.wait_time==0) {\r\n\t \t\tint eachBreak = this.front.arrival_time- temp.service_timeEnding;\r\n\t \t\tbreaktime+= eachBreak;\r\n\t \t\tif (longest < eachBreak) {\r\n\t \t\t\tlongest= eachBreak;\r\n\t \t\t}\r\n\t \t\treturn breaktime;\r\n\t \t}\r\n\t \t\r\n\t\t\treturn breaktime;\r\n\t }", "static public int getMaxAsyncPollingRetries() {\n return maxAsyncPollingRetries;\n }", "int getMaxPoolSize();", "public long getQueueSize(){\n return queue.size();\n }", "public int getMaxFireTicks ( ) {\n\t\treturn invokeSafe ( \"getMaxFireTicks\" );\n\t}", "int getExecutorLargestPoolSize();", "public long getRemainingTime() {\n return (maxTime_ * 1000L)\n - (System.currentTimeMillis() - startTime_);\n }", "public Integer maxMessages();", "DurationTracker timeSpentTaskWait();", "com.google.protobuf.Duration getSequenceMaximumDuration();", "public int getMaxRetries() {\n\t return maxRetries.get();\n\t}", "public Long getDispatchtimemax() {\r\n return dispatchtimemax;\r\n }", "public static int getWatcherWaitingTime() {\r\n return watcherWaitingTime.getValue(); \r\n }", "public int queue() \n { return waiting; }", "public int getwaitTime(){\r\n\t\t String temp=rb.getProperty(\"waitTime\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "public long getTimeLimit() {\n\t\treturn timeLimit;\n\t}", "private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "public int getIdleTime() {\n int[] processorFinishTimes = new int[AlgorithmConfig.getNumOfProcessors()];\n int[] processorWeights = new int[AlgorithmConfig.getNumOfProcessors()];\n int processor;\n // Find the end time and weight of each processor\n for (ScheduledTask task : this) {\n processor = task.getProcessorNum() - 1;\n if (task.getFinishTime() > processorFinishTimes[processor]) {\n processorFinishTimes[processor] = task.getFinishTime();\n }\n processorWeights[processor] += task.getNode().getWeight();\n }\n // Calculate the idle time\n int idleTime = 0;\n for (int i = 0; i < AlgorithmConfig.getNumOfProcessors(); i++) {\n idleTime += processorFinishTimes[i] - processorWeights[i];\n }\n\n return idleTime;\n }", "public Integer getMaxEventDrivenThreads() {\n return maxEventDrivenThreads;\n }", "public final int getMaxIterations()\r\n\t{\r\n\t\treturn maxIterations;\r\n\t}", "public int getTimeout() {\n return params.getTimeout() * 1000;\n }", "public double getMaxTimeDiff()\n\t{\n\t\treturn 0;\n\t}", "public int getMaxPoolSize() {\n return maxPoolSize;\n }", "public long readTimeToWait(long size, long limitTraffic, long maxTime, long now)\r\n/* 267: */ {\r\n/* 268:499 */ bytesRecvFlowControl(size);\r\n/* 269:500 */ if ((size == 0L) || (limitTraffic == 0L)) {\r\n/* 270:501 */ return 0L;\r\n/* 271: */ }\r\n/* 272:503 */ long lastTimeCheck = this.lastTime.get();\r\n/* 273:504 */ long sum = this.currentReadBytes.get();\r\n/* 274:505 */ long localReadingTime = this.readingTime;\r\n/* 275:506 */ long lastRB = this.lastReadBytes;\r\n/* 276:507 */ long interval = now - lastTimeCheck;\r\n/* 277:508 */ long pastDelay = Math.max(this.lastReadingTime - lastTimeCheck, 0L);\r\n/* 278:509 */ if (interval > 10L)\r\n/* 279: */ {\r\n/* 280:511 */ long time = sum * 1000L / limitTraffic - interval + pastDelay;\r\n/* 281:512 */ if (time > 10L)\r\n/* 282: */ {\r\n/* 283:513 */ if (logger.isDebugEnabled()) {\r\n/* 284:514 */ logger.debug(\"Time: \" + time + ':' + sum + ':' + interval + ':' + pastDelay);\r\n/* 285: */ }\r\n/* 286:516 */ if ((time > maxTime) && (now + time - localReadingTime > maxTime)) {\r\n/* 287:517 */ time = maxTime;\r\n/* 288: */ }\r\n/* 289:519 */ this.readingTime = Math.max(localReadingTime, now + time);\r\n/* 290:520 */ return time;\r\n/* 291: */ }\r\n/* 292:522 */ this.readingTime = Math.max(localReadingTime, now);\r\n/* 293:523 */ return 0L;\r\n/* 294: */ }\r\n/* 295:526 */ long lastsum = sum + lastRB;\r\n/* 296:527 */ long lastinterval = interval + this.checkInterval.get();\r\n/* 297:528 */ long time = lastsum * 1000L / limitTraffic - lastinterval + pastDelay;\r\n/* 298:529 */ if (time > 10L)\r\n/* 299: */ {\r\n/* 300:530 */ if (logger.isDebugEnabled()) {\r\n/* 301:531 */ logger.debug(\"Time: \" + time + ':' + lastsum + ':' + lastinterval + ':' + pastDelay);\r\n/* 302: */ }\r\n/* 303:533 */ if ((time > maxTime) && (now + time - localReadingTime > maxTime)) {\r\n/* 304:534 */ time = maxTime;\r\n/* 305: */ }\r\n/* 306:536 */ this.readingTime = Math.max(localReadingTime, now + time);\r\n/* 307:537 */ return time;\r\n/* 308: */ }\r\n/* 309:539 */ this.readingTime = Math.max(localReadingTime, now);\r\n/* 310:540 */ return 0L;\r\n/* 311: */ }", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "public int getBatchDownloadWaitTime()\n {\n return 1000; \n }", "public long getMaxActiveTime()\n {\n if (_maxActiveTime > Long.MAX_VALUE / 2)\n return -1;\n else\n return _maxActiveTime;\n }", "public int getTimeout() {\n\t\treturn (Integer)getObject(\"timeout\");\n\t}", "public static long getMaximumResponseTime() {\n return (long) maxResponseTime;\n }", "protected abstract long waitOnQueue();", "public static int getShutdownSignalWaitTime() {\r\n return shutdownEventWaitingTime.getValue();\r\n }", "java.lang.String getWaitTime();", "public Long getMaxConcurrentConnection() {\n return this.MaxConcurrentConnection;\n }", "public int getQueueSize() {\r\n\t\treturn this.queue.size();\r\n\t}", "public Integer getAcquireTimeoutMillis() {\n return pool.getAcquireTimeoutMillis();\n }", "int getMaxTicksLimit();", "public long getRunMaxMillis()\n {\n return 0L;\n }", "@Override\n\tpublic int getMaxThreads() {\n\t\treturn 10;\n\t}", "public int getMaxLagFirstWaitTime() {\n\t\treturn maxLagFirstWaitTime;\n\t}", "private long calculateTimeToWait(int min, int max, long totalRunningTime)\n {\n double randomNumber = Math.random();\n\n if (randomNumber < 0.003)\n return Random.nextInt(60523, 127443);\n\n if (randomNumber < 0.05)\n return Random.nextInt(2519, 28111);\n\n long waitTime = (long) Random.nextInt(min, max);\n return (long) Math.floor(waitTime * (1 / (1 - (totalRunningTime / FIVE_HOURS_MILLIS))));\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int minimumWaitingTime(int[] queries) {\n\t\tArrays.sort(queries);\n\t\t\n\t\tint answer = 0;\n\t\tfor(int i=0; i<queries.length-1; i++){\n\t\t\tint sum = queries[i]*(queries.length-1-i);\n\t\t\tanswer += sum;\n\t\t}\n return answer;\n }", "public Double getLargestReceiveSuccessRequestThroughput()\r\n {\r\n return largestReceiveSuccessRequestThroughput;\r\n }", "public int getMaxAttempts(AsyncOperation op);", "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "public String maximum(){\n\t\treturn queueArray[1][1];\n\t}", "public int getBlockingTimeout() {\n return this.blockingTimeout;\n }", "public int getOutgoingQueueSize();", "public int maxQ() {\r\n\t\treturn maxQ;\r\n\t}", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "static public int getMaxMigrationAsyncPollingRetries() {\n return maxMigrationAsyncPollingRetries;\n }", "public int getSize() {\n return tasks.size();\n }", "private void findWaitingTime(int wt[]) {\n\t\tint rt[] = new int[n];\r\n\t\t\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\trt[i] = processList.get(i).getBurstTime();\r\n\t\t}\r\n\t\t\r\n\t\tint completed = 0,t=0,minm = Integer.MAX_VALUE;\r\n\t\tint shortest = 0, finish_time;\r\n\t\t\r\n\t\tboolean check = false;\r\n\t\t\r\n\t\twhile(completed!=n) {\r\n\t\t\t// find process with min rmaining time\r\n\t\t\tfor(int i=0; i<n ;i++) {\r\n\t\t\t\tif (processList.get(i).getArrivalTime()<=t && rt[i]<minm && rt[i]>0) {\r\n\t\t\t\t\tminm = rt[i];\r\n\t\t\t\t\tshortest = i;\r\n\t\t\t\t\tcheck = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(check == false) {\r\n\t\t\t\tt++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trt[shortest]--;\r\n\t\t\t\r\n\t\t\tif (minm == 0) {\r\n\t\t\t\tminm = Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (rt[shortest]==0) {\r\n\t\t\t\tcompleted++;\r\n\t\t\t\tcheck=false;\r\n\t\t\t\t\r\n\t\t\t\tfinish_time = t+1;\r\n\t\t\t\t\r\n\t\t\t\twt[shortest] = finish_time - processList.get(shortest).getBurstTime() - processList.get(shortest).getArrivalTime();\r\n\t\t\t\t\r\n\t\t\t\tif (wt[shortest]<0) {\r\n\t\t\t\t\twt[shortest] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tt++;\r\n\t\t}\r\n\t}", "public int getMaxPartitionsRunInParallel() {\n return maxThreads;\n }" ]
[ "0.76737267", "0.7193867", "0.7076993", "0.67624915", "0.676014", "0.66067976", "0.65725976", "0.6562581", "0.6534953", "0.6527362", "0.64993405", "0.6483412", "0.6475739", "0.64585906", "0.64473945", "0.6438808", "0.6434295", "0.6399498", "0.6382412", "0.6357799", "0.62866896", "0.6286118", "0.62671465", "0.6239114", "0.6238771", "0.6232237", "0.62210155", "0.62067294", "0.62059677", "0.6204161", "0.6198637", "0.6197425", "0.61891544", "0.61488724", "0.6138409", "0.6110029", "0.6101444", "0.60984784", "0.6082919", "0.607858", "0.6078124", "0.60717165", "0.6052281", "0.6048777", "0.604334", "0.6039898", "0.6037953", "0.60351694", "0.6021178", "0.60149944", "0.60117835", "0.6008041", "0.6007515", "0.6006863", "0.59456664", "0.59450555", "0.5943084", "0.5934406", "0.5929769", "0.59275514", "0.59123737", "0.5903216", "0.58832645", "0.58813316", "0.58769417", "0.58619016", "0.58573246", "0.584684", "0.5843308", "0.5839358", "0.58382416", "0.5835397", "0.5830202", "0.5827432", "0.5826949", "0.58200765", "0.57978433", "0.5791414", "0.579039", "0.5784205", "0.5774911", "0.57683957", "0.57611364", "0.5751775", "0.575169", "0.574813", "0.574813", "0.574008", "0.57390964", "0.5733382", "0.5732265", "0.57265204", "0.5720479", "0.5715302", "0.5715266", "0.5715226", "0.57150346", "0.5699408", "0.5694492", "0.5688495" ]
0.77897435
0
[HISTORICAL NOTE] In the past, tasks executed by the master service would automatically be notified of acks if they implemented the ClusterStateAckListener interface (the interface formerly known as AckedClusterStateTaskListener). This implicit behaviour was a little troublesome and was removed in favour of having the executor explicitly register an ack listener (where necessary) for each task it successfully executes. Making this change carried the risk that someone might implement a new task in the future which relied on the old implicit behaviour based on the interfaces that the task implements instead of the explicit behaviour in the executor. We protect against this with some weirdlooking assertions in the success() methods below which insist that acklistening tasks register themselves as their own ack listener. If you want to supply a different ack listener then you must remove the ClusterStateAckListener interface from the task to make it clear that the task itself is not expecting to be notified of acks. Note that the old implicit behaviour lives on in the unbatched() executor so that it can correctly execute either a ClusterStateUpdateTask or an AckedClusterStateUpdateTask.
@Override public void success(Runnable onPublicationSuccess) { assert getTask() instanceof ClusterStateAckListener == false // see [HISTORICAL NOTE] above : "tasks that implement ClusterStateAckListener must explicitly supply themselves as the ack listener"; assert incomplete(); this.onPublicationSuccess = Objects.requireNonNull(onPublicationSuccess); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected boolean shouldAck() {\n return true;\n }", "boolean needsAck() { return true; }", "@SuppressWarnings(\"SleepWhileInLoop\")\n @Override\n public void operationStateChanged(TaskState newState,\n TaskEvent event, String... args) {\n if (newState == TaskState.RUNNING) {\n support.setServerState(ServerState.STARTING);\n }\n if (newState == TaskState.FAILED) {\n fireOperationStateChanged(newState, event,\n instanceName, args);\n support.setServerState(ServerState.STOPPED);\n //support.refresh();\n } else if (args != null && newState == TaskState.COMPLETED) {\n for (String message : args) {\n if (message.matches(\"[sg]et\\\\?.*\\\\=configs\\\\..*\")) {\n return;\n }\n }\n long startTime = System.currentTimeMillis();\n TaskState state = TaskState.RUNNING;\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n // no op\n }\n while (TaskState.RUNNING == state && System.currentTimeMillis() - start < START_TIMEOUT) {\n // Send the 'completed' event and return when the server is running\n boolean httpLive = PayaraState.isOnline(instance); //CommonServerSupport.isRunning(host, port,instance.getProperty(PayaraModule.DISPLAY_NAME_ATTR));\n\n // Sleep for a little so that we do not make our checks too often\n //\n // Doing this before we check httpAlive also prevents us from\n // pinging the server too quickly after the ports go live.\n //\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // no op\n }\n\n if (httpLive) {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n // no op\n }\n state = TaskState.COMPLETED;\n }\n }\n if (state == TaskState.COMPLETED) { //support.isReady(false, 120, TimeUnit.SECONDS)) {\n support.setServerState(ServerState.RUNNING);\n } else {\n support.setServerState(ServerState.STOPPED);\n }\n }\n }", "public interface OnActionFinishedListener<TResult> {\n /* will be called for each Action (which in a Task action chain by continuation) finished its execution\n */\n void Finished(Task task, Action<TResult> lastFinishedAction);\n}", "public abstract boolean casListeners(AbstractFuture<?> abstractFuture, Listener listener, Listener listener2);", "@Test\n @SuppressWarnings(\"unchecked\")\n void state_bundle_not_considered_converged_until_activation_acked_by_all_distributors() {\n var f = StateActivationFixture.withTwoPhaseEnabled();\n var cf = f.cf;\n\n f.ackStateBundleFromBothDistributors();\n\n final var d0ActivateWaiter = ArgumentCaptor.forClass(Communicator.Waiter.class);\n final var d1ActivateWaiter = ArgumentCaptor.forClass(Communicator.Waiter.class);\n\n clusterNodeInfos(cf.cluster(), Node.ofDistributor(0), Node.ofDistributor(1)).forEach(nodeInfo -> {\n verify(f.mockCommunicator).activateClusterStateVersion(eq(123), eq(nodeInfo),\n (nodeInfo.getNodeIndex() == 0 ? d0ActivateWaiter : d1ActivateWaiter).capture());\n });\n\n respondToActivateClusterStateVersion(cf.cluster.getNodeInfo(Node.ofDistributor(0)),\n f.stateBundle, d0ActivateWaiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n assertNull(f.broadcaster.getLastClusterStateBundleConverged()); // Not yet converged\n\n respondToActivateClusterStateVersion(cf.cluster.getNodeInfo(Node.ofDistributor(1)),\n f.stateBundle, d1ActivateWaiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n // Finally, all distributors have ACKed the version! State is marked as converged.\n assertEquals(f.stateBundle, f.broadcaster.getLastClusterStateBundleConverged());\n }", "public void ack() {\n }", "@Override\n public void onNewClusterState(ClusterState state) {\n transportService.sendRequest(\n clusterService.localNode(),\n transportReplicaAction,\n replicaRequest,\n new ActionListenerResponseHandler<>(onCompletionListener, ReplicaResponse::new)\n );\n }", "@Override\n protected void succeeded() {\n eventService.publish(new TaskEndedEvent(this));\n\n }", "boolean ack( long revision );", "public interface TaskCallback extends RunningTaskCallback {\r\n\r\n\r\n /**\r\n * Calling when the task is preparing to start .\r\n */\r\n void onTaskStart();\r\n\r\n @Override\r\n void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator);\r\n\r\n /**\r\n * Calling while the task is completed.\r\n *\r\n * @param taskResult TaskResult bean\r\n */\r\n void onTaskCompleted(TaskResult taskResult);\r\n}", "boolean getAck();", "public interface ITaskThreadStateChangedListener {\r\n void TaskThreadStateChanged(TaskThreadState previousState, TaskThreadState newState);\r\n}", "boolean getLockstepAck();", "public interface TaskAction {\n\n /**\n * This method will define an asynchronous action to take.\n * The parameter is a simpler interface of Task that only allows progress reporting, to encapsulate actions and\n * prevent them from seeing or modifying the task hierarchy that triggers and manages them.\n */\n public void action (ProgressListener progressListener) throws Exception;\n\n}", "void onServiceSuccess(MasterResponse masterResponse, int taskCode);", "@Test\n @SuppressWarnings(\"unchecked\")\n void activation_convergence_considers_actual_version_returned_from_node() {\n var f = StateActivationFixture.withTwoPhaseEnabled();\n var cf = f.cf;\n\n f.ackStateBundleFromBothDistributors();\n\n final var d0ActivateWaiter = ArgumentCaptor.forClass(Communicator.Waiter.class);\n final var d1ActivateWaiter = ArgumentCaptor.forClass(Communicator.Waiter.class);\n\n clusterNodeInfos(cf.cluster(), Node.ofDistributor(0), Node.ofDistributor(1)).forEach(nodeInfo -> {\n verify(f.mockCommunicator).activateClusterStateVersion(eq(123), eq(nodeInfo),\n (nodeInfo.getNodeIndex() == 0 ? d0ActivateWaiter : d1ActivateWaiter).capture());\n });\n\n respondToActivateClusterStateVersion(cf.cluster.getNodeInfo(Node.ofDistributor(0)),\n f.stateBundle, d0ActivateWaiter.getValue());\n // Distributor 1 reports higher actual version, should not cause this version to be\n // considered converged since it's not an exact version match.\n respondToActivateClusterStateVersion(cf.cluster.getNodeInfo(Node.ofDistributor(1)),\n f.stateBundle, 124, d1ActivateWaiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n assertNull(f.broadcaster.getLastClusterStateBundleConverged());\n }", "boolean hasAck();", "public interface CustomTaskInterceptor {\n\n /**\n * This interface implementation should\n * provide results of operations mentioned above.\n */\n interface OnResultListener {\n void onFinished();\n }\n\n void doSomeTask(OnResultListener listener);\n}", "@Test\n void activation_not_sent_if_deferred_activation_is_disabled_in_state_bundle() {\n var f = StateActivationFixture.withTwoPhaseDisabled();\n var cf = f.cf;\n\n f.ackStateBundleFromBothDistributors();\n\n // At this point the cluster state shall be considered converged.\n assertEquals(f.stateBundle, f.broadcaster.getLastClusterStateBundleConverged());\n\n // No activations shall have been sent.\n clusterNodeInfos(cf.cluster(), Node.ofDistributor(0), Node.ofDistributor(1)).forEach(nodeInfo -> {\n verify(f.mockCommunicator, times(0)).activateClusterStateVersion(eq(123), eq(nodeInfo), any());\n });\n }", "@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}", "@Test\n public void testLateRootTask() throws InterruptedException {\n final String rootTaskId = \"rootTaskId\";\n final String[] childTaskIds = new String[]{\"childTaskId1\", \"childTaskId2\", \"childTaskId3\"};\n final AtomicInteger numMsgs = new AtomicInteger(0);\n\n final EStage<GroupCommunicationMessage> senderStage =\n new SyncStage<>(new EventHandler<GroupCommunicationMessage>() {\n @Override\n public void onNext(final GroupCommunicationMessage msg) {\n numMsgs.getAndIncrement();\n }\n });\n\n final CommunicationGroupDriverImpl communicationGroupDriver = new CommunicationGroupDriverImpl(\n GroupName.class, new AvroConfigurationSerializer(), senderStage,\n new BroadcastingEventHandler<RunningTask>(), new BroadcastingEventHandler<FailedTask>(),\n new BroadcastingEventHandler<FailedEvaluator>(), new BroadcastingEventHandler<GroupCommunicationMessage>(),\n \"DriverId\", 4, 2);\n\n communicationGroupDriver\n .addBroadcast(BroadcastOperatorName.class,\n BroadcastOperatorSpec.newBuilder().setSenderId(rootTaskId).build())\n .addReduce(ReduceOperatorName.class,\n ReduceOperatorSpec.newBuilder().setReceiverId(rootTaskId).build());\n\n final ExecutorService pool = Executors.newFixedThreadPool(4);\n final CountDownLatch countDownLatch = new CountDownLatch(4);\n\n // first add child tasks and start them up\n for (int index = 0; index < 3; index++) {\n final String childId = childTaskIds[index];\n pool.submit(new Runnable() {\n @Override\n public void run() {\n final Configuration childTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, childId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n communicationGroupDriver.addTask(childTaskConf);\n communicationGroupDriver.runTask(childId);\n countDownLatch.countDown();\n }\n });\n }\n\n // next add the root task\n pool.submit(new Runnable() {\n @Override\n public void run() {\n try {\n // purposely delay the addition of the root task\n Thread.sleep(3000);\n } catch (final InterruptedException e) {\n throw new RuntimeException(e);\n }\n final Configuration rootTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, rootTaskId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n\n communicationGroupDriver.addTask(rootTaskConf);\n communicationGroupDriver.runTask(rootTaskId);\n countDownLatch.countDown();\n }\n });\n\n pool.shutdown();\n final boolean allThreadsFinished = countDownLatch.await(10, TimeUnit.SECONDS);\n assertTrue(\"all threads finished\", allThreadsFinished);\n\n // 3 connections between 4 tasks\n // 2 messages per connection\n // 2 operations (broadcast & reduce)\n // this gives us a total of 3*2*2 = 12 messages\n assertEquals(\"number of messages sent from driver\", 12, numMsgs.get());\n\n }", "public interface TaskListener {\n void onFinished(boolean result);\n }", "void handleRebalanceCompleted(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) throws Exception;", "void onTaskCompleted(TaskResult taskResult);", "public interface _11_shutdown_on_success {\n static void main(String[] args) throws InterruptedException, ExecutionException {\n try (var scope = new StructuredTaskScope.ShutdownOnSuccess<Integer>()) {\n scope.fork(() -> {\n Thread.sleep(1_000);\n return 1;\n });\n scope.fork(() -> {\n Thread.sleep(42);\n return 2;\n });\n var result = scope.join().result();\n System.out.println(result);\n }\n }\n}", "@Override\n\t\tboolean needsAck() {\n\t\t\treturn byteChunks.length > 0; // don't retry empty ack\n\t\t}", "public abstract Task markAsDone();", "@Test\n public void testNamenodeStateOverride() throws Exception {\n String ns = \"ns0\";\n String nn = \"nn0\";\n MembershipState report = createRegistration(\n ns, nn, ROUTERS[1], FederationNamenodeServiceState.STANDBY);\n assertTrue(namenodeHeartbeat(report));\n\n // Load data into cache and calculate quorum\n assertTrue(getStateStore().loadCache(MembershipStore.class, true));\n\n MembershipState existingState = getNamenodeRegistration(ns, nn);\n assertEquals(\n FederationNamenodeServiceState.STANDBY, existingState.getState());\n\n // Override cache\n UpdateNamenodeRegistrationRequest request =\n UpdateNamenodeRegistrationRequest.newInstance(\n ns, nn, FederationNamenodeServiceState.ACTIVE);\n assertTrue(membershipStore.updateNamenodeRegistration(request).getResult());\n\n MembershipState newState = getNamenodeRegistration(ns, nn);\n assertEquals(FederationNamenodeServiceState.ACTIVE, newState.getState());\n\n // Override cache\n UpdateNamenodeRegistrationRequest request1 =\n UpdateNamenodeRegistrationRequest.newInstance(ns, nn,\n FederationNamenodeServiceState.OBSERVER);\n assertTrue(\n membershipStore.updateNamenodeRegistration(request1).getResult());\n\n MembershipState newState1 = getNamenodeRegistration(ns, nn);\n assertEquals(FederationNamenodeServiceState.OBSERVER, newState1.getState());\n }", "void ackResult(boolean resultMatch);", "ClusterState state() {\n return clusterStateSupplier.get();\n }", "public boolean ack() {\n return ack;\n }", "public interface IHasSuccessState {\r\n /**\r\n * Returns whether the operation completed successfully.\r\n * @return true if the the operation was successful, false otherwise\r\n */\r\n boolean isSuccess();\r\n}", "private static void execute(EventExecutor executor, Runnable task)\r\n/* 592: */ {\r\n/* 593: */ try\r\n/* 594: */ {\r\n/* 595:670 */ executor.execute(task);\r\n/* 596: */ }\r\n/* 597: */ catch (Throwable t)\r\n/* 598: */ {\r\n/* 599:672 */ rejectedExecutionLogger.error(\"Failed to submit a listener notification task. Event loop shut down?\", t);\r\n/* 600: */ }\r\n/* 601: */ }", "void success(ServiceExecutionEvent e) {\n }", "private void maybeOnSucceededOnExecutor() {\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n if (!(mWriteState == State.WRITING_DONE && mReadState == State.READING_DONE)) {\n return;\n }\n mReadState = mWriteState = State.SUCCESS;\n // Destroy native stream first, so UrlRequestContext could be shut\n // down from the listener.\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onSucceeded(CronetBidirectionalStream.this, mResponseInfo);\n } catch (Exception e) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in onSucceeded method\", e);\n }\n mInflightDoneCallbackCount.decrement();\n }", "private void handleStatusUpdate(AppEvent event)\n {\n if( ( !event.getTask().hasStatus() )\n || ( !event.getTask().getStatus().getState().equals( event.getTaskStatus().getState() ))\n || ( this.app.getState(event.getTask().getNodeId()).equals(SchedulerNode.State.REREGISTERED) ))\n {\n //do info update first in case user issues a AppDriver call that depends on it\n this.updateTaskInfo(event.getTask(), event.getTaskStatus());\n\n SchedulerNode.State state = this.app.getState(event.getTask().getNodeId());\n\n switch (event.getTaskStatus().getState())\n {\n //case TASK_DROPPED:\n case TASK_ERROR:\n case TASK_FAILED:\n //case TASK_GONE:\n case TASK_LOST:\n //case TASK_UNKNOWN:\n // case TASK_GONE_BY_OPERATOR:\n //case TASK_UNREACHABLE:\n if( !state.equals(SchedulerNode.State.FAILED)\n && !state.equals(SchedulerNode.State.FINISHED)\n && !state.equals(SchedulerNode.State.KILLED)) {\n this.app.nodeFailed(this, event.getTask().getNodeId());\n }\n break;\n case TASK_FINISHED:\n if( !state.equals(SchedulerNode.State.FAILED)\n && !state.equals(SchedulerNode.State.FINISHED)\n && !state.equals(SchedulerNode.State.KILLED)) {\n this.app.nodeFinished(this, event.getTask().getNodeId());\n }\n break;\n case TASK_RUNNING:\n this.app.nodeRunning(this, event.getTask().toBuilder().setStatus(event.getTaskStatus()).build());\n break;\n case TASK_KILLED:\n if( !state.equals(SchedulerNode.State.FAILED)\n && !state.equals(SchedulerNode.State.FINISHED)\n && !state.equals(SchedulerNode.State.KILLED)) {\n this.app.nodeKilled(this, event.getTask().getNodeId());\n }\n break;\n default:\n }\n }\n\n this.updateTaskInfo(event.getTask(), event.getTaskStatus());\n }", "@Test\n public void testLateRootAndChildTask() throws InterruptedException {\n final String rootTaskId = \"rootTaskId\";\n final String[] childTaskIds = new String[]{\"childTaskId1\", \"childTaskId2\", \"childTaskId3\", \"childTaskId4\",\n \"childTaskId5\", \"childTaskId6\", \"childTaskId7\"};\n final AtomicInteger numMsgs = new AtomicInteger(0);\n\n final EStage<GroupCommunicationMessage> senderStage =\n new SyncStage<>(new EventHandler<GroupCommunicationMessage>() {\n @Override\n public void onNext(final GroupCommunicationMessage msg) {\n numMsgs.getAndIncrement();\n }\n });\n\n final CommunicationGroupDriverImpl communicationGroupDriver = new CommunicationGroupDriverImpl(\n GroupName.class, new AvroConfigurationSerializer(), senderStage,\n new BroadcastingEventHandler<RunningTask>(), new BroadcastingEventHandler<FailedTask>(),\n new BroadcastingEventHandler<FailedEvaluator>(), new BroadcastingEventHandler<GroupCommunicationMessage>(),\n \"DriverId\", 8, 2);\n\n communicationGroupDriver\n .addBroadcast(BroadcastOperatorName.class,\n BroadcastOperatorSpec.newBuilder().setSenderId(rootTaskId).build())\n .addReduce(ReduceOperatorName.class,\n ReduceOperatorSpec.newBuilder().setReceiverId(rootTaskId).build());\n\n final ExecutorService pool = Executors.newFixedThreadPool(8);\n final CountDownLatch countDownLatch = new CountDownLatch(8);\n\n // first add two child tasks and start them up\n for (int index = 0; index < 2; index++) {\n final String childId = childTaskIds[index];\n pool.submit(new Runnable() {\n @Override\n public void run() {\n final Configuration childTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, childId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n communicationGroupDriver.addTask(childTaskConf);\n communicationGroupDriver.runTask(childId);\n countDownLatch.countDown();\n }\n });\n }\n\n // next add the root task\n pool.submit(new Runnable() {\n @Override\n public void run() {\n try {\n // purposely delay the addition of the root task\n Thread.sleep(3000);\n } catch (final InterruptedException e) {\n throw new RuntimeException(e);\n }\n final Configuration rootTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, rootTaskId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n\n communicationGroupDriver.addTask(rootTaskConf);\n communicationGroupDriver.runTask(rootTaskId);\n countDownLatch.countDown();\n }\n });\n\n // then add 5 child tasks and start them up\n for (int index = 2; index < 7; index++) {\n final String childId = childTaskIds[index];\n pool.submit(new Runnable() {\n @Override\n public void run() {\n try {\n // purposely delay the addition of the child task\n Thread.sleep(6000);\n } catch (final InterruptedException e) {\n throw new RuntimeException(e);\n }\n final Configuration childTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, childId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n communicationGroupDriver.addTask(childTaskConf);\n communicationGroupDriver.runTask(childId);\n countDownLatch.countDown();\n }\n });\n }\n\n pool.shutdown();\n final boolean allThreadsFinished = countDownLatch.await(10, TimeUnit.SECONDS);\n assertTrue(\"all threads finished\", allThreadsFinished);\n\n // 7 connections between 8 tasks\n // 2 messages per connection\n // 2 operations (broadcast & reduce)\n // this gives us a total of 7*2*2 = 28 messages\n assertEquals(\"number of messages sent from driver\", 28, numMsgs.get());\n\n }", "@Test\n @SuppressWarnings(\"unchecked\")\n void activation_not_sent_before_all_distributors_have_acked_state_bundle() {\n var f = StateActivationFixture.withTwoPhaseEnabled();\n var cf = f.cf;\n\n f.expectSetSystemStateInvocationsToBothDistributors();\n f.simulateBroadcastTick(cf, 123);\n\n // Respond from distributor 0, but not yet from distributor 1\n respondToSetClusterStateBundle(cf.cluster.getNodeInfo(Node.ofDistributor(0)), f.stateBundle, f.d0Waiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n // No activations should be sent yet\n cf.cluster().getNodeInfos().forEach(nodeInfo -> {\n verify(f.mockCommunicator, times(0)).activateClusterStateVersion(eq(123), eq(nodeInfo), any());\n });\n assertNull(f.broadcaster.getLastClusterStateBundleConverged());\n\n respondToSetClusterStateBundle(cf.cluster.getNodeInfo(Node.ofDistributor(1)), f.stateBundle, f.d1Waiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n // Activation should now be sent to _all_ nodes (distributor and storage)\n cf.cluster().getNodeInfos().forEach(nodeInfo -> {\n verify(f.mockCommunicator).activateClusterStateVersion(eq(123), eq(nodeInfo), any());\n });\n // But not converged yet, as activations have not been ACKed\n assertNull(f.broadcaster.getLastClusterStateBundleConverged());\n }", "public interface ClusterControl extends ClusterMetrics {\n\n\t/** \n\t * Used by the master to determine if he is still the master.\n\t * Updates the cluster status last processed timestamp. Cancels\n\t * any usurp actions.\n\t * @param heartBeat true if this message is a heartbeat\n\t */\n\tpublic boolean verifyStatus(boolean heartbeat);\n\t\n\t/**\n\t * Used to send a heartbeat message when no traffic detected.\n\t * Should be configured to send a special message to the main\n\t * cluster thread so the lastProcessed timestamp will be \n\t * updated. \n\t */\n\tpublic void sendHeartbeat();\n\t\n\t/**\n\t * Called when the monitor detects the main thread is not \n\t * processing; stop the soInbound adapter so another instance\n\t * can take over.\n\t */\n\tpublic void stopInbound();\n\t\n\t/**\n\t * Called when a usurper successfully takes over the master\n\t * role; start the soInbound adapter.\n\t */\n\tpublic void startInbound();\n\n\t/**\n\t * Pause the application/instance - if this is a single-source\n\t * application, all instances will be paused; otherwise just\n\t * this instance will be paused.\n\t */\n\tpublic String pause();\n\t\n\t/**\n\t * Resume the application/instance - if this is a single-source\n\t * application, normal master election will occur (if the previous\n\t * master is available, it will most likely resume that role); \n\t * otherwise, just this instance is resumed.\n\t */\n\tpublic String resume();\n\t\n\t/**\n\t * Pause all (non-single-source) application instances. For single-\n\t * source applications, use {@link #pause()}.\n\t * @return\n\t */\n\tpublic String pauseAll();\n\t\n\t/**\n\t * Resume all (non-single-source) application instances. For single-\n\t * source applications, use {@link #resume()}.\n\t * @return\n\t */\n\tpublic String resumeAll();\n\t\n\t/**\n\t * Monitor the state of the master.\n\t */\n\tpublic void doMonitor();\n\n\t/**\n\t * @return the application id.\n\t */\n\tpublic String getApplicationId();\n\n\t/**\n\t * @return a string representing the current status of the application\n\t */\n\tpublic String obtainApplicationStatus();\n /**\n * \n */\n\tpublic int getMessageCount();\n}", "public interface TaskCompleted {\n\tvoid onTaskComplete(String response, String type);\n}", "protected abstract TaskNode verify();", "public interface OnTaskCompleted {\n void onTaskCompleted();\n}", "TaskStatus getStatus();", "private void delegateTasks() {\n logger.debug(\"task delegation started\");\n\n untilTasksAndThreadsAreAvailable:\n while (true) {\n Optional<Node> selectedNode;\n Optional<WorkerPoolTask> task = workerPool.pollTask();\n\n if (!task.isPresent()) {\n while (true) {\n State prevState = state.get();\n State nextState;\n if (prevState == DURING_DELEGATION) {\n // No more tasks and free threads appeared\n nextState = NO_DELEGATION;\n } else {\n //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION\n nextState = DURING_DELEGATION;\n }\n if (state.compareAndSet(prevState, nextState)) {\n logger.debug(\"changed from \" + prevState + \" to \" + nextState);\n if (prevState == DURING_DELEGATION) {\n return;\n } else {\n //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION\n continue untilTasksAndThreadsAreAvailable;\n }\n }\n logger.debug(\"state change missed in delegateTasks when task wasn't present\");\n }\n }\n\n synchronized (nodes) { // Synchronization with HeartBeat nodes.updateAfterHeartBeat method.\n selectedNode = nodes.drainThreadFromNodeHavingHighestPriority();\n if (!selectedNode.isPresent()) {\n workerPool.submitTask(task.get(), true);\n State nextState = AWAITING_FREE_THREADS;\n State prevState = state.getAndSet(nextState);\n logger.debug(\"changed from \" + prevState + \" to \" + nextState);\n return;\n }\n }\n\n if (!delegateTask(selectedNode.get(), task.get())) {\n //If delegation failed we release the thread to keep proper number of free threads up-to-date\n //If HeartBeat happened between draining a thread and returning it, this operation will take no effect\n //as we are working on invalidated version of node.\n nodes.returnThread(selectedNode.get());\n }\n }\n }", "public void handleCompletedContainer(TaskAttemptId attemptID);", "@Override\n public void onSuccess(final Void result) {\n cupState.getCurrentHeatCupTask().set(executor.submit(new HeatCupTask(input,\n futureResult)));\n }", "public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}", "public interface TaskCallback\n{\n void done();\n}", "public void handleAck() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\t\n\t\tint userCnt = users.size();\n\t\tSystem.out.println(\"handling ack in Server\");\n\t\twhile(CommitDecision.size() != 0){\n\t\t\tif(end - start >= 3000) {\n\t\t\t\tfor(String user: CommitDecision.keySet()) {\n\t\t\t\t\tSystem.out.println(\"resend ack to \"+ user+ \" for task \"+ filename);\n\t\t\t\t\tPL.sendMessage(CommitDecision.get(user));\n\t\t\t\t}\n\t\t\t\tstart = end;\n\t\t\t}else {\n\t\t\t\tMsg tmp = notYetAck.poll();\n\t\t\t\tif(tmp != null && CommitDecision.containsKey(tmp.user)) {\n\t\t\t\t\tCommitDecision.remove(tmp.user);\n\t\t\t\t\tSystem.out.println(tmp.user+\" 's ack has been received\");\n\t\t\t\t}\n\t\t\t\tend = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\n\t}", "@Test\n public void testScaleDownPersistent() throws Exception {\n List<CompletableFuture<Atomix>> futures = new ArrayList<>();\n futures.add(startAtomix(1, Arrays.asList(1, 2, 3), Profile.dataGrid()));\n futures.add(startAtomix(2, Arrays.asList(1, 2, 3), Profile.dataGrid()));\n futures.add(startAtomix(3, Arrays.asList(1, 2, 3), Profile.dataGrid()));\n Futures.allOf(futures).get(30, TimeUnit.SECONDS);\n AtomixTest.TestClusterMembershipEventListener eventListener1 = new AtomixTest.TestClusterMembershipEventListener();\n instances.get(0).getMembershipService().addListener(eventListener1);\n AtomixTest.TestClusterMembershipEventListener eventListener2 = new AtomixTest.TestClusterMembershipEventListener();\n instances.get(1).getMembershipService().addListener(eventListener2);\n AtomixTest.TestClusterMembershipEventListener eventListener3 = new AtomixTest.TestClusterMembershipEventListener();\n instances.get(2).getMembershipService().addListener(eventListener3);\n instances.get(0).stop().get(30, TimeUnit.SECONDS);\n Assert.assertEquals(REACHABILITY_CHANGED, eventListener2.event().type());\n Assert.assertEquals(MEMBER_REMOVED, eventListener2.event().type());\n Assert.assertEquals(2, instances.get(1).getMembershipService().getMembers().size());\n Assert.assertEquals(REACHABILITY_CHANGED, eventListener3.event().type());\n Assert.assertEquals(MEMBER_REMOVED, eventListener3.event().type());\n Assert.assertEquals(2, instances.get(2).getMembershipService().getMembers().size());\n instances.get(1).stop().get(30, TimeUnit.SECONDS);\n Assert.assertEquals(REACHABILITY_CHANGED, eventListener3.event().type());\n Assert.assertEquals(MEMBER_REMOVED, eventListener3.event().type());\n Assert.assertEquals(1, instances.get(2).getMembershipService().getMembers().size());\n instances.get(2).stop().get(30, TimeUnit.SECONDS);\n }", "void Finished(Task task, Action<TResult> lastFinishedAction);", "static void notifyListener0(Future future, GenericFutureListener l)\r\n/* 604: */ {\r\n/* 605: */ try\r\n/* 606: */ {\r\n/* 607:679 */ l.operationComplete(future);\r\n/* 608: */ }\r\n/* 609: */ catch (Throwable t)\r\n/* 610: */ {\r\n/* 611:681 */ if (logger.isWarnEnabled()) {\r\n/* 612:682 */ logger.warn(\"An exception was thrown by \" + l.getClass().getName() + \".operationComplete()\", t);\r\n/* 613: */ }\r\n/* 614: */ }\r\n/* 615: */ }", "@Override\n public void execute(final Task<T> task) {\n }", "public void updateTask() {}", "@Override\n public void operationComplete(Future<Void> future) throws Exception{\n if(!future.isSuccess()){\n olapFuture.fail(future.cause());\n olapFuture.signal();\n }\n }", "void onTaskComplete(T result);", "void onAckReceived(int source);", "public interface ASyncTaskListener {\n public void onThreadFinished(Object result);\n}", "public interface TaskDelegate {\n /*\n Notifies an activity of an async method's completion\n */\n public void taskCompletionResult(ArrayList<String> result);\n}", "@Test\n public void tryToExecuteTasksWhenAllLeasesAreAlreadyReserved() throws Exception {\n DateTime timeSlice = dateTimeService.getTimeSlice(now().minusMinutes(1), standardMinutes(1));\n String tenantId = \"test1\";\n String type1 = \"test1\";\n int interval = 5;\n int window = 15;\n int segment0 = 0;\n int segment1 = 1;\n int segmentOffset = 0;\n\n TaskExecutionHistory executionHistory = new TaskExecutionHistory();\n TaskType taskType1 = new TaskType().setName(type1).setSegments(5).setSegmentOffsets(1);\n\n session.execute(queries.createTask.bind(type1, tenantId, timeSlice.toDate(), segment0, \"test1.metric1.5min\",\n ImmutableSet.of(\"test1.metric1\"), interval, window));\n session.execute(queries.createTask.bind(type1, tenantId, timeSlice.toDate(), segment1, \"test1.metric2.5min\",\n ImmutableSet.of(\"test1.metric2\"), interval, window));\n session.execute(queries.createLease.bind(timeSlice.toDate(), type1, segmentOffset));\n\n String owner = \"host2\";\n Lease lease = new Lease(timeSlice, type1, segmentOffset, owner, false);\n boolean acquired = leaseService.acquire(lease).toBlocking().first();\n assertTrue(acquired, \"Should have acquired lease\");\n\n LeaseService leaseService = new LeaseService(rxSession, queries);\n TaskServiceImpl taskService = new TaskServiceImpl(rxSession, queries, leaseService, singletonList(taskType1));\n taskService.subscribe(taskType1, task -> executionHistory.add(task.getTarget()));\n\n Thread t1 = new Thread(() -> taskService.executeTasks(timeSlice));\n t1.start();\n\n AtomicReference<Exception> executionErrorRef = new AtomicReference<>();\n Runnable executeTasks = () -> {\n try {\n Thread.sleep(1000);\n session.execute(queries.deleteTasks.bind(lease.getTaskType(), lease.getTimeSlice().toDate(), segment0));\n session.execute(queries.deleteTasks.bind(lease.getTaskType(), lease.getTimeSlice().toDate(), segment1));\n leaseService.finish(lease).toBlocking().first();\n } catch (Exception e) {\n executionErrorRef.set(e);\n }\n };\n Thread t2 = new Thread(executeTasks);\n t2.start();\n\n t2.join(10000);\n t1.join(10000);\n\n assertNull(executionErrorRef.get(), \"Did not expect an exception to be thrown from other client, but \" +\n \"got: \" + executionErrorRef.get());\n\n assertTrue(executionHistory.getExecutedTasks().isEmpty(), \"Did not expect this task service to execute any \" +\n \"tasks but it executed \" + executionHistory.getExecutedTasks());\n assertTasksPartitionDeleted(type1, timeSlice, segment0);\n assertTasksPartitionDeleted(type1, timeSlice, segment1);\n assertLeasePartitionDeleted(timeSlice);\n\n // We do not need to verify that tasks are rescheduled or that new leases are\n // created since the \"other\" clients would be doing that.\n }", "AsyncFuture<Void> becameLeader();", "void onTaskCompleted(T t, boolean succeed) {\n metrics.markCompletion(t, succeed);\n for (CompletableTask.Listener<T> listener : listeners) {\n listener.onComplete(t, succeed);\n }\n }", "public interface OnAsyncTaskCompleted {\n void onTaskCompleted(boolean status);\n}", "protected void processBeforeDelegationToMaster(Request request, ClusterState state) {\n\n\t}", "@Override\r\n\tpublic void PostExecute(TaskConfig config){\n\t}", "@Test(groups = {AllTestSuit.test_group_runner, AllTestSuit.test_group_cluster})\r\n\tpublic void testRunOnClusterAsync() {\r\n\t\tassertFalse(SysPrefs.isWindows,\r\n\t\t\t\t\"Cluster execution can only be in unix environment\");\r\n\t\ttry {\r\n\t\t\tConfiguredExecutable<AACon> confAAcon = Configurator\r\n\t\t\t\t\t.configureExecutable(aacon, Executable.ExecProvider.Cluster);\r\n\t\t\tAsyncExecutor aengine = Configurator.getAsyncEngine(confAAcon);\r\n\t\t\tString jobId = aengine.submitJob(confAAcon);\r\n\t\t\tassertNotNull(jobId, \"Runner is NULL\");\r\n\t\t\t// let drmaa to start\r\n\t\t\tThread.sleep(500);\r\n\t\t\tJobStatus status = aengine.getJobStatus(jobId);\r\n\t\t\twhile (status != JobStatus.FINISHED) {\r\n\t\t\t\tSystem.out.println(\"Job Status: \" + status);\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tstatus = aengine.getJobStatus(jobId);\r\n\t\t\t\tConfiguredExecutable<AACon> result = (ConfiguredExecutable<AACon>) aengine\r\n\t\t\t\t\t\t.getResults(jobId);\r\n\t\t\t\tassertNotNull(result);\r\n\t\t\t\tSystem.out.println(\"RES:\" + result);\r\n\t\t\t\t// Some times the job could be removed from the cluster\r\n\t\t\t\t// accounting\r\n\t\t\t\t// before it has been reported to finish. Make sure\r\n\t\t\t\t// to stop waiting in such case\r\n\t\t\t\tif (status == JobStatus.UNDEFINED) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (JobSubmissionException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail(\"DrmaaException caught:\" + e.getMessage());\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail(e.getMessage());\r\n\t\t} catch (ResultNotAvailableException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\t}", "messages.Ackinterface.AckInterface getAck();", "@Override\r\n public void tasksFinished()\r\n {\n }", "private void handleLostExecutor(Protos.SchedulerTask task)\n {\n SchedulerNode.State state = this.app.getState(task.getNodeId());\n\n //dont deliver the failure if it was already sent in some form\n if( state.equals(SchedulerNode.State.FAILED)\n || state.equals(SchedulerNode.State.FINISHED)\n || state.equals(SchedulerNode.State.KILLED))\n {\n return;\n }\n\n //this.app.nodeFailed(this, task.getNodeId());\n }", "public interface TaskDelegate {\n public void taskComplete(Object object);\n}", "public interface TaskLoadedCallback {\n void onTaskDone(Object... values);\n}", "public interface TaskLoadedCallback {\n void onTaskDone(Object... values);\n}", "public interface CallbackTask<R>\n{\n\n R execute() throws Exception;\n\n void onBack(R r);\n\n void onException(Throwable t);\n}", "public interface Task<T> extends Callable<T> {\n\n String getTaskName();\n void onComplete(T result);\n\n}", "@Override\n\tpublic void onFinal(Task task) {\n\n\t}", "@Override\n\tpublic void onTaskDone(String result) {\n\t\t\n\t}", "@Test\n public void testDACKLoadedMessage() throws Exception {\n final CacheTransactionManager txMgr = getCache().getCacheTransactionManager();\n final String rgnName = getUniqueName();\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.DISTRIBUTED_ACK);\n factory.setEarlyAck(false);\n factory.setCacheLoader(new CacheLoader() {\n @Override\n public Object load(LoaderHelper helper) {\n return \"val\" + helper.getArgument();\n }\n\n @Override\n public void close() {}\n });\n Region rgn = getCache().createRegion(rgnName, factory.create());\n\n Invoke.invokeInEveryVM(new SerializableRunnable(\"testDACKLoadedMessage: intial configuration\") {\n @Override\n public void run() {\n try {\n AttributesFactory factory2 = new AttributesFactory();\n factory2.setScope(Scope.DISTRIBUTED_ACK);\n factory2.setEarlyAck(false);\n // factory.setDataPolicy(DataPolicy.REPLICATE);\n factory2.setMirrorType(MirrorType.KEYS);\n getCache().createRegion(rgnName, factory2.create());\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n });\n\n // Confirm the standard case\n txMgr.begin();\n rgn.put(\"key1\", \"val1\");\n txMgr.commit();\n assertEquals(\"val1\", rgn.getEntry(\"key1\").getValue());\n\n Invoke\n .invokeInEveryVM(new SerializableRunnable(\"testDACKLoadedMessage: confirm standard case\") {\n @Override\n public void run() {\n Region rgn1 = getCache().getRegion(rgnName);\n assertEquals(\"val1\", rgn1.getEntry(\"key1\").getValue());\n }\n });\n\n // Confirm loaded value case\n txMgr.begin();\n rgn.get(\"key2\", 2);\n txMgr.commit();\n assertEquals(\"val2\", rgn.getEntry(\"key2\").getValue());\n\n Invoke\n .invokeInEveryVM(new SerializableRunnable(\"testDACKLoadedMessage: confirm standard case\") {\n @Override\n public void run() {\n Region rgn1 = getCache().getRegion(rgnName);\n assertEquals(\"val2\", rgn1.getEntry(\"key2\").getValue());\n }\n });\n\n // This should use the ack w/ the lockid\n txMgr.begin();\n rgn.put(\"key3\", \"val3\");\n rgn.get(\"key4\", 4);\n txMgr.commit();\n\n Invoke\n .invokeInEveryVM(new SerializableRunnable(\"testDACKLoadedMessage: confirm standard case\") {\n @Override\n public void run() {\n Region rgn1 = getCache().getRegion(rgnName);\n assertEquals(\"val3\", rgn1.getEntry(\"key3\").getValue());\n assertEquals(\"val4\", rgn1.getEntry(\"key4\").getValue());\n }\n });\n\n }", "@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "boolean updateTask(Task updatedTask);", "protected void dofinally(TaskResult taskResult){\n }", "public boolean action(GroupMessage a, int hops) {\n\t\tboolean publish = false;\n\t\tswitch (m_state) {\n\t\tcase EXPECT_BCAST:\n\t\t\tswitch (a) {\n\t\t\tcase BCAST:\t\tpublish = true;\t\tbreak;\t// missed() move state machine and pub!\n\t\t\tcase CLEAN:\t\tpublish = true;\t\tbreak;\t// missed(BCAST)\n\t\t\tcase SUCCESS:\tpublish = false;\tbreak;}\t// missed(BCAST,CLEAN) or dup SUCCESS\n\t\t\tbreak;\n\t\tcase EXPECT_CLEAN:\n\t\t\tswitch (a) {\n\t\t\tcase BCAST:\t\tpublish = false;\tbreak; // missed(CLEAN, SUCCESS) or dup BCAST\n\t\t\tcase CLEAN:\t\tpublish = false;\tbreak;\t// missed() move state machine, no pub\n\t\t\tcase SUCCESS:\tpublish = false;\tbreak; } // missed(CLEAN)\n\t\t\tbreak;\n\t\tcase EXPECT_SUCCESS:\n\t\t\tswitch (a) {\n\t\t\tcase BCAST:\t\tpublish = true;\t\tbreak;\t// missed(SUCCESS) \n\t\t\tcase CLEAN:\t\tpublish = false;\tbreak; // missed(SUCCESS,BCAST) or dup CLEAN\n\t\t\tcase SUCCESS:\tpublish = false;\tbreak; } // missed(), move state machine, no pub\n\t\t\tbreak;\n\t\t}\n\t\tState oldState = m_state;\n\t\tswitch (a) {\n\t\tcase BCAST: \tm_state = State.EXPECT_CLEAN;\tbreak;\n\t\tcase CLEAN:\t\tm_state = State.EXPECT_SUCCESS;\tbreak;\n\t\tcase SUCCESS:\tm_state = State.EXPECT_BCAST;\tbreak;\n\t\t}\n\t\tlogger.trace(\"group state: {} --{}--> {}, publish: {}\", oldState, a, m_state, publish);\n\t\treturn (publish);\n\t}", "@Override\r\n\tvoid execute(Runnable task);", "private boolean namenodeHeartbeat(MembershipState namenode)\n throws IOException {\n\n NamenodeHeartbeatRequest request =\n NamenodeHeartbeatRequest.newInstance(namenode);\n NamenodeHeartbeatResponse response =\n membershipStore.namenodeHeartbeat(request);\n return response.getResult();\n }", "@SuppressLint(\"TaskMainThread\")\n @NonNull\n private <ContinuationResultT> Task<ContinuationResultT> successTaskImpl(\n @Nullable final Executor executor,\n @NonNull final SuccessContinuation<ResultT, ContinuationResultT> continuation) {\n final CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();\n final CancellationToken cancellationToken = cancellationTokenSource.getToken();\n final TaskCompletionSource<ContinuationResultT> source =\n new TaskCompletionSource<>(cancellationToken);\n\n successManager.addListener(\n null,\n executor,\n result -> {\n Task<ContinuationResultT> resultTask;\n try {\n resultTask = continuation.then(result);\n } catch (RuntimeExecutionException e) {\n if (e.getCause() instanceof Exception) {\n source.setException((Exception) e.getCause());\n } else {\n source.setException(e);\n }\n return;\n } catch (Exception e) {\n source.setException(e);\n return;\n }\n\n resultTask.addOnSuccessListener(source::setResult);\n resultTask.addOnFailureListener(source::setException);\n resultTask.addOnCanceledListener(cancellationTokenSource::cancel);\n });\n return source.getTask();\n }", "public Builder setLockstepAck(boolean value) {\n \n lockstepAck_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void PreExecute(TaskConfig config){\n\t}", "public abstract void execute(Task t);", "abstract boolean shouldTaskActivate();", "public interface OnTaskCompleted {\n\n void onTaskCompleted(String s);\n}", "@Override\n public boolean act(Task task) throws RuntimeException {\n return this.subscribe(task);\n }", "@Test\n public void testPartialCheckpointNewIndexRows() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 100_000, false);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 10);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n String reason = getTestIgniteInstanceName();\n IgniteInternalFuture<Void> awaitBeforeCpBeginFut = awaitBeforeCheckpointBeginAsync(n, reason);\n IgniteInternalFuture<Void> disableCpFut = enableCheckpointsAsync(n, reason, false);\n\n awaitBeforeCpBeginFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n\n disableCpFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.sleepTime.set(0);\n\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> rebIdxFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(rebIdxFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n rebIdxFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(100_000, selectPersonByName(n.cache(cacheName)).size());\n }", "public interface TaskCallback<T> {\n void onFinish(T result);\n}", "@Override\n\tpublic void callbackAck(boolean isSuccess, Method method, Object[] objs) {\n\t\tif(isSuccess){\n\t\t\ttry{\n\t\t\t\tTask task = (Task)objs[0];\n\t\t\t\tList<ExternalOrderDetail> externalOrderDetailList = (List<ExternalOrderDetail>) task.getParam(\"externalOrderDetails\");\n\t\t\t\tlog.info(String.format(\"提交自动下单订单号[%s],分配账号:%s:,发送机器IP:%s\", externalOrderDetailList.get(0).getSaleOrderCode(), externalOrderDetailList.get(0).getAccountId(), task.getGroup()));\n\t\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tTask task = (Task)objs[0];\n\t\t\t\tList<ExternalOrderDetail> externalOrderDetailList = (List<ExternalOrderDetail>) task.getParam(\"externalOrderDetails\");\n\t\t\t\tfor (ExternalOrderDetail r : externalOrderDetailList) {\n\t\t\t\t\texternalOrderDetailDAO.updateStatus(500,r.getId());\n\t }\n\t\t\t\tlog.info(String.format(\"提交自动出错下单订单号[%s],分配账号:%s:,发送机器IP:%s\", externalOrderDetailList.get(0).getSaleOrderCode(), externalOrderDetailList.get(0).getAccountId(), task.getGroup()));\n\t\t\t}catch(Exception e){\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}\n\t}", "public void testClusterJoinDespiteOfPublishingIssues() throws Exception {\n String clusterManagerNode = internalCluster().startClusterManagerOnlyNode();\n String nonClusterManagerNode = internalCluster().startDataOnlyNode();\n\n DiscoveryNodes discoveryNodes = internalCluster().getInstance(ClusterService.class, nonClusterManagerNode).state().nodes();\n\n TransportService clusterManagerTranspotService = internalCluster().getInstance(\n TransportService.class,\n discoveryNodes.getClusterManagerNode().getName()\n );\n\n logger.info(\"blocking requests from non cluster-manager [{}] to cluster-manager [{}]\", nonClusterManagerNode, clusterManagerNode);\n MockTransportService nonClusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n nonClusterManagerNode\n );\n nonClusterManagerTransportService.addFailToSendNoConnectRule(clusterManagerTranspotService);\n\n assertNoClusterManager(nonClusterManagerNode);\n\n logger.info(\n \"blocking cluster state publishing from cluster-manager [{}] to non cluster-manager [{}]\",\n clusterManagerNode,\n nonClusterManagerNode\n );\n MockTransportService clusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n clusterManagerNode\n );\n TransportService localTransportService = internalCluster().getInstance(\n TransportService.class,\n discoveryNodes.getLocalNode().getName()\n );\n if (randomBoolean()) {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n localTransportService,\n PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME\n );\n } else {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n localTransportService,\n PublicationTransportHandler.COMMIT_STATE_ACTION_NAME\n );\n }\n\n logger.info(\n \"allowing requests from non cluster-manager [{}] to cluster-manager [{}], waiting for two join request\",\n nonClusterManagerNode,\n clusterManagerNode\n );\n final CountDownLatch countDownLatch = new CountDownLatch(2);\n nonClusterManagerTransportService.addSendBehavior(\n clusterManagerTransportService,\n (connection, requestId, action, request, options) -> {\n if (action.equals(JoinHelper.JOIN_ACTION_NAME)) {\n countDownLatch.countDown();\n }\n connection.sendRequest(requestId, action, request, options);\n }\n );\n\n nonClusterManagerTransportService.addConnectBehavior(clusterManagerTransportService, Transport::openConnection);\n\n countDownLatch.await();\n\n logger.info(\"waiting for cluster to reform\");\n clusterManagerTransportService.clearOutboundRules(localTransportService);\n nonClusterManagerTransportService.clearOutboundRules(localTransportService);\n\n ensureStableCluster(2);\n\n // shutting down the nodes, to avoid the leakage check tripping\n // on the states associated with the commit requests we may have dropped\n internalCluster().stopRandomNonClusterManagerNode();\n }", "public interface ComputeTaskStatusSnapshot {\n /**\n * @return Session ID of the task being executed.\n */\n IgniteUuid sessionId();\n\n /**\n * @return Task name of the task this session belongs to.\n */\n String taskName();\n\n /**\n * @return ID of the node on which task execution originated.\n */\n UUID originatingNodeId();\n\n /**\n * @return Start of computation time for the task.\n */\n long startTime();\n\n /**\n * @return End of computation time for the task.\n */\n long endTime();\n\n /**\n * @return Nodes IDs on which the task jobs will execute.\n */\n List<UUID> jobNodes();\n\n /**\n * @return All session attributes.\n */\n Map<?, ?> attributes();\n\n /**\n * @return Status of the task.\n */\n ComputeTaskStatusEnum status();\n\n /**\n * @return Reason for the failure of the task.\n */\n @Nullable Throwable failReason();\n\n /**\n * @return {@code true} if change of task attributes is available.\n */\n boolean fullSupport();\n\n /**\n * @return User who created the task, {@code null} if security is not available.\n */\n @Nullable Object createBy();\n\n /**\n * @return {@code True} if task is internal.\n */\n boolean internal();\n}", "@Test\n public void testTaskAddedAfterShutdownNotAbandoned() throws Exception {\n LinkedBlockingQueue<Runnable> taskQueue = new LinkedBlockingQueue<Runnable>() {\n @Override\n public boolean remove(Object o) {\n throw new UnsupportedOperationException();\n }\n };\n\n final Runnable dummyTask = new Runnable() {\n @Override\n public void run() {\n }\n };\n\n final LinkedBlockingQueue<Future<?>> submittedTasks = new LinkedBlockingQueue<Future<?>>();\n final AtomicInteger attempts = new AtomicInteger();\n final AtomicInteger rejects = new AtomicInteger();\n\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n final SingleThreadEventExecutor executor = new SingleThreadEventExecutor(null, executorService, false,\n taskQueue, RejectedExecutionHandlers.reject()) {\n @Override\n protected void run() {\n while (!confirmShutdown()) {\n Runnable task = takeTask();\n if (task != null) {\n task.run();\n }\n }\n }\n\n @Override\n protected boolean confirmShutdown() {\n boolean result = super.confirmShutdown();\n // After shutdown is confirmed, scheduled one more task and record it\n if (result) {\n attempts.incrementAndGet();\n try {\n submittedTasks.add(submit(dummyTask));\n } catch (RejectedExecutionException e) {\n // ignore, tasks are either accepted or rejected\n rejects.incrementAndGet();\n }\n }\n return result;\n }\n };\n\n // Start the loop\n executor.submit(dummyTask).sync();\n\n // Shutdown without any quiet period\n executor.shutdownGracefully(0, 100, TimeUnit.MILLISECONDS).sync();\n\n // Ensure there are no user-tasks left.\n assertEquals(0, executor.drainTasks());\n\n // Verify that queue is empty and all attempts either succeeded or were rejected\n assertTrue(taskQueue.isEmpty());\n assertTrue(attempts.get() > 0);\n assertEquals(attempts.get(), submittedTasks.size() + rejects.get());\n for (Future<?> f : submittedTasks) {\n assertTrue(f.isSuccess());\n }\n }", "private void notifyListeners()\r\n/* 456: */ {\r\n/* 457:547 */ Object listeners = this.listeners;\r\n/* 458:548 */ if (listeners == null) {\r\n/* 459:549 */ return;\r\n/* 460: */ }\r\n/* 461:552 */ EventExecutor executor = executor();\r\n/* 462:553 */ if (executor.inEventLoop())\r\n/* 463: */ {\r\n/* 464:554 */ InternalThreadLocalMap threadLocals = InternalThreadLocalMap.get();\r\n/* 465:555 */ int stackDepth = threadLocals.futureListenerStackDepth();\r\n/* 466:556 */ if (stackDepth < 8)\r\n/* 467: */ {\r\n/* 468:557 */ threadLocals.setFutureListenerStackDepth(stackDepth + 1);\r\n/* 469: */ try\r\n/* 470: */ {\r\n/* 471:559 */ if ((listeners instanceof DefaultFutureListeners))\r\n/* 472: */ {\r\n/* 473:560 */ notifyListeners0(this, (DefaultFutureListeners)listeners);\r\n/* 474: */ }\r\n/* 475: */ else\r\n/* 476: */ {\r\n/* 477:563 */ GenericFutureListener<? extends Future<V>> l = (GenericFutureListener)listeners;\r\n/* 478: */ \r\n/* 479:565 */ notifyListener0(this, l);\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ finally\r\n/* 483: */ {\r\n/* 484:568 */ this.listeners = null;\r\n/* 485:569 */ threadLocals.setFutureListenerStackDepth(stackDepth);\r\n/* 486: */ }\r\n/* 487:571 */ return;\r\n/* 488: */ }\r\n/* 489: */ }\r\n/* 490:575 */ if ((listeners instanceof DefaultFutureListeners))\r\n/* 491: */ {\r\n/* 492:576 */ final DefaultFutureListeners dfl = (DefaultFutureListeners)listeners;\r\n/* 493:577 */ execute(executor, new Runnable()\r\n/* 494: */ {\r\n/* 495: */ public void run()\r\n/* 496: */ {\r\n/* 497:580 */ DefaultPromise.notifyListeners0(DefaultPromise.this, dfl);\r\n/* 498:581 */ DefaultPromise.this.listeners = null;\r\n/* 499: */ }\r\n/* 500: */ });\r\n/* 501: */ }\r\n/* 502: */ else\r\n/* 503: */ {\r\n/* 504:586 */ final GenericFutureListener<? extends Future<V>> l = (GenericFutureListener)listeners;\r\n/* 505: */ \r\n/* 506:588 */ execute(executor, new Runnable()\r\n/* 507: */ {\r\n/* 508: */ public void run()\r\n/* 509: */ {\r\n/* 510:591 */ DefaultPromise.notifyListener0(DefaultPromise.this, l);\r\n/* 511:592 */ DefaultPromise.this.listeners = null;\r\n/* 512: */ }\r\n/* 513: */ });\r\n/* 514: */ }\r\n/* 515: */ }", "private void applyNewOrUpdatedShards(final ClusterChangedEvent event) throws RebirthException {\n\t\tif (!indicesService.changesAllowed())\n\t\t\treturn;\n\n\t\tRoutingTable routingTable = event.state().routingTable();\n\t\tRoutingNode routingNodes = event.state().readOnlyRoutingNodes().nodesToShards()\n\t\t\t\t.get(event.state().nodes().localNodeId());\n\t\tif (routingNodes == null) {\n\t\t\treturn;\n\t\t}\n\t\tDiscoveryNodes nodes = event.state().nodes();\n\n\t\tfor (final ShardRouting shardRouting : routingNodes) {\n\t\t\tfinal IndexService indexService = indicesService.indexService(shardRouting.index());\n\t\t\tif (indexService == null) {\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfinal int shardId = shardRouting.id();\n\n\t\t\tif (!indexService.hasShard(shardId) && shardRouting.started()) {\n\n\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\"[\"\n\t\t\t\t\t\t\t\t+ shardRouting.index()\n\t\t\t\t\t\t\t\t+ \"][{}] master [{}] marked shard as started, but shard have not been created, mark shard as failed\",\n\t\t\t\t\t\tshardId, nodes.masterNode());\n\t\t\t\tshardStateAction.shardFailed(shardRouting, \"master \" + nodes.masterNode()\n\t\t\t\t\t\t+ \" marked shard as started, but shard have not been created, mark shard as failed\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (indexService.hasShard(shardId)) {\n\t\t\t\tInternalIndexShard indexShard = (InternalIndexShard) indexService.shard(shardId);\n\t\t\t\tif (!shardRouting.equals(indexShard.routingEntry())) {\n\t\t\t\t\tindexShard.routingEntry(shardRouting);\n\t\t\t\t\tindexService.shardInjector(shardId).getInstance(IndexShardGatewayService.class)\n\t\t\t\t\t\t\t.routingStateChanged();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (shardRouting.initializing()) {\n\t\t\t\tapplyInitializingShard(routingTable, nodes,\n\t\t\t\t\t\troutingTable.index(shardRouting.index()).shard(shardRouting.id()), shardRouting);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.56468886", "0.56247437", "0.5467236", "0.54259753", "0.53996027", "0.5375238", "0.53556764", "0.52765125", "0.5261609", "0.5244702", "0.5196166", "0.5151262", "0.5143432", "0.51296204", "0.5120323", "0.51153296", "0.51108295", "0.5107115", "0.5088351", "0.5052762", "0.5004395", "0.5004313", "0.49968064", "0.49566236", "0.49533382", "0.4951982", "0.49335447", "0.49145222", "0.4909735", "0.4899847", "0.4892529", "0.48907992", "0.4887403", "0.4881143", "0.48733953", "0.48695678", "0.48633704", "0.48575714", "0.48516643", "0.48412538", "0.48258275", "0.48252743", "0.4809054", "0.47981164", "0.477814", "0.47746146", "0.47715002", "0.47698715", "0.47617048", "0.4761265", "0.47407275", "0.4739972", "0.47369868", "0.4730288", "0.47282663", "0.47240907", "0.4706209", "0.47028583", "0.4699684", "0.46979523", "0.46946225", "0.4688568", "0.4674325", "0.4670626", "0.46670523", "0.46647978", "0.46605572", "0.46591625", "0.4641672", "0.46362644", "0.4629415", "0.4628091", "0.4628091", "0.46261057", "0.46223885", "0.46220136", "0.4620312", "0.46189326", "0.46151608", "0.4612685", "0.4608628", "0.4606064", "0.4605617", "0.4596981", "0.459242", "0.45891407", "0.45844233", "0.45812172", "0.45700008", "0.45683745", "0.45683017", "0.4559872", "0.4556725", "0.45459935", "0.4543702", "0.45420843", "0.45412698", "0.4540791", "0.45276898", "0.45187947" ]
0.7111058
0
if the whole batch resulted in an exception then this overrides any tasklevel results whether successful or not
void onBatchFailure(Exception failure) { this.failure = Objects.requireNonNull(failure); this.publishedStateConsumer = null; this.clusterStateAckListener = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean hasErrorResults() {\n return false;\n }", "@Override\n public void taskErrorMessage(Object result) {\n\n }", "private void updateStatisticsOnNormalEnd(Operation op, OperationResult result) {\n ItemProcessingOutcomeType outcome;\n if (result.isError()) {\n outcome = ItemProcessingOutcomeType.FAILURE;\n } else if (result.isNotApplicable()) {\n outcome = ItemProcessingOutcomeType.SKIP;\n } else {\n outcome = ItemProcessingOutcomeType.SUCCESS;\n }\n updateStatisticsWithOutcome(op, outcome, null); // we don't try to find the exception (in case of failure)\n }", "protected void failed()\r\n {\r\n //overwrite\r\n }", "public boolean proceedOnErrors() {\n return false;\n }", "@Override\n protected void run(Result result) throws Throwable {\n }", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "@Override\n\tpublic void onTaskFail() {\n\t\t\n\t}", "@Override\n public void onResponse(PersistentTasksCustomMetadata.PersistentTask<?> task) {\n onFailure.accept(exception);\n }", "@Override\n boolean isFailed() {\n return false;\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 void markAsFailed() {\n execution.setErrorReported();\n }", "private void handleResponse(List<TryTrackingIndexAction<T>> actions, IndexBatchResponse batchResponse) {\n if (batchResponse.getStatusCode() == HttpURLConnection.HTTP_ENTITY_TOO_LARGE && batchResponse.getCount() == 1) {\n IndexAction<T> action = actions.get(0).getAction();\n if (onActionErrorConsumer != null) {\n onActionErrorConsumer.accept(new OnActionErrorOptions<>(action)\n .setThrowable(createDocumentTooLargeException()));\n }\n return;\n }\n\n List<TryTrackingIndexAction<T>> actionsToRetry = new ArrayList<>();\n boolean has503 = batchResponse.getStatusCode() == HttpURLConnection.HTTP_UNAVAILABLE;\n if (batchResponse.getResults() == null) {\n /*\n * Null results indicates that the entire request failed. Retry all documents.\n */\n actionsToRetry.addAll(actions);\n } else {\n /*\n * We got back a result set, correlate responses to their request document and add retryable actions back\n * into the queue.\n */\n for (IndexingResult result : batchResponse.getResults()) {\n String key = result.getKey();\n TryTrackingIndexAction<T> action = actions.stream()\n .filter(a -> key.equals(a.getKey()))\n .findFirst()\n .orElse(null);\n\n if (action == null) {\n LOGGER.warning(\"Unable to correlate result key {} to initial document.\", key);\n continue;\n }\n\n if (isSuccess(result.getStatusCode())) {\n if (onActionSucceededConsumer != null) {\n onActionSucceededConsumer.accept(new OnActionSucceededOptions<>(action.getAction()));\n }\n } else if (isRetryable(result.getStatusCode())) {\n has503 |= result.getStatusCode() == HttpURLConnection.HTTP_UNAVAILABLE;\n if (action.getTryCount() < maxRetries) {\n action.incrementTryCount();\n actionsToRetry.add(action);\n } else {\n if (onActionErrorConsumer != null) {\n onActionErrorConsumer.accept(new OnActionErrorOptions<>(action.getAction())\n .setThrowable(createDocumentHitRetryLimitException())\n .setIndexingResult(result));\n }\n }\n } else {\n if (onActionErrorConsumer != null) {\n onActionErrorConsumer.accept(new OnActionErrorOptions<>(action.getAction())\n .setIndexingResult(result));\n }\n }\n }\n }\n\n if (has503) {\n currentRetryDelay = calculateRetryDelay(backoffCount.getAndIncrement());\n } else {\n backoffCount.set(0);\n currentRetryDelay = Duration.ZERO;\n }\n\n if (!CoreUtils.isNullOrEmpty(actionsToRetry)) {\n reinsertFailedActions(actionsToRetry);\n }\n }", "public abstract Result mergeTaskResults(Map<TaskKey,TaskResult> taskResults) throws JobException;", "private void handleErrorsInTask(String result) {\n Log.e(\"ASYNC_TASK_ERROR\", result);\n }", "private void handleErrorsInTask(String result) {\n Log.e(\"ASYNC_TASK_ERROR\", result);\n }", "public void markOperationAsExecuted(Engine.Result result) {\n assertInvariants(ItemProcessingState.TRANSLATED);\n final BulkItemRequest current = getCurrentItem();\n DocWriteRequest docWriteRequest = getRequestToExecute();\n switch (result.getResultType()) {\n case SUCCESS:\n final DocWriteResponse response;\n if (result.getOperationType() == Engine.Operation.TYPE.INDEX) {\n Engine.IndexResult indexResult = (Engine.IndexResult) result;\n response = new IndexResponse(\n primary.shardId(),\n requestToExecute.id(),\n result.getSeqNo(),\n result.getTerm(),\n indexResult.getVersion(),\n indexResult.isCreated()\n );\n } else if (result.getOperationType() == Engine.Operation.TYPE.DELETE) {\n Engine.DeleteResult deleteResult = (Engine.DeleteResult) result;\n response = new DeleteResponse(\n primary.shardId(),\n requestToExecute.id(),\n deleteResult.getSeqNo(),\n result.getTerm(),\n deleteResult.getVersion(),\n deleteResult.isFound()\n );\n\n } else {\n throw new AssertionError(\"unknown result type :\" + result.getResultType());\n }\n executionResult = new BulkItemResponse(current.id(), current.request().opType(), response);\n // set a blank ShardInfo so we can safely send it to the replicas. We won't use it in the real response though.\n executionResult.getResponse().setShardInfo(new ReplicationResponse.ShardInfo());\n locationToSync = TransportWriteAction.locationToSync(locationToSync, result.getTranslogLocation());\n break;\n case FAILURE:\n executionResult = new BulkItemResponse(\n current.id(),\n docWriteRequest.opType(),\n // Make sure to use request.index() here, if you\n // use docWriteRequest.index() it will use the\n // concrete index instead of an alias if used!\n new BulkItemResponse.Failure(\n request.index(),\n docWriteRequest.id(),\n result.getFailure(),\n result.getSeqNo(),\n result.getTerm()\n )\n );\n break;\n default:\n throw new AssertionError(\"unknown result type for \" + getCurrentItem() + \": \" + result.getResultType());\n }\n currentItemState = ItemProcessingState.EXECUTED;\n }", "default boolean pollOnExecutionFailed() {\n return false;\n }", "boolean processFailure(Throwable t);", "public void failOnMappingUpdate(Exception cause) {\n assert assertInvariants(ItemProcessingState.WAIT_FOR_MAPPING_UPDATE);\n currentItemState = ItemProcessingState.EXECUTED;\n final DocWriteRequest docWriteRequest = getCurrentItem().request();\n executionResult = new BulkItemResponse(\n getCurrentItem().id(),\n docWriteRequest.opType(),\n // Make sure to use getCurrentItem().index() here, if you use docWriteRequest.index() it will use the\n // concrete index instead of an alias if used!\n new BulkItemResponse.Failure(getCurrentItem().index(), docWriteRequest.id(), cause)\n );\n markAsCompleted(executionResult);\n }", "private Pair<Boolean, Exception> processResults(final AbstractNodeContext context, final BundleResults received) throws Exception {\n TaskBundle newBundle = received.bundle();\n ServerTaskBundleNode nodeBundle = context.getBundle();\n Exception exception = null;\n // if an exception prevented the node from executing the tasks or sending back the results\n Throwable t = newBundle.getParameter(NODE_EXCEPTION_PARAM);\n Bundler bundler = context.getBundler();\n if (t != null) {\n if (debugEnabled) log.debug(\"node \" + context.getChannel() + \" returned exception parameter in the header for bundle \" + newBundle + \" : \" + t);\n exception = (t instanceof Exception) ? (Exception) t : new JPPFException(t);\n nodeBundle.resultsReceived(t);\n } else {\n if (debugEnabled) log.debug(\"*** received bundle with \" + received.second().size() + \" tasks, taskCount=\" + newBundle.getTaskCount() + \" : \" + received.bundle());\n nodeBundle.resultsReceived(received.data());\n long elapsed = System.nanoTime() - nodeBundle.getJob().getExecutionStartTime();\n updateStats(newBundle.getTaskCount(), elapsed / 1_000_000L, newBundle.getNodeExecutionTime() / 1_000_000L);\n if (bundler instanceof BundlerEx) {\n long accumulatedTime = newBundle.getParameter(NODE_BUNDLE_ELAPSED_PARAM, -1L);\n ((BundlerEx) bundler).feedback(newBundle.getTaskCount(), elapsed, accumulatedTime, elapsed - newBundle.getNodeExecutionTime());\n } else bundler.feedback(newBundle.getTaskCount(), elapsed);\n }\n boolean requeue = newBundle.isRequeue();\n JPPFSystemInformation systemInfo = newBundle.getParameter(SYSTEM_INFO_PARAM);\n if (systemInfo != null) {\n context.setNodeInfo(systemInfo, true);\n if (bundler instanceof NodeAwareness) ((NodeAwareness) bundler).setNodeConfiguration(systemInfo);\n }\n return new Pair<>(requeue, exception);\n }", "@Override\n public void afterBulk(long executionId,\n BulkRequest request,\n Throwable failure) {\n }", "public int getBatchDownloadFailureCountdown()\n {\n return 0; \n }", "Result(Exception e) {\n empty = false;\n this.e = e;\n status = 1;\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\n\t\t\t\ttry{\n\t\t\t\t\n\t\t\t\t\tint staging_status = 1;\n\t\t\t\t\tboolean hasFailed = false;\n\t\t\t\t\t\n\t\t\t\t\tLong id;\n\t\t\t\t\t\n\t\t\t\t\t//Annoying Bug\n\t\t\t\t\tif(arg0.getParameter(\"app_inst_id\") instanceof String)\n\t\t\t\t\t\tid = Long.valueOf((String) arg0.getParameter(\"app_inst_id\"));\n\t\t\t\t\telse\n\t\t\t\t\t\tid = (Long) arg0.getParameter(\"app_inst_id\");\n\t\t\t\t\t\n\t\t\t\t\t//AppInstance inst = AHEEngine.getAppInstanceEntity(id);\n\t\t\t\t\tFileStaging[] in = AHEEngine.getFileStageInByAppInstId(id);\n\t\t\t\t\t\n\t\t\t\t\t//Update AppInstance Status\n\t\t\t\t\tAHEEngine.setCurrentAppInstanceState(id, AppInstanceStates.Data_Staging.toString(),\"Staging Data\");\n\t\t\t\t\t\n\t\t\t\t\t//Sort FileStaging into groups\n\t\t\t\t\tHashMap<String, ArrayList<FileStaging>> map = new HashMap<String, ArrayList<FileStaging>>();\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0; i < in.length; i++){\n\t\t\t\t\t\t\n\t\t\t\t\t\tURI uri = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\turi = new URI(in[i].getTarget());\n\t\t\t\t\t\t} catch (URISyntaxException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\tlogger.error(\"Data Staging failed\",e);\n//\t\t\t\t\t\t\tstaging_status = -1;\n//\t\t\t\t\t\t\thasFailed = true;\n\t\t\t\t\t\t\tfailed(id, arg0, \"Data Staging failed\", e);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tResource res = ResourceRegisterAPI.getResourceByBestMatch(uri);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(map.containsKey(res.getResource_interface())){\n\t\t\t\t\t\t\tmap.get(res.getResource_interface()).add(in[i]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tArrayList<FileStaging> array = new ArrayList<FileStaging>();\n\t\t\t\t\t\t\tarray.add(in[i]);\n\t\t\t\t\t\t\tmap.put(res.getResource_interface(), array);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tString[] keyset = map.keySet().toArray(new String[map.size()]);\n\t\t\t\t\t\n\t\t\t\t\tString err = \"\";\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0; i < keyset.length; i++){\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tArrayList<FileStaging> temp = map.get(keyset[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tAHEMessage msg = TransferHandler.transfer(temp.toArray(new FileStaging[temp.size()]));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(AHEMessageUtility.hasException(msg)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString er1 = \"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(msg.getException() != null){\n\t\t\t\t\t\t\t\t\ter1 = msg.getException()[0];\n\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\tstaging_status = -1;\n//\t\t\t\t\t\t\t\thasFailed = true;\n//\t\t\t\t\t\t\t\tlogger.error(\"Data Staging failed. Transfer Module has returned an exception msg : \" + er1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfailed(id, arg0, \"Data Staging failed. Transfer Module has returned an exception msg : \" + er1,null);\n\t\t\t\t\t\t\t\treturn;\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\t\n//\t\t\t\t\t\t\t\tif(msg.getInformation().length > 0){\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t//Update FileStaging with uid\n//\t\t\t\t\t\t\t\t\tfor(int j=0; j < temp.size(); j++){\n//\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\ttemp.get(j).setIdentifier(msg.getInformation()[0]);\n//\t\t\t\t\t\t\t\t\t\tHibernateUtil.SaveOrUpdate(temp.get(j));\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\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\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}catch(Exception e){\n//\t\t\t\t\t\t\tlogger.error(\"Data Staging failed\",e);\n//\t\t\t\t\t\t\tstaging_status = -1;\n//\t\t\t\t\t\t\thasFailed = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfailed(id, arg0, \"Data Staging failed\",e);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(hasFailed) {\n\t\t\t\t\t\tAHEEngine.setCurrentAppInstanceState(id, AppInstanceStates.Error_DataStaging.toString(),\"Data Staging Information Error : \" + err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tAHEEngine.setCurrentAppInstanceState(id, AppInstanceStates.Workflow_Running.toString(),\"Data Staging Information Submitted\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tMap<String, Object> result = new HashMap<String, Object>();\n\t\t\t\t\t\n\t\t\t\t\tif(hasFailed){\n\t\t\t\t\t\tstaging_status = -1;\n\t\t\t\t\t\tresult.put(notification_code, \"Data Staging failed for AppInst : \" + id);\n\t\t\t\t\t}\n\t\t\t\t\tresult.put(staging_status_code, staging_status);\n\t\t\n\t\t\t\t\tAHERuntime.getAHERuntime().getAhe_engine().getWorkflowHandler().getStatefulKnowledgeSession().getWorkItemManager().completeWorkItem(arg0.getId(), result);\n\t\t\t\t\t\n\t\t\t\t\t//arg1.completeWorkItem(arg0.getId(), result);\n\t\t\n\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t\t}catch(AHEException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tfailed(arg0, e.getMessage());\n\t\t\t\t}\n\n\t\t\t}", "@Override\n protected boolean continueOnWriteError() {\n return true;\n }", "@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }", "@Override\r\n\tpublic void process(ResultItems arg0, Task arg1) {\n\t\t\r\n\t}", "@Test\n public void getLatestScanResults_projectWithAllScansFailed() {\n testMissingResultsCase(\"common-client-test-03-all-scans-failed\");\n }", "public void setRunningTasksToFailure() {\r\n\t\tsetRunningTasksToFailureRecursive(elements);\r\n\t}", "@Override\n public void sendResultToOutput(JobTask jobTask, JobTaskResult jobTaskResult) {\n\n }", "public void fail() {\n _siteStatus = false;\n _lockTable.clear();\n _accessedTransactions.clear();\n _uncommitDataMap.clear();\n _lastFailTime = _tm.getCurrentTime();\n }", "private void handleTrainTaskFailure(final BackendEngineStatus queued, final ServerTracker server,\n final ServerConnector.AiServicesException exception) {\n\n // queue flag\n boolean requeueThis = !exception.getPermanentError();\n String logMessage;\n // get the first error with a non-zero result code\n ServerConnector.AiServicesException httpError = findFirstSuppressedHttpError(exception);\n // if there is one\n if (httpError != null) {\n switch (httpError.getResponseStatus()) {\n case HttpURLConnection.HTTP_BAD_REQUEST:\n case HttpURLConnection.HTTP_NOT_FOUND:\n requeueThis = false;\n break;\n default:\n break;\n }\n logMessage = httpError.getMessage();\n } else {\n logMessage = exception.toString();\n }\n\n try {\n if (requeueThis) {\n\n this.logger.logError(this.logFrom,\n String.format(\"REQUEUE train task that failed on backend %s with error %s\",\n server.getServerIdentifier(), logMessage));\n // requeue the task now\n this.database.queueUpdate(this.serviceIdentity, queued.getAiid(),\n true, this.config.getProcessQueueScheduleFutureCommand(), QueueAction.TRAIN);\n } else {\n // don't requeue\n this.logger.logError(this.logFrom,\n String.format(\"DROP train-task that failed on backend %s with error %s\",\n server.getServerIdentifier(), logMessage));\n // and permanently flag the AI state as ERROR\n this.database.updateAIStatus(this.serviceIdentity, queued.getAiid(), TrainingStatus.AI_ERROR,\n server.getServerIdentifier(), 0.0, 0.0);\n }\n } catch (DatabaseException e1) {\n this.logger.logException(this.logFrom, e1);\n }\n }", "public void processBlockwiseResponseTransferFailed() {\n //to be overridden by extending classes\n }", "public void runSequential() {\n int exitVal = -101;\n try {\n exitVal = tsk.executeTask(ss == null ? null : ss.getHiveHistory());\n } catch (Throwable t) {\n if (tsk.getException() == null) {\n tsk.setException(t);\n }\n LOG.error(\"Error in executeTask\", t);\n }\n if (tsk.getException() != null) {\n result.setTaskError(tsk.getException());\n }\n result.setExitVal(exitVal);\n taskQueue.releaseRunnable();\n }", "public abstract R createFailedResult(Status status);", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "private void printFailCommandResult(CommandResult result) {\n String commandType = result.getCommand().getCommandType();\n switch (commandType) {\n case Command.COMMAND_DONE:\n switch (result.getResultDescription()) {\n case CommandResult.INVALID_NUMBER:\n printInvalidTaskNotExistedMessage();\n break;\n case CommandResult.INVALID_TASK_ALREADY_DONE:\n printInvalidTaskAlreadyDoneMessage(result);\n break;\n }\n break;\n case Command.COMMAND_ADD_TODO:\n case Command.COMMAND_ADD_DEADLINE:\n case Command.COMMAND_ADD_EVENT:\n printInvalidAddTaskMessage(result);\n break;\n case Command.COMMAND_DELETE:\n printInvalidTaskNotExistedMessage();\n break;\n case Command.COMMAND_FIND:\n printInvalidKeywordMessage();\n break;\n default:\n printInvalidCommandMessage();\n break;\n }\n }", "void recordExecutionError() {\n hadExecutionError = true;\n }", "public boolean hasFail() {\n return result.hasFail();\n }", "private Step importResults() {\n return stepBuilderFactory.get(STEP_IMPORT_RESULT)\n .tasklet(savingsPotentialImportDataTask)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public void beforeStep(StepExecution stepExecution) {\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n String jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.EXECUTION_MODE.getValue();\n jobContext.put(jobContextKey, getExecutionMode(stepExecution.getJobParameters()));\n\n jobContextKey = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.SCENARIO_KEY.getValue();\n jobContext.put(jobContextKey, getScenarioKey(stepExecution.getJobParameters()));\n }\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n // If execution mode is equal to WATER_IQ, compute consumption clusters\n String mode = getExecutionMode(stepExecution.getJobParameters());\n\n if(mode.equals(MODE_WATER_IQ)) {\n // If data import is successful, compute consumption clusters\n if(stepExecution.getExitStatus().getExitCode().equals(ExitStatus.COMPLETED.getExitCode())) {\n String key = STEP_IMPORT_RESULT +\n Constants.PARAMETER_NAME_DELIMITER +\n SavingsPotentialImportDataTask.EnumInParameter.COMPUTE_CONSUMPTION_CLUSTERS.getValue();\n if(stepExecution.getJobParameters().getString(key, \"true\").equals(\"true\")) {\n schedulerService.launch(\"CONSUMPTION-CLUSTERS\");\n }\n }\n }\n\n return null;\n }\n })\n .build();\n }", "@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }", "private void handleException(Throwable throwable,\n ITestNGMethod testMethod,\n ITestResult testResult,\n int failureCount) {\n testResult.setThrowable(throwable);\n int successPercentage= testMethod.getSuccessPercentage();\n int invocationCount= testMethod.getInvocationCount();\n float numberOfTestsThatCanFail= ((100 - successPercentage) * invocationCount) / 100;\n\n if(failureCount < numberOfTestsThatCanFail) {\n testResult.setStatus(ITestResult.SUCCESS_PERCENTAGE_FAILURE);\n }\n else {\n testResult.setStatus(ITestResult.FAILURE);\n }\n\n }", "@Override\n public void run() {\n if (checkFailure()) {\n throw new InvalidInputException(\"任务结果计算器暂时无法工作,因为未满足条件\");\n } else {\n analysisDistribution();\n File file = writeFile();\n task.setResult(OSSWriter.upload(file));\n task.setHasResult(true);\n taskController.update(task);\n }\n }", "@Override\n\tpublic boolean retry(ITestResult result) {\n\n if (!result.isSuccess()) { //Check if test not succeed\n if (count < maxTry) { //Check if maxtry count is reached\n count++; //Increase the maxTry count by 1\n System.out.println(\"is this working?\"); \n result.setStatus(ITestResult.FAILURE); //Mark test as failed\n return true; //Tells TestNG to re-run the test\n } else {\n result.setStatus(ITestResult.FAILURE); //If maxCount reached,test marked as failed\n }\n }\n else {\n result.setStatus(ITestResult.SUCCESS); //If test passes, TestNG marks it as passed\n }\n return false;\n\t}", "private void updateStatus(boolean success) {\n if (success) {\n try {\n callSP(buildSPCall(MODIFY_STATUS_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with modify entries. \", exception);\n }\n\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n } else {\n try {\n callSP(buildSPCall(COMPLETE_STATUS_PROC, success));\n } catch (SQLException exception) {\n logger.error(\"Error updating dataset_system_log with for merge completion. \",\n exception);\n }\n }\n }", "private void setTaskNothing(ITaskCluster taskCluster, ICommonTask task, Object taskServiceResult, Throwable throwable) {\n getTaskManagerConfiguration().getTaskManagerWriter().saveNothingTask(taskCluster, task, taskServiceResult, throwable);\n\n onNothingTasks(taskCluster, Collections.singletonList(task));\n }", "@Override\n\t\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\t\n\t\t}", "abstract protected void reportResult(Result result);", "public void setResult() {\n }", "@Override\n public boolean continuePastError() {\n return false;\n }", "protected abstract void executeActionsIfError();", "void markFailed(Execution execution, Throwable cause);", "public boolean isIfTaskFails() {\n return getFlow().isIfTaskFails();\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}", "public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}", "@Override\n public void onFailure(Throwable t) {\n isSucessful.compareAndSet(true, false);\n failedMessages.put(id.getName(), t.getMessage());\n handleIfFinished(t, isSucessful.get());\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "public MatchOther processResult(ResultItems resultItems, Task task);", "@Override\n\tprotected void setAllResultsToPar() {\n\t}", "@Override\n\tpublic void notifyFailure(ResourceOperationDescription operationDescription, Task task, OperationResult parentResult) {\n\t\tnotifyAny(operationDescription);\n\t}", "private void writeSpecificResult(GroupOfLogs res) throws ServiceFailureException {\r\n writeStartOfElement(\"Log\");\r\n \r\n if(res.getType().compareTo(\"Error\") == 0 || res.getType().compareTo(\"Critical\") == 0) {\r\n writeElementWithCharacters(\"info\", removeNonValidXMLCharacters(res.getIdentity()));\r\n } else {\r\n writeElementWithCharacters(\"info\", String.valueOf(res.getIdentity()));\r\n }\r\n \r\n writeElementWithCharacters(\"startID\", String.valueOf(res.getStartID()));\r\n writeElementWithCharacters(\"endID\", String.valueOf(res.getEndID()));\r\n writeElementWithCharacters(\"startDate\", res.getStartDate());\r\n writeElementWithCharacters(\"endDate\", res.getEndDate());\r\n writeElementWithCharacters(\"module\", String.valueOf(res.getModule()));\r\n writeElementWithCharacters(\"level\", String.valueOf(res.getLevel()));\r\n writeElementWithCharacters(\"type\", res.getType());\r\n writeElementWithCharacters(\"tid\", String.valueOf(res.getThreadID()));\r\n writeElementWithCharacters(\"pid\", String.valueOf(res.getProcessID()));\r\n writeElementWithCharacters(\"count\", String.valueOf(res.getCount()));\r\n writeEndOfElement();\r\n }", "List<ExceptionAndTasks> getFailedTasksAndExceptions();", "public void performBatchComplete() {\n ArrayList arrayList = new ArrayList(this.batch);\n this.batch.clear();\n this.mainThreadHandler.sendMessage(this.mainThreadHandler.obtainMessage(8, arrayList));\n logBatch(arrayList);\n }", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\tlogger.info(\"onTestFailedButWithinSuccessPercentage \" + result.getName());\n\t}", "@Override\n protected void runOneIteration() throws Exception {\n }", "protected void _oneParameterCommandsResults(RemoteResults results){\n\t\tsetRecordProcessed(true);\n\t\tint statusCode = droiddata.getStatusCode();\t\t\n\t\tif(statusCode==StatusCodes.NO_SCRIPT_FAILURE){\n\t\t\tif(processResourceMessageInfoResults(PASSED_MESSAGE)) \n\t\t\t\treturn;\n\t\t\tif(props.containsKey(SAFSMessage.PARAM_1)){\n\t\t\t\tissuePassedSuccessUsing(props.getProperty(SAFSMessage.PARAM_1));\n\t\t\t}else{\n\t\t\t\tissuePassedSuccess(\"\");// no additional comment\n\t\t\t}\n\t\t}\n\t\telse if(statusCode==StatusCodes.SCRIPT_NOT_EXECUTED){\n\t\t\t// driver will log warning...\n\t\t\tsetRecordProcessed(false);\n\t\t}\n\t\telse{ //object not found? what?\t\t\n\t\t\tlogResourceMessageFailure();\n\t\t}\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestFailedButWithinSuccessPercentage :\"+result.getName());\r\n\t}", "public boolean process() {\n\t\t// waits 5 milliseconds(simulates a slow task, such as accessing a remote system)\n\t\ttry {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// error every 10 transactions\n\t\tboolean success = id % 10 != 0;\n\t\tlogger.debug(\"Transaction processed: \" + id + \"; Result: \" + success);\n\t\treturn success;\n\t}", "@Test\n public void testWithNoFailures() throws Exception {\n int streamSegmentCount = 50;\n int transactionsPerStreamSegment = 2;\n int appendsPerStreamSegment = 20;\n boolean mergeTransactions = true;\n boolean sealStreamSegments = true;\n\n @Cleanup\n TestContext context = new TestContext();\n\n // Generate some test data.\n HashSet<Long> streamSegmentIds = createStreamSegmentsInMetadata(streamSegmentCount, context.metadata);\n AbstractMap<Long, Long> transactions = createTransactionsInMetadata(streamSegmentIds, transactionsPerStreamSegment, context.metadata);\n List<Operation> operations = generateOperations(streamSegmentIds, transactions, appendsPerStreamSegment,\n METADATA_CHECKPOINT_EVERY, mergeTransactions, sealStreamSegments);\n\n // Setup an OperationProcessor and start it.\n @Cleanup\n TestDurableDataLog dataLog = TestDurableDataLog.create(CONTAINER_ID, MAX_DATA_LOG_APPEND_SIZE, executorService());\n dataLog.initialize(TIMEOUT);\n @Cleanup\n OperationProcessor operationProcessor = new OperationProcessor(context.metadata, context.stateUpdater,\n dataLog, getNoOpCheckpointPolicy(), executorService());\n operationProcessor.startAsync().awaitRunning();\n\n // Process all generated operations.\n List<OperationWithCompletion> completionFutures = processOperations(operations, operationProcessor);\n\n // Wait for all such operations to complete. If any of them failed, this will fail too and report the exception.\n OperationWithCompletion.allOf(completionFutures).join();\n\n performLogOperationChecks(completionFutures, context.memoryLog, dataLog, context.metadata);\n performMetadataChecks(streamSegmentIds, new HashSet<>(), transactions, completionFutures, context.metadata, mergeTransactions, sealStreamSegments);\n performReadIndexChecks(completionFutures, context.readIndex);\n operationProcessor.stopAsync().awaitTerminated();\n }", "@Override\n public void testTaskManagerFailure(\n TestEnvironment testEnv,\n ExternalContext<RowData> externalContext,\n ClusterControllable controller)\n throws Exception {\n }", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "protected void succeed() throws InvalidKeyException {\n task.succeed();\n }", "private static void testFail() throws Throwable {\n Scheduler userInt = SchedulerTHelper.getSchedulerInterface();\n\n for (int i = 0; i < jobs_fail; i++) {\n String job_path = new File(jobs_path.toURI()).getAbsolutePath() + \"/flow_fail_\" + (i + 1) +\n \".xml\";\n\n Exception exc = null;\n JobId job = null;\n try {\n job = userInt.submit(JobFactory.getFactory().createJob(job_path));\n } catch (Exception e) {\n exc = e;\n }\n Assert\n .assertTrue(\"Job \" + job_path + \" was supposed to be rejected but was created\",\n job == null);\n Assert.assertTrue(exc != null);\n }\n SchedulerTHelper.log(jobs_fail + \" invalid jobs successfully rejected\");\n }", "public void fail() {\r\n\t\tcontestantIt.currentC().updatePoints(-FAIL);\r\n\t}", "@Override\n\tpublic String enableBulk() throws Throwable {\n\t\treturn null;\n\t}", "void setFailed(Throwable lastFailure);", "private int justifyResult(String[] cmdResult, String serial) {\n\n TaskRepo tr = new TaskRepo();\n String resultDir = tr.getResultDir(serial);\n\n if (StringUtils.isBlank(resultDir)) {\n return 404;\n }\n\n List<String> lines = new ArrayList<>();\n // 将结果输出至文件\n if (StringUtils.isNotBlank(cmdResult[0])) {\n String logFile = resultDir + \"asm.log\";\n String[] logs = cmdResult[0].split(\"\\n\");\n //System.out.println(\"task:\" + this.task);\n if (logs.length > 0) {\n Collections.addAll(lines, logs);\n FileUtil.writeFile(logFile, lines);\n }\n }\n\n if (StringUtils.isNotBlank(cmdResult[1])) {\n String errFile = resultDir + \"asm.err\";\n String[] err = cmdResult[1].split(\"\\n\");\n if (err.length > 0) {\n lines = new ArrayList<>();\n Collections.addAll(lines, err);\n FileUtil.writeFile(errFile, lines);\n }\n }\n\n String evFile = resultDir + \"exit.value\";\n String ev = cmdResult[2];\n int exitValue = -1;\n if (StringUtils.isNotBlank(ev) && StringHelper.isDigital(ev)) {\n exitValue = Integer.parseInt(ev);\n }\n //System.out.println(\"result: \" + ev + \", \" + String.valueOf(exitValue));\n lines = new ArrayList<>();\n lines.add(ev);\n FileUtil.writeFile(evFile, lines);\n if (System.getProperties().getProperty(\"os.name\").toLowerCase().contains(\"linux\")) {\n String filenameWithPath = resultDir + \"LOG.txt\";\n File f = new File(filenameWithPath);\n if (!f.exists()) {\n return 404;\n }\n\n lines = FileUtil.readFileContent(filenameWithPath, \"UTF-8\");\n if (lines.size() == 0) {\n return 404;\n }\n// if(this.task.getType().equals(\"ASM\")){\n// System.out.println(\"It is ASM!!!!!!!!!!!!!!!!!!!!!!!!!\");\n// for(String line : lines){\n// System.out.println(line);\n// if(line.contains(\"QC FAIL\")){\n// return 61;\n// }\n// }\n// }\n String lastLine = lines.get(lines.size() - 1);\n /*String[] output = cmdResult[0].split(\"\\n\");\n String lastLine = output[output.length - 1];*/\n System.out.println(\"last line: \" + lastLine);\n\n if (StringUtils.isBlank(lastLine) || !lastLine.contains(\"Finished\")) {\n return 404;\n } else if(cmdResult[2].equals(\"61\")){\n return 61;\n }\n else{\n return 60;\n }\n } else {\n switch (exitValue) {\n case 0:\n return 60;\n default:\n return 404;\n }\n }\n }", "@Override\n public boolean onStepThrowable(FlowStep flowStep , Throwable throwable) {\n HadoopStepStats stats = (HadoopStepStats)flowStep.getFlowStepStats();\n String jobName = flowStep.getName();\n\n //get job node\n DAGNode<CascadingJob> node = dagNodeNameMap.get(jobName);\n if (node == null) {\n log.warn(\"Unrecognized jobId reported for succeeded job: \" + stats.getJobID());\n return false;\n }\n addCompletedJobStats(node.getJob(), stats);\n pushEvent(currentFlowId, new Event.JobFailedEvent(node));\n return false;\n }", "private static void setFailed() {\n HealthCheck.failed = true;\n }", "public boolean abortOnFristJobFailure() {\n return mFailOnFirstError;\n }", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void failstestProcessCompressedFile() {\n TestWARCBatchJob job = new TestWARCBatchJob();\n job.processFile(WARC_GZ_FILE, new ByteArrayOutputStream());\n Exception[] es = job.getExceptionArray();\n printExceptions(es);\n assertEquals(\"Batching compressed file should give expected \"\n + \"number of records\",\n 66, processed);\n assertEquals(\"Batching compressed file should not throw exceptions\",\n 0, es.length);\n }", "protected void afterRecipeCheckFailed() {\n cleanOrExplode();\n\n for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) {\n data.q = null;\n }\n\n mOutputItems = null;\n mOutputFluids = null;\n mEfficiency = 0;\n mEfficiencyIncrease = 0;\n mProgresstime = 0;\n mMaxProgresstime = 0;\n eAvailableData = 0;\n //getBaseMetaTileEntity().disableWorking(); //can add in override\n //hatchesStatusUpdate_EM(); //called always after recipe checks\n }", "@Override\n boolean canFail() {\n return true;\n }", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult Result) {\n\t\t\r\n\t}", "void tryAddLogToBatch(TelemetryData log);", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Test\n public void workerRegisterBatchThrowsError() throws Exception {\n BrokenBlockMaster brokenBlockMaster = new BrokenBlockMaster(\n mMetricsMaster, mMasterContext, mClock,\n ExecutorServiceFactories.constantExecutorServiceFactory(mExecutorService),\n WorkerRegisterMode.ERROR_STREAM);\n mBlockMaster = brokenBlockMaster;\n mHandler = new BlockMasterWorkerServiceHandler(brokenBlockMaster);\n\n long workerId = brokenBlockMaster.getWorkerId(NET_ADDRESS_1);\n Queue<Throwable> errorQueue = new ConcurrentLinkedQueue<>();\n RegisterStreamObserver streamOb =\n new RegisterStreamObserver(brokenBlockMaster,\n getErrorCapturingResponseObserver(errorQueue));\n\n // Generate requests\n List<RegisterWorkerPRequest> requestChunks =\n RegisterStreamTestUtils.generateRegisterStreamForWorker(workerId);\n prepareBlocksOnMaster(requestChunks);\n for (RegisterWorkerPRequest chunk : requestChunks) {\n streamOb.onNext(chunk);\n }\n streamOb.onCompleted();\n // All requests except the 1st one + onCompleted should receive an error\n assertEquals(requestChunks.size() - 1 + 1, errorQueue.size());\n\n // The BlockMaster is not throwing error this time\n brokenBlockMaster.setCorrect();\n verifyWorkerCanReregister(workerId, requestChunks, TIER_BLOCK_TOTAL);\n }" ]
[ "0.5979888", "0.5866411", "0.5739288", "0.5649034", "0.56415594", "0.5543051", "0.5508085", "0.54955477", "0.54851055", "0.5449456", "0.54437697", "0.5409512", "0.540539", "0.5396336", "0.5372541", "0.5372541", "0.5366851", "0.5364257", "0.53632957", "0.53401417", "0.5333659", "0.5321485", "0.5319818", "0.53114873", "0.531063", "0.5296812", "0.52730095", "0.5272714", "0.5255791", "0.52405006", "0.52395654", "0.5233833", "0.5231694", "0.5216519", "0.52153116", "0.52114904", "0.521146", "0.52111465", "0.52078235", "0.518732", "0.5171453", "0.51710415", "0.51691175", "0.51575637", "0.513969", "0.5135586", "0.5122424", "0.51222205", "0.5114228", "0.510822", "0.51019657", "0.50973207", "0.5096123", "0.50950825", "0.5093328", "0.5091332", "0.50894827", "0.5083606", "0.50811946", "0.50761896", "0.5060543", "0.50566006", "0.5054176", "0.50441974", "0.50385916", "0.503289", "0.5032149", "0.5029675", "0.50295043", "0.50273633", "0.5022805", "0.5022317", "0.5022317", "0.5022317", "0.5022317", "0.50180876", "0.5015509", "0.5013162", "0.5010335", "0.5008517", "0.50062805", "0.50055015", "0.5005336", "0.50022167", "0.5001973", "0.5001973", "0.5001973", "0.50009495", "0.5000428", "0.49995282", "0.49955988", "0.49864584", "0.4986412", "0.4986412", "0.4986412", "0.4986412", "0.4986412", "0.4986412", "0.4986412", "0.49853733" ]
0.5252943
29
singlethreaded: started when totalQueueSize transitions from 0 to 1 and keeps calling itself until the queue is drained.
private void forkQueueProcessor() { if (lifecycle.started() == false) { drainQueueOnRejection(new FailedToCommitClusterStateException("node closed", getRejectionException())); return; } assert totalQueueSize.get() > 0; final var threadContext = threadPool.getThreadContext(); try (var ignored = threadContext.stashContext()) { threadContext.markAsSystemContext(); threadPoolExecutor.execute(queuesProcessor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n\t\twhile (true) {\n\t\t\tif (queue.size() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\tconsume();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tqueueEfficency.set(0);\n\t\t\t\temptyQueueTime = 0;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n while (queue.num < 100) {\n try {\n queue.producer();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n }", "private void workOnQueue() {\n }", "protected abstract long waitOnQueue();", "void runQueue();", "@Override\r\n\tpublic void run() {\n\t\tint i=0;\r\n\t\twhile(i<1000) {\r\n\t\t\tq.get();\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\r\npublic void run() {\n\tfor (int i = 0; i < 10; i++) {\r\n\t\ttry {\r\n\t\t\tbQueue.take();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"------苹果的数量是:\"+\" \"+\" \"+bQueue.size());\r\n\t}\r\n}", "public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void run() {\n\t\tvfBest();\r\n\t\tif(currQSize > maxQSize){\r\n\t\t\tDTS(Prey.currentTrajectory.peek().qCounter,vFBestNode.qCounter);\r\n\t\t\tSystem.out.println(\"Queue Cut\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\tqueue.get();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void run() {\n\t\tint i=0;\r\n\t\twhile(i<1000) {\r\n\t\t\tq.put(i++);\r\n\t\t}\r\n\t}", "public void run() {\t\t\t\n\t\tItem item = null;\n\t\twhile (isAlive) {\n\t\t\ttry {\n\t\t\t\titem = queue.take();\n\t\t\t\tif (item == null) {\n\t\t\t\t\t_logger.error(\"Item is null.\");\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tlastAction = 1;\n\t\t\t\t\tlastAccess = System.currentTimeMillis();\n\t\t\t\t\titemsConsumed++;\n\t\t\t\t\t\n\t\t\t\t\tprocess(item);\n\t\t\t\t}\n\t\t\t} catch(IOException e) {\n\t\t\t\t_logger.error(e);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t_logger.error(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//empty queue before exit \n\t\twhile ((item = queue.poll()) != null) {\n\t\t\ttry {\n\t\t\t\tprocess(item);\n\t\t\t} catch (IOException e) {\n\t\t\t\t_logger.error(e);\n\t\t\t}\n\t\t}\n\t}", "public void run() {\r\n while(true) { // outer loop\r\n if(first) // we already have the queue CAS acquired\r\n first=false;\r\n else {\r\n if(!queue.acquire())\r\n return;\r\n }\r\n\r\n try {\r\n Message msg_to_deliver;\r\n while((msg_to_deliver=queue.remove()) != null) { // inner loop\r\n try {\r\n up_prot.up(new Event(Event.MSG, msg_to_deliver));\r\n }\r\n catch(Throwable t) {\r\n log.error(\"couldn't deliver message \" + msg_to_deliver, t);\r\n }\r\n }\r\n }\r\n finally {\r\n queue.release();\r\n }\r\n\r\n // although ConcurrentLinkedQueue.size() iterates through the list, this is not costly,\r\n // as at this point, the queue is almost always empty, or has only a few elements\r\n if(queue.size() == 0) // prevents a concurrent add() (which returned) to leave a dangling message in the queue\r\n break;\r\n }\r\n }", "public final void execute() {\n thread = Thread.currentThread();\n while (!queue.isEmpty()) {\n if (currentThreads.get() < maxThreads) {\n queue.remove(0).start();\n currentThreads.incrementAndGet();\n } else {\n try {\n Thread.sleep(Long.MAX_VALUE);\n } catch (InterruptedException ex) {}\n }\n }\n while (currentThreads.get() > 0) {\n try {\n Thread.sleep(Long.MAX_VALUE);\n } catch (InterruptedException ex) {}\n }\n }", "private void growQueue() {\n Runnable[] oldQ = queue;\n int oldSize = oldQ.length;\n int newSize = oldSize << 1;\n if (newSize > MAXIMUM_QUEUE_CAPACITY)\n throw new RejectedExecutionException(\"Queue capacity exceeded\");\n Runnable[] newQ = queue = new Runnable[newSize];\n\n int b = base;\n int bf = b + oldSize;\n int oldMask = oldSize - 1;\n int newMask = newSize - 1;\n do {\n int oldIndex = b & oldMask;\n Runnable t = oldQ[oldIndex];\n if (t != null && !casSlotNull(oldQ, oldIndex, t))\n t = null;\n setSlot(newQ, b & newMask, t);\n } while (++b != bf);\n pool.signalWork();\n }", "public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}", "private void growQueue() {\n int newSize = (int)(QUEUE.length * 1.5f);\n \n Logger.log(\"INFO\", \"Queue is full, growing to new size: \" + Integer.toString(newSize));\n \n Object[] newQueue = new Object[newSize];\n lockQueue();\n copyQueue(newQueue);\n unlockQueue();\n }", "private void queueResize() {\n queue = Arrays.copyOf(queue, queue.length + 1);\n }", "@Override\n public void run() {\n if (this.runQueueProcessor.get()) {\n try {\n // wait until we are ready to run again\n if (this.tools.getTimestamp() >= this.runAgainAfterMs.get()) {\n\n long timeNow = this.tools.getTimestamp();\n long sinceLastRun = timeNow - this.lastRun;\n long sinceLastKick = timeNow - this.lastKicked;\n\n boolean kicked = sinceLastRun > sinceLastKick;\n double secondsSinceLastRun = sinceLastRun / 1000.0;\n LogMap logmap = LogMap.map(\"Op\", \"queuecheck\")\n .put(\"gap\", secondsSinceLastRun)\n .put(\"kicked\", kicked);\n this.logger.logDebug(this.logFrom, String.format(\"queue check: last check was %.1fs ago%s\",\n secondsSinceLastRun,\n (kicked) ? String.format(\", kicked %.1fs ago\", sinceLastKick / 1000.0) : \"\"),\n logmap);\n this.lastRun = timeNow;\n\n // by default, wait a small amount of time to check again\n // this may be changed inside processQueue\n queueCheckAgainAfter(this.config.getProcessQueueIntervalDefault());\n\n // process queue now\n processQueue();\n }\n } catch (Exception e) {\n this.logger.logException(this.logFrom, e);\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tTask t = bq.take();\n\n\t\t\t\t\n\t\t\t\tThread.sleep(t.getProcessTime() * 1000);\n\t\t\t\twaitingTime.addAndGet((-1) * t.getProcessTime());\n\t\t\t\tSimulator.getFrame().displayData(\"Client \"+t.getNr()+\" left. \\n\");\n\t\t\t\tsize--;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "void queueShrunk();", "public static void iterate() {\n\t\tif( !threadQueue.isEmpty() ) {\n\t\t\temptyReported = false;\n\t\t\tLogger.debug(\"Threads in queue: \" + threadQueue.size(), true);\n\t\t\ttry {\n\t\t\t\tthreadQueue.remove(0).start();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse if( !emptyReported ) {\n\t\t\tLogger.debug(\"Thread queue empty.\", true);\n\t\t\temptyReported = true;\n\t\t}\n\t}", "protected void onQueued() {}", "public void run(){\n // first register the producer\n m_DirectoryQueue.registerProducer();\n\n enqueueFiles(f_Root);\n\n //lastly unregister the producer\n m_DirectoryQueue.unregisterProducer();\n }", "public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}", "@Override\n\tpublic void run() {\t\n\t\tint maxNum = (maxCustomerNumOnline > maxCustomerNumShop) ? maxCustomerNumOnline : maxCustomerNumShop;\n\t\t\n\t\tfor(int i = 0; i < maxNum; i++) {\n\t\t\t// every number of milliseconds, add customer to end of queue \n\t\t\ttry {\t\t\t\n\t\t\t\t// if online queue exists add to it \n\t\t\t\tif (i < maxCustomerNumOnline) {\n\t\t\t\t\tCustomerQueueOutput out = onlineQueue.addToQueue();\n\t\t\t\t\tCoffeeShop.customerList.put(out.getCustomer().getId(), out.getCustomer());\n\t\t\t\t\t\n\t\t\t\t\tlog.updateLog(\"[QueueHandler]: \"+ \"Queue Handler added customer \" + out.getCustomer().getName() + \n\t\t\t\t\t\t\t\" (ID: \" + out.getCustomer().getId() + \") to online queue -> updated size: \" \n\t\t\t\t\t\t\t+ out.getUpdatedSize());\n\t\t\t\t}\n\n\t\t\t\tif (i < maxCustomerNumShop) {\n\t\t\t\t\t// add to in-shop queue \n\t\t\t\t\tCustomerQueueOutput out = shopQueue.addToQueue();\n\t\t\t\t\tCoffeeShop.customerList.put(out.getCustomer().getId(), out.getCustomer());\n\t\t\t\t\t\n\t\t\t\t\tlog.updateLog(\"[QueueHandler]: \"+ \"Queue Handler added customer \" + out.getCustomer().getName() + \n\t\t\t\t\t\t\t\" (ID: \" + out.getCustomer().getId() + \") to in-shop queue -> updated size: \" \n\t\t\t\t\t\t\t+ out.getUpdatedSize());\n\t\t\t\t}\t\t\t\t\t\t\n\n\t\t\t\t// delay for visualization purposes \n\t\t\t\tThread.sleep(onlineQueue.getDelay());\n\t\t\t\t\n\t\t\t// catch exception for calling sleep() function\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlog.updateLog(\"[QueueHandler]: \"+ \"Interuption in queueHandler\");\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\t\t\n\t}", "@Override\n public void flush() {\n new QueueConsumer().run();\n }", "private Queue(){\r\n\t\tgenerateQueue();\r\n\t}", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "void processQueue();", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\twhile(true){\n\t\t\t\tsemaphore.acquire();\n\t\t\t\twhile(list.size()<10){\n\t\t\t\t\tlist.add(1);\n\t\t\t\t\tSystem.out.println(\"生产者放入一个产品,目前有\"+list.size()+\"个产品\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"队列满\"+\"等待消费者消费\");\n\t\t\t\tsemaphore.release();\n\t\t\t\tThread.sleep(500);\n\t\t\t\t}\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}", "public void start() {\n\t\tcheckIsDisposed();\n\n\t\tif (isStarted)\n\t\t\treturn;\n\n\t\tqueueThread.start();\n\t\tisStarted = true;\n\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\tsuper.run();\r\n\t\t\twhile(bPlayAudioQueue){\r\n\t\t\t\tplayFromAudioQueue();\r\n\t\t\t}\r\n\t\t}", "public void run() {\n\n\t\tQueueObject qO = null;\n\t\tQueueRUNNING = true;\n\t\tint iNext = -1;\n\t\t// if not RUNNING, then check queue\n\t\t// get next object\n\t\t// set to running\n\n\t\twhile (TRUE) {\n\n\t\t\tif (QueueRUNNING) {\n\t\t\t\t//date = new Date();\n\n\t\t\t\t// don't get next job until free in run queue, except for\n\t\t\t\t// standard jobs\n\t\t\t\tif (!bRunning)\n\t\t\t\t\tiNext = Queue.getNextJobToRun();\n\n\t\t\t\tif ((!bRunning) && (iNext != Globals.NOT_FOUND)) {\n\t\t\t\t\tqO = Queue.get(iNext);\n\n\t\t\t\t\tint id = qO.getID();\n\t\t\t\t\tqO.setStart(); // update the object\n\t\t\t\t\tQueue.set(iNext, qO); // update the object in the queue\n\n\t\t\t\t\tif (id == SITEMAP) {\n\t\t\t\t\t\tbRunning = true;\n\t\t\t\t\t\tsiteMap = new SiteMapThread(qO.getJobID());\n\t\t\t\t\t\tsiteMap.start();\n\t\t\t\t\t}\n//\t\t\t\t\tif (id == CHECK_NEW_PHOTOS) {\n//\t\t\t\t\t\tcheck = new CheckDirectoryStructure(qO.getJobID());\n//\t\t\t\t\t\tcheck.start();\n//\t\t\t\t\t}\n//\t\t\t\t\tif (id == RASTERIZE) {\n//\t\t\t\t\t\trasterize = new WatchRastQueue(qO.getJobID());\n//\t\t\t\t\t\trasterize.start();\n//\t\t\t\t\t}\n\n//\t\t\t\t\tif (id == XMLUPDATE) {\n//\t\t\t\t\t\txmlUpdate = new WatchXMLQueue(qO.getJobID());\n//\t\t\t\t\t\txmlUpdate.start();\n//\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLogging.info(this.getClass().getName(), \"Queue is not running.\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(10000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tLogging.error(e);\n\t\t\t}\n\n\t\t\tif (ABORT_ID != -100) {\n\t\t\t\tQueueObject qTemp = Queue.get(ABORT_ID);\n\t\t\t\tif (qTemp.getJobID() == ABORT_ID) {\n\t\t\t\t\tLogging.info(this.getClass().getName(), \"Aborting: \" + ABORT_ID);\n\t\t\t\t\tLogging.info(this.getClass().getName(), \"Type: \" + qO.getID());\n\t\t\t\t\tswitch (qTemp.getID()) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tsiteMap.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n//\t\t\t\t\t\tcheck.interrupt();\n//\t\t\t\t\t\tcheck.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n//\t\t\t\t\t\trasterize.interrupt();\n//\t\t\t\t\t\trasterize.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n//\t\t\t\t\t\txmlUpdate.interrupt();\n//\t\t\t\t\t\txmlUpdate.Abort();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tABORT_ID = -100; // reset ID\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n public void run() {\n ICBlock currentBlock = null;\n\n while (running) {\n try {\n currentBlock = mQueue.take();\n currentBlock.doAction();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n\n }\n\n\n }", "public boolean isFull() { return front == (rear + 1) % MAX_QUEUE_SIZE; }", "private void updateQueueSize() {\n\t\tsims.minQS = state.queueSize < sims.minQS ? state.queueSize : sims.minQS;\n\t\tsims.maxQS = state.queueSize > sims.maxQS ? state.queueSize : sims.maxQS;\n\t}", "public int queue() \n { return waiting; }", "protected synchronized void populateQueue() throws IOException {\n\t\twhile (m_queueLength < m_queue.length) {\n\t\t\tint off = (m_queuePosition + m_queueLength) % m_queue.length;\n\t\t\tint len = Math.min(m_queue.length - m_queueLength, m_queue.length\n\t\t\t\t\t- off);\n\n\t\t\tint i = m_reader.read(m_queue, off, len);\n\t\t\tif (i == -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tm_queueLength += i;\n\t\t}\n\t}", "public void run() {\n\t\twhile (!isShutdown()) {\n\t\t\tlong threadId = Thread.currentThread().getId(); \n\t\t\tSystem.out.println(\"Thread \" + threadId + \" is trying to dequeue from queue of size \" + taskQueue.size());\n\t\t\tRunnable task = taskQueue.dequeue();\n\t\t\ttask.run(); \n\t\t}\n\t}", "public void testDrainTo() {\n SynchronousQueue q = new SynchronousQueue();\n ArrayList l = new ArrayList();\n q.drainTo(l);\n assertEquals(q.size(), 0);\n assertEquals(l.size(), 0);\n }", "@Override\r\n public void run() {\r\n \t// increases the internal producers counter of the queue by one.\r\n this.directory_queue.registerProducer();\r\n directory_queue.enqueue(this.root);\r\n try {\r\n \taddPath(this.root);\r\n } catch (IllegalArgumentException e) {\r\n \tSystem.err.println(e.toString());\r\n \t//e.printStackTrace();\r\n }\r\n // Unregisters a producer from the queue.\r\n this.directory_queue.unregisterProducer();\r\n }", "public void initQueue() {\n ListEntry defaultEntry = new ListEntry(0, 0);\n accumulate.add(defaultEntry);\n\n }", "public void testDrainToWithActivePut() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n q.put(new Integer(1));\n } catch (InterruptedException ie){\n threadUnexpectedException();\n }\n }\n });\n try {\n t.start();\n ArrayList l = new ArrayList();\n Thread.sleep(SHORT_DELAY_MS);\n q.drainTo(l);\n assertTrue(l.size() <= 1);\n if (l.size() > 0)\n assertEquals(l.get(0), new Integer(1));\n t.join();\n assertTrue(l.size() <= 1);\n } catch(Exception e){\n unexpectedException();\n }\n }", "private void pollQueue(AtomicLong wip, AtomicLong requested, Queue<Object> queue, Subscriber<? super T> child) {\n if (requested.get() > 0) {\n // only one draining at a time\n try {\n /*\n * This needs to protect against concurrent execution because `request` and `on*` events can come concurrently.\n */\n if (wip.getAndIncrement() == 0) {\n while (true) {\n if (requested.getAndDecrement() != 0) {\n Object o = queue.poll();\n if (o == null) {\n // nothing in queue\n requested.incrementAndGet();\n return;\n }\n on.accept(child, o);\n } else {\n // we hit the end ... so increment back to 0 again\n requested.incrementAndGet();\n return;\n }\n }\n }\n\n } finally {\n wip.decrementAndGet();\n }\n }\n }", "void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }", "public void run() {\n\t\tSystem.out.println(\"fuseAdd\");\n\t\tAddConcurrent1 adder = new AddConcurrent1();\n\t\tValidateFusion validator = new ValidateFusion();\n\t\tint sum = adder.addConcurrent1(sortedSnapshot);\t\t\t \n\t\tvalidator.validate(sum, 2);\n\t\tGlobalInfo.completeThreads++;\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic void run() {\n\t\twhile(true) {\r\n\t\t\tfor(String data:queueData) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void addChannelToReadCompletePendingQueue() {\n/* 354 */ while (!Http2MultiplexHandler.this.readCompletePendingQueue.offer(this)) {\n/* 355 */ Http2MultiplexHandler.this.processPendingReadCompleteQueue();\n/* */ }\n/* */ }", "public SimpleQueue() {\n initQueue(DEFAULT_SIZE);\n WRITE_PTR = 0;\n READ_PTR = 0;\n LAST_READ_TIME = now();\n LAST_WRITE_TIME = now();\n }", "public Boolean lazyQueue();", "@Override\n public synchronized void run() {\n while (true) {\n int nodesInQueue = 0;\n //find nodes for jobs to run on\n Iterator<AmuseJob> iterator = queue.iterator();\n while (iterator.hasNext()) {\n AmuseJob job = iterator.next();\n\n if (job.isPending()) {\n //find nodes to run this job on. Always only a single pilot, but may contain multiple nodes per pilot.\n PilotManager target = pilots.getSuitablePilot(job);\n\n //If suitable nodes are found\n if (target != null) {\n job.start(target);\n //remove this job from the queue\n iterator.remove();\n } else {\n nodesInQueue++;\n }\n } else {\n //remove this job from the queue\n iterator.remove();\n }\n }\n\n if (nodesInQueue > 0) {\n logger.info(\"Now \" + nodesInQueue + \" waiting in queue\");\n }\n \n try {\n wait(5000);\n } catch (InterruptedException e) {\n logger.debug(\"Scheduler thread interrupted, time to quit\");\n return;\n }\n \n \n }\n }", "protected void onStart() {\n // Allocate while starting to improve chances of thread-local\n // isolation\n queue = new Runnable[INITIAL_QUEUE_CAPACITY];\n // Initial value of seed need not be especially random but\n // should differ across threads and must be nonzero\n int p = poolIndex + 1;\n seed = p + (p << 8) + (p << 16) + (p << 24); // spread bits\n }", "public void executeAll()\n {\n this.queue.clear();\n this.queue_set = false;\n this.resetComputation();\n while(executeNext()) {}\n }", "public void testDrainToSelfN() {\n SynchronousQueue q = new SynchronousQueue();\n try {\n q.drainTo(q, 0);\n shouldThrow();\n } catch(IllegalArgumentException success) {\n }\n }", "myQueue(int size){\n }", "private void initialBlockOnMoarRunners() throws InterruptedException\n {\n lock.lock();\n try\n {\n if (taskQueue.isEmpty() && runners > 1)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n }\n }\n finally\n {\n lock.unlock();\n }\n }", "public void onQueue();", "int getQueueSize();", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public void incTotalOfQueueEntries() {\n totalOfQueueEntries++;\n }", "void kickQueueProcessor() {\n\n long timeNow = this.tools.getTimestamp();\n this.lastKicked = timeNow;\n\n // ideally, we would run the queue at this time\n final long latestTimeToRun = timeNow + this.config.getProcessQueueIntervalShort();\n\n // only update the run time if we are bringing it forward not pushing it back\n this.runAgainAfterMs.getAndUpdate(previousTimeToRunNext ->\n (previousTimeToRunNext > latestTimeToRun) ? latestTimeToRun : previousTimeToRunNext);\n }", "public boolean queueFull() {\r\n\t\tif (vehiclesInQueue.size() > maxQueueSize) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@CallByThread(\"Netty EventLoop\")\n @Override\n public void run() {\n if (referenced > 0) { // is blocking\n incomingPublishService.drain();\n }\n }", "@Override\n public void run() {\n if (MyDebug.LOG) {\n Log.d(TAG, \"take next continuous burst\");\n Log.d(TAG, \"continuous_burst_in_progress: \" + continuous_burst_in_progress);\n Log.d(TAG, \"n_burst: \" + n_burst);\n }\n if (n_burst >= 10 || n_burst_raw >= 10) {\n // Nokia 8 in std mode without post-processing options doesn't hit this limit (we only hit this\n // if it's set to \"n_burst >= 5\")\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for continuous burst, as waiting for too many photos\");\n }\n //throw new RuntimeException(); // test\n handler.postDelayed(this, continuous_burst_rate_ms);\n } else if (picture_cb.imageQueueWouldBlock(n_burst_raw, n_burst + 1)) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"...but wait for continuous burst, as image queue would block\");\n }\n //throw new RuntimeException(); // test\n handler.postDelayed(this, continuous_burst_rate_ms);\n } else {\n takePictureBurst(true);\n }\n }", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "public synchronized void enqueue(T thing) {\r\n\t\twhile (queue.size()==maxSize){\r\n\t\t\ttry{\r\n\t\t\t\tthis.wait();\r\n\t\t\t} catch(InterruptedException e){\r\n\t\t\t\tSystem.out.println(\"Interruption during enqueue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tqueue.addLast(thing);\r\n\t\tthis.notifyAll();\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(runFlg){\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\twhile(mQueue.getSize() >0 ){\n\t\t\t\t\t\tbyte[] data = getData();\n\t\t\t\t\t\tmOut.write(data);\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tLog.e(TAG,e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private synchronized void execute(TestRunnerThread testRunnerThread) {\n boolean hasSpace = false;\n while(!hasSpace) {\n threadLock.lock();\n try {\n hasSpace = currentThreads.size()<capacity;\n }\n finally {\n threadLock.unlock();\n }\n }\n \n //Adding thread to list and executing it\n threadLock.lock();\n try {\n currentThreads.add(testRunnerThread);\n testRunnerThread.setThreadPoolListener(this);\n Thread thread = new Thread(testRunnerThread);\n //System.out.println(\"Starting thread for \"+testRunnerThread.getTestRunner().getTestName());\n thread.start();\n }\n finally {\n threadLock.unlock();\n }\n }", "@Override\n public void run() {\n try {\n //noinspection InfiniteLoopStatement\n while (true) {\n int number = random.nextInt(4097);\n boolean successful;\n\n do {\n successful = buffer.add(number);\n\n if (successful) {\n continue;\n }\n\n // If we were not successful, wait until the size of the collection changes and try again.\n // We wait by acquiring a semaphore a first time and then a second time. The semaphore is released\n // in sizeChanged(IntBuffer), which enables the semaphore to be acquired that second time.\n semaphore.acquire();\n semaphore.acquire();\n\n // Now that we have the semaphore, release it so we \"clean up after ourselves,\" and try again.\n semaphore.release();\n } while(!successful);\n }\n\n } catch (InterruptedException ignored) {\n // Exit method because this thread was interrupted\n }\n }", "public void run ()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep (ageLimit);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tif (threads.size () > threadMinimum)\n\t\t\t\t{\n\t\t\t\t\tint theThreadCount = threads.size ();\n\t\t\t\t\tthreads.filteredRemoval (new I_QueueFilter ()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpublic boolean filter (Object aPayload)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tboolean retVal = false;\n\t\t\t\t\t\t\t\tif (threadCount > threadMinimum &&\n\t\t\t\t\t\t\t\t\taPayload != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tA_MessageThread theThread = (A_MessageThread) aPayload;\n\t\t\t\t\t\t\t\t\tretVal = theThread.tryThreadShutdown (ageLimit);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn retVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\tif (theThreadCount != threads.size ())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotifyThreadListeners (threadCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public CircularArrayQueue() {\n\t\tthis(QUEUESIZE);\t// constructs queue with default queue size\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\tIterator<Future<Integer>> iter = runningThreadsList.iterator();\n\t\t\tif (iter.hasNext()) {\n\t\t\t\tFuture<Integer> future = (Future<Integer>) iter.next();\n\t\t\t\tif (future.isDone()) {\n\t\t\t\t\trunningThreadsList.remove(future);\n\t\t\t\t\t\n\t\t\t\t\tif (allocator.getInventory().isEmpty()) {\n\t\t\t\t\t\tallocator.shutdown();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tThread.yield();\n\t\t}\n\t\t\t\n\t\t\n\t}", "public synchronized void enqueue(Object msg) {\n\t\tqueue.add(msg);\n\n\t\t// if any threads wait on empty queue then wake them up\n\t\tnotifyAll();\n\t}", "@Override\n\tpublic void run() {\n\t\tIterable<Page> allPages = new Pages(this.numPages, this.fileName);\n\t\tfor (Page pg : allPages) {\n\t\t\ttry {\n\t\t\t\tqueue.put(pg);\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\t\n\t\tfor(int i=0;i<this.numThread;i++){\n\t\t\ttry {\n\t\t\t\tqueue.put(new PoisonPill());\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}", "@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}", "@Override\r\n\tpublic void run() {\n\t\twhile (true) {\r\n\t\t\tsynchronized (this.queue) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\tqObj = queue.getQueue().peek();\r\n\t\t\t\t\tif (qObj != null && qObj instanceof String) {\r\n\t\t\t\t\t\tString t = (String) queue.getQueue().poll();\r\n\t\t\t\t\t\tSystem.out.println(\"TextProcessor:\" + t + \"\\tsize: \" + queue.getQueue().size());\r\n\t\t\t\t\t\tqueue.notifyAll();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tqueue.wait();\r\n\t\t\t\t} catch (InterruptedException 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}\r\n\t}", "private void retainQueue() {\n if (mRequestQueue == null) {\n mRequestQueue = new RequestQueue(mProxy.getContext());\n }\n mQueueRefCount++;\n }", "private void resize() {\n Object[] newQueue = new Object[(int) (queue.length * 1.75)];\n System.arraycopy(queue, startPos, newQueue, 0, queue.length - startPos);\n\n currentPos = queue.length - startPos;\n startPos = 0;\n queue = newQueue;\n\n }", "public void testDrainToN() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t1 = new Thread(new Runnable() {\n public void run() {\n try {\n q.put(one);\n } catch (InterruptedException ie){\n threadUnexpectedException();\n }\n }\n });\n Thread t2 = new Thread(new Runnable() {\n public void run() {\n try {\n q.put(two);\n } catch (InterruptedException ie){\n threadUnexpectedException();\n }\n }\n });\n\n try {\n t1.start();\n t2.start();\n ArrayList l = new ArrayList();\n Thread.sleep(SHORT_DELAY_MS);\n q.drainTo(l, 1);\n assertTrue(l.size() == 1);\n q.drainTo(l, 1);\n assertTrue(l.size() == 2);\n assertTrue(l.contains(one));\n assertTrue(l.contains(two));\n t1.join();\n t2.join();\n } catch(Exception e){\n unexpectedException();\n }\n }", "public CincamimisQueue()\r\n {\r\n measurementQueue=new ArrayBlockingQueue(10,true);\r\n }", "public LinkedBlockingQueue<Run> getStartQueue() {\n\t\treturn new LinkedBlockingQueue<Run>(startQueue);\n\t}", "public InMemoryQueueService(){\n this.ringBufferQueue = new QueueMessage[10000];\n }", "@Override\n\t\t\tprotected void beforeExecute(Thread t, Runnable r) {\n\t\t\t\tint qsize = getQueue().size();\n\t\t\t\tif(initCorePoolSize>0&&getCorePoolSize()<getMaximumPoolSize()\n\t\t\t\t\t&& qsize > 0 && (qsize%divisor) == 0){\n\t\t\t\t\tsetCorePoolSize(getCorePoolSize()+1); // 进行动态增加\n\t\t\t\t}\n\t\t\t}", "private boolean queueFullError() {\n\t\tSystem.out.println(\"Queue Full!!!\");\n\t\treturn false;\n\t}", "public DEQueue(int size) {\n tasks = new Runnable[size];\n top = new AtomicStampedReference<Integer>(0, 0);\n bottom = 0;\n }", "myQueue(){\n }", "public void run() {\r\n PooledConnection pConn;\r\n do {\r\n while (needAddConnSize.get() > 0) {\r\n needAddConnSize.decrementAndGet();\r\n if (!waitQueue.isEmpty()) {\r\n try {\r\n if ((pConn = createPooledConn(CONNECTION_USING)) != null)\r\n recycle(pConn);\r\n } catch (Throwable e) {\r\n if (e instanceof SQLException) {\r\n transferException((SQLException) e);\r\n } else {\r\n transferException(new SQLException(e));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (needAddConnSize.get() == 0 && createConnThreadState.compareAndSet(THREAD_WORKING, THREAD_WAITING))\r\n park(this);\r\n if (createConnThreadState.get() == THREAD_DEAD) break;\r\n } while (true);\r\n }", "private UniqueElementSingleThreadWorker()\n {\n _state = ActivityState.INITIALIZING;\n _taskQueue = new UniqueTagQueue<String, Runnable>();\n \n _taskThread = new Thread(\"UniqueElementSingleThreadWorker-\" + COUNTER.incrementAndGet())\n {\n @Override\n public void run()\n {\n while(true)\n {\n try\n {\n Runnable task = _taskQueue.blockingPop();\n if(task == SHUTDOWN_TASK)\n {\n break;\n }\n task.run();\n }\n catch(InterruptedException ex) { }\n //Catch run time exceptions that the runnable might throw so that the thread does not die\n catch(RuntimeException ex)\n {\n ErrorReporter.reportUncaughtException(ex);\n }\n }\n \n _state = ActivityState.SHUT_DOWN;\n }\n };\n }", "public SimpleQueue(int size) {\n initQueue(size);\n WRITE_PTR = 0;\n READ_PTR = 0;\n }", "@Override\r\n\tpublic void run() {\n\t\tsynchronized (arr) {\r\n\t\t\twhile (!arr.isEmpty()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Producer Waiting as array is full.\");\r\n\t\t\t\t\tarr.wait();\r\n\t\t\t\t} catch (InterruptedException 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\tsynchronized(arr){\r\n\t\t\ttry {\r\n\t\t\t\tarr.put(5);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Producer making the array full.\");\r\n\t\t\tarr.notifyAll();\r\n\t\t}\r\n\t\t}\r\n\t}", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "@Override\n public void run() {\n try {\n while (true) {\n\n FIXMessageBlock executionReport = executionReportQueue.take();\n\n processExecutionReport(executionReport);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"AddToQueue Thread Running\");\n\t\t//Create passenger creator\n\t\tCreatePassenger creator = new CreatePassenger();\n\t\t//Start time\n\t\tint start = LocalDateTime.now().getSecond();\n\t\tint time = 0;\n\t\tcounter = 0;\n\t\t//Loop until counter reaches max passengers or time equals max time\n\t\twhile(counter <= MAX_PASSENGERS && time < MAX_TIME) {\n\t\t\t//Create new passenger\n\t\t\tPassenger arrived = creator.create();\n\t\t\t//Add passenger to order array\n\t\t\tthis.arrivedAdd(arrived);\n\t\t\t//Clear line\n\t\t\tSystem.out.print(\"\\033[2K\");\n\t\t\t//Add passenger to queue\n\t\t\tqueue.offer(arrived);\n\t\t\t//Incremement counter\n\t\t\tcounter++;\n\t\t\t//Print out new queue\n\t\t\tSystem.out.print(\"\\r\" + queue);\n\t\t\tint now = LocalDateTime.now().getSecond();\n\t\t\tif(now >= start) {\n\t\t\t\t\ttime = now - start;\n\t\t\t} else {\n\t\t\t\ttime = (now + 59) - start;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(300); \n\t\t\t} catch(InterruptedException e) {\n\t\t\t\tSystem.out.println(\"Error! Thread was interrupted!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\t// Child threads start here to begin testing-- tests are below\n\t\n\t\t// We suggest writing a series of zero-sum tests,\n\t\t// i.e. lists should be empty between tests. \n\t\t// The interimBarr enforces this.\n\t\ttry {\n\t\t\tcontainsOnEmptyListTest();\n\t\t\tinterimBarr.await();\n\t\t\tsentinelsInEmptyListTest();\n\t\t\tprintResBarr.await();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tproduce();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean isAvailable(){\r\n return blockingQueue.size() < maxWorkQueueSize;\r\n }", "public void test_3() throws Exception {\n\t\tfinal BoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tThread theProducer = new Thread(\"Producer\") {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i = 0; i < MAX_CAPACITY * 1000; ++i) {\n\t\t\t\t\t\ttheBSQ.add(new Integer(i));\n//\t\t\t\t\t\tif(theBSQ.isFull()) {\n//\t\t\t\t\t\t\tSystem.err.println(\"theProducer: queue is full \" + theBSQ);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tfail(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tThread theConsumer = new Thread(\"Consumer\") {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i = 0; i < MAX_CAPACITY * 1000; ++i) {\n\t\t\t\t\t\tInteger theInteger = (Integer)theBSQ.remove();\n\t\t\t\t\t\t// Consume the Integers, make sure they arrive in the same\n\t\t\t\t\t\t// order they where produced\n\t\t\t\t\t\tassertEquals(i, theInteger.intValue());\n//\t\t\t\t\t\tif(theBSQ.isEmpty()) {\n//\t\t\t\t\t\t\tSystem.err.println(theInteger);\n//\t\t\t\t\t\t\tSystem.err.println(\"theConsumer: queue is empty \");\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\tSystem.err.println(theInteger);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tfail(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheProducer.start();\n\t\ttheConsumer.start();\n\n\t\ttheProducer.join();\n\t\ttheConsumer.join();\n\n\t\t// Make sure avery and all Integers have been consumed\n\t\tcheckEmptyness(theBSQ);\n\t}", "private void receive( byte[] audio )\n\t{\n\t\tmProcessedAudioQueue.offer( audio );\n\t\t\n\t\tif( !mDispatching.get() )\n\t\t{\n\t\t\tmThreadPoolManager.scheduleOnce( new AudioDispatcher(), 0, TimeUnit.MILLISECONDS );\n\t\t}\n\t}", "@Override\r\n\tpublic boolean isFull() {\r\n\r\n\t\treturn data.size() >= maxQueue;\r\n\t}" ]
[ "0.6932007", "0.6674405", "0.66502", "0.6602385", "0.6597059", "0.65555084", "0.6541269", "0.64387983", "0.6436596", "0.6390866", "0.63788795", "0.6307817", "0.6290736", "0.6225186", "0.62163043", "0.6215692", "0.6155309", "0.61475945", "0.6129216", "0.61260504", "0.61129487", "0.61070627", "0.60799545", "0.6067805", "0.6055464", "0.60544515", "0.6049661", "0.5999199", "0.5992201", "0.5988395", "0.59372765", "0.5918198", "0.59059656", "0.59009856", "0.59008056", "0.58870006", "0.5869713", "0.5851346", "0.5847944", "0.5843276", "0.5832925", "0.5832534", "0.5825869", "0.582452", "0.581487", "0.5808348", "0.5805366", "0.58008885", "0.57960093", "0.5795773", "0.5782438", "0.5775224", "0.575895", "0.5756737", "0.5754851", "0.5750653", "0.57484823", "0.57357466", "0.5730985", "0.5725863", "0.57221675", "0.5718203", "0.56719244", "0.5670128", "0.56685406", "0.5661119", "0.56497973", "0.56495494", "0.5641783", "0.56342435", "0.5630618", "0.5628654", "0.56253505", "0.56114423", "0.56111634", "0.5608844", "0.56005156", "0.5592051", "0.55905837", "0.55856305", "0.557539", "0.5567067", "0.55658877", "0.5549122", "0.5536211", "0.5533373", "0.5524746", "0.5519326", "0.55159944", "0.5496123", "0.54903597", "0.54754746", "0.54689264", "0.5465965", "0.54657245", "0.54651445", "0.5464773", "0.5462984", "0.5458765", "0.5458558" ]
0.6324436
11
List result = new ArrayList();
@RequestMapping(value = { "/printReport.xls" }, method = RequestMethod.POST) public void payOther(HttpServletRequest request, HttpServletResponse response) throws Exception { String rptCode = request.getParameter("rptCode"); String pathFile = request.getSession().getServletContext().getRealPath("/report/excel/" + rptCode + ".xls"); FileInputStream input_document = new FileInputStream(new File(pathFile)); Workbook workbook = new HSSFWorkbook(input_document); ReportBean bean = new ReportBean(); input_document.close(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); if(creteria != null) { // result = paymentManualService.findPayOrder(creteria); } reportService.controlAllReports(workbook, rptCode, bean).write(byteArrayOutputStream); byte[] bytes = byteArrayOutputStream.toByteArray(); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment;filename=" + rptCode+".xls"); response.getOutputStream().write(bytes); response.getOutputStream().flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<T> getResults();", "public List<New> list();", "public List getList();", "List<T> obtenerAll();", "Object getTolist();", "public ArrayList<Integer> getResults(){\n return results;\n }", "public ArrayList<String> getResultList() {\n return resultList;\n }", "List<?> getList();", "a(ArrayList arrayList) {\n super(1);\n this.$result = arrayList;\n }", "public ArrayList getList() {\n \t\treturn list;\n \t}", "@Override\r\n\tpublic List<T> getResult() {\n\t\treturn null;\r\n\t}", "public List<Integer> Result()\n\t{\n\t\treturn result;\n\t}", "ArrayList<Unit> extend(){\n return list;\n }", "static void q2(){\n\t\tArrayList<Integer>myList=new ArrayList<>();\n\t\t\n\t}", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public abstract List<T> getList();", "public ArrayList<R> getResults() {\n return results;\n }", "public List<Product> list();", "ArrayList<E> getAll();", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "ArrayList<Product> ListOfProducts();", "public ArrayList makeStudentList() {\r\n ArrayList<String> studenter = new ArrayList();\r\n Student student = new Student();\r\n \r\n \r\n \r\n return studenter;\r\n}", "public Collection<T> getResults();", "List<E> list();", "private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }", "List<Product> list();", "ArrayListOfStrings () {\n list = new ArrayList<String>();\n }", "public List getList() {\n return Arrays.asList(toJavaArray()); \n }", "java.util.List<People>\n getUserList();", "List<Vehiculo>listar();", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "List<GameResult> getAllResults();", "public Result getResults()\r\n {\r\n return result;\r\n }", "public ArrayList<User> getArrayList(){\n return userlist;\n }", "@Override\n public CommandResultList getResultList() {\n return cresultList;\n }", "ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}", "public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}", "public Vector getResultObjects() {\n\treturn _vcResults;\n }", "public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }", "public static void getArrayListResult(ResultSet res) {\r\n try {\r\n while (res.next()) {\r\n ArrayList<String> x = new ArrayList<>();\r\n for (int i = 1; i <= 4; i++) {\r\n x.add(res.getString(i));\r\n }\r\n waitlist.add(x);\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public List getList() throws HibException;", "ListType createListType();", "public Collection<T> mo29734a() {\n return new ArrayList();\n }", "protected Object[] getList() {\n return list;\n }", "public UserList list();", "public ArrayList<URI> getList() { return new ArrayList<URI>(); }", "abstract void makeList();", "public TempList() {\n list = new ArrayList<T>();\n }", "public List createUserList()\r\n{\r\n\tUser madhu=new User(\"[email protected]\", \"madhu\");\r\n\tUser krishna=new User(\"[email protected]\", \"krishna\");\t\r\n\r\n\tList listOfUsers = new ArrayList();\r\n\tlistOfUsers.add(madhu);\r\n\tlistOfUsers.add(krshna);\r\n\treturn listOfUsers;\r\n}", "public java.util.List getList() {\n\t\treturn list;\n\t}", "EList<Parameter> returnResult();", "static public LinkedList<CUser> getResult() {\r\n\t\treturn result;\r\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "List<T> readList();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "public T[] getMyList() {\n\n return myList;\n }", "public List<Article> getList() {\n return list;\n }", "ArrayList<String> createList(String finalInput);", "public ArrayList<Number> GetResult() throws RuntimeException {\r\n\t\tArrayList<Number> result = new ArrayList<>();\r\n\r\n\t\tint size = CurrentData.size();\r\n\t\t// if list has an odd number of items\r\n\t\tif (CurrentData.size() % 2 == 1) {\r\n\t\t\tresult.add(CurrentData.get(size / 2));\r\n\t\t}\r\n\t\t// if its not odd must be even\r\n\t\telse {\r\n\t\t\tdouble temp = (CurrentData.get(size / 2).doubleValue() + CurrentData.get((size / 2 - 1)).doubleValue()) / 2;\r\n\t\t\tresult.add((Number) temp);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public <T> List<T> getResultList(Class<T> clz,String sql){\n\t\treturn new ArrayList<T>();\r\n\t}", "List<String> mo5876c();", "protected List getResultList(List results, ResultTransformer resultTransformer) throws QueryException {\n \t\tHolderInstantiator holderInstantiator = buildHolderInstantiator( resultTransformer );\n \t\tif ( holderInstantiator.isRequired() ) {\n \t\t\tfor ( int i = 0; i < results.size(); i++ ) {\n \t\t\t\tObject[] row = ( Object[] ) results.get( i );\n \t\t\t\tObject result = holderInstantiator.instantiate(row);\n \t\t\t\tresults.set( i, result );\n \t\t\t}\n \n \t\t\tif ( !hasSelectNew() && resultTransformer != null ) {\n \t\t\t\treturn resultTransformer.transformList(results);\n \t\t\t}\n \t\t\telse {\n \t\t\t\treturn results;\n \t\t\t}\n \t\t}\n \t\telse {\n \t\t\treturn results;\n \t\t}\n \t}", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public JList obtenirList() {\r\n\t\treturn list;\r\n\t}", "public List<User> list();", "public static ArrayList getList() {\r\n return ListeElem;\r\n }", "private List<Instance> flushResultBuffer() {\n\t\tList<Instance> resultBuffer = this.resultBuffer;\n\t\tthis.resultBuffer = new LinkedList<Instance>();\n\t\treturn resultBuffer;\n\t}", "List<GameResult> getAllGameResults();", "List<T> read();", "public ArrayList<Chunk> getResult() {\n\t\treturn copyOfChunks;\n\t}", "public List<T> getList() {\n\t\treturn list;\n\t}", "@Override\r\n\tpublic ArrayList<Object> getAllStu_result() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tArrayList<Object> list = new ArrayList<Object>(); // 考卷集合\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"select * from stu_result order by stu_r_id desc;\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStu_result stu_r = new Stu_result();\r\n\t\t\t\tstu_r.setStu_r_id(rs.getInt(\"stu_r_id\"));\r\n\t\t\t\tstu_r.setSid(rs.getInt(\"sid\"));\r\n\t\t\t\tstu_r.setKj_id(rs.getInt(\"kj_id\"));\r\n\t\t\t\tstu_r.setStu_dxt_r(rs.getString(\"stu_dxt_r\"));\r\n\t\t\t\tstu_r.setStu_dxt_c(rs.getString(\"stu_dxt_c\"));\r\n\t\t\t\tstu_r.setStu_dxts_r(rs.getString(\"stu_dxts_r\"));\r\n\t\t\t\tstu_r.setStu_dxts_c(rs.getString(\"stu_dxts_c\"));\r\n\t\t\t\tstu_r.setStu_pdt_r(rs.getString(\"stu_pdt_r\"));\r\n\t\t\t\tstu_r.setStu_pdt_c(rs.getString(\"stu_pdt_c\"));\r\n\t\t\t\tlist.add(stu_r);// 把一个考试试卷加入集合\r\n\t\t\t}\r\n\t\t\treturn list; // 返回集合。\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\t// 释放数据集对象\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract List<Object> getAll();", "private ArrayList<T> createObjects(ResultSet resultSet) {\n\t\tArrayList<T> list = new ArrayList<T>();\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tT instance = null;\n\t\t\t\ttry {\n\t\t\t\t\tinstance = type.getDeclaredConstructor().newInstance();\n\t\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfor (Field field : type.getDeclaredFields()) {\n\t\t\t\t\tObject value = resultSet.getObject(field.getName());\n\t\t\t\t\tPropertyDescriptor propertyDescriptor = new PropertyDescriptor(field.getName(), type);\n\t\t\t\t\tMethod method = propertyDescriptor.getWriteMethod();\n\t\t\t\t\tmethod.invoke(instance, value);\n\t\t\t\t}\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public DList2 list(){\r\n return this.list;\r\n }", "java.util.List<com.orange.network.game.protocol.model.GameBasicProtos.PBUserResult> \n getUserResultList();", "List<T> collect();", "List<Product> getProductsList();", "public ArrayList<Book> getListBook();", "private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}", "public List<Card> list();", "Iterable<T> list();", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "Result getResult();", "public DOCKSList getList() {\r\n return localList;\r\n }", "public final List getList()\n {\n return this.list;\n }", "protected abstract List<E> getList();", "public List()\n {\n list = new Object [10];\n }", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult> \n getReaultList();", "public void setResults(ArrayList results) {\n this.results = results;\n }", "<T> List<T> getResultList(Class<T> type, Query query);", "public List<R> getAll();", "public void listar() {\n\t\t\n\t}", "private static List<AnalyticsResults> listFromResults(ResultSet results) throws SQLException {\n\t\tLinkedList<AnalyticsResults> list = new LinkedList<>();\n\t\twhile (results.next()) {\n\t\t\tlist.add(\n\t\t\t\tnew AnalyticsResults(\n\t\t\t\t\tresults.getString(\"event\"),\n\t\t\t\t\tresults.getInt(\"count\"),\n\t\t\t\t\tresults.getInt(\"users\")\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn Collections.unmodifiableList(list);\n\t}", "@Override\n @XmlElement(name = \"result\", required = true)\n public Collection<Result> getResults() {\n return results = nonNullCollection(results, Result.class);\n }", "public Results copy()\n {\n Results copy = new Results();\n for(Object object : results) {\n copy.add( object );\n }\n return copy;\n }" ]
[ "0.72668266", "0.7079035", "0.69634527", "0.69054765", "0.68808514", "0.68287164", "0.6819557", "0.67998356", "0.6746828", "0.67216957", "0.6699425", "0.6690439", "0.6674936", "0.6570561", "0.6553031", "0.6525593", "0.64348257", "0.64231366", "0.6421547", "0.64121085", "0.63996965", "0.6366788", "0.63293296", "0.62900645", "0.6273264", "0.62506914", "0.6243868", "0.62222743", "0.6222235", "0.6207497", "0.62007767", "0.61990196", "0.6197538", "0.619606", "0.6179344", "0.6169602", "0.61647993", "0.61425877", "0.61410373", "0.61409956", "0.6119227", "0.6101077", "0.60877097", "0.6081966", "0.6072321", "0.6066999", "0.6060488", "0.60591596", "0.60590243", "0.6044666", "0.6043821", "0.6041712", "0.60364705", "0.6026185", "0.6025019", "0.60215443", "0.60215443", "0.60215443", "0.60215443", "0.60215443", "0.6001802", "0.5993072", "0.5990198", "0.59879994", "0.59849167", "0.5972319", "0.5968026", "0.59677136", "0.5961761", "0.594814", "0.5947116", "0.59467286", "0.5895857", "0.58921546", "0.58912206", "0.58865064", "0.58783466", "0.58779037", "0.5865843", "0.58630896", "0.586232", "0.58579874", "0.5847481", "0.58368605", "0.5834021", "0.5825805", "0.5824455", "0.58226067", "0.5822378", "0.5818882", "0.5817918", "0.5815817", "0.5813733", "0.5808425", "0.5805983", "0.58021724", "0.57958406", "0.5778999", "0.5776026", "0.577585", "0.5775082" ]
0.0
-1